# file: src/web-interfaces/node/i18n/C/Makefile
#
#  2001 OpenCA Group

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

DEST_NODE_CGI_CONFDIR	= ${etc_prefix}/servers

NODE_CONF_FILE	= \
	node.conf

SUBDIRS = \
	htdocs	\
	sheets

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

.PHONY:	default install clean distclean

default::

install::	$(NODE_CONF_FILE) $(SUBDIRS)

$(NODE_CONF_FILE)::
	@if [ -e $(DEST_NODE_CGI_CONFDIR)/${node_prefix}.conf ]; then \
		echo "$@ already exists, skipping configuration"; \
	else \
		set -x; \
		$(INSTALL) -o ${openca_user} -g ${httpd_group} -m 640 $@ $(DEST_NODE_CGI_CONFDIR)/${node_prefix}.conf; \
	fi

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

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

distclean::
		$(RM) $(AC_FILES) $(NODE_CONF_FILE)
