# file: src/web-interfaces/node/i18n/english/htdocs/Makefile
#
#  2002 OpenCA Group

TOP	= ../../../../../..
include $(TOP)/Makefile.global-vars

DEST_NODE_HTDOC_DIR	= ${node_htdocs_fs_prefix}

SUBDIRS	= \
	images	\
	scripts

AC_FILES	= \
	db.html			\
	main.html		\
	navbar.html		\
	dBs.html		\
	dataexchange.html	\
	init.html		\
	safety.html		\
	sendCRINMail.html

STATIC_FILES	= \
	getDB.html		\
	index.html		\
	pwd.html		\
	top.html

FILES		= $(AC_FILES) $(STATIC_FILES)

DEST_FILES	= $(FILES:%=$(DEST_NODE_HTDOC_DIR)/%)

#---- variable settings above, rules below ----

.PHONY:	default install clean distclean

default::

$(DEST_NODE_HTDOC_DIR):
		$(INSTALL) -d -o ${openca_user} -g ${openca_group} -m 755 $@

install::	$(DEST_FILES)

$(DEST_FILES)::	$(DEST_NODE_HTDOC_DIR)
$(DEST_FILES)::
		$(INSTALL) -o ${openca_user} -g ${openca_group} -m 644 $(@:$(DEST_NODE_HTDOC_DIR)/%=%) $@

install clean distclean::
		$(MAKE) $(SUBDIRS) SUBTARGET=$@

$(SUBDIRS)::
		cd $@ && $(MAKE) $(SUBTARGET)

distclean::
		$(RM) $(AC_FILES)
