# file: src/web-interfaces/ca/i18n/english/Makefile
#
#  2001 OpenCA Group

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

DEST_CA_CGI_CONFDIR	= ${etc_prefix}/servers

CA_CONF_FILE	= \
	ca.conf

SUBDIRS = \
	htdocs	\
	sheets

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

.PHONY:	default install clean distclean

default::

install::	$(CA_CONF_FILE) $(SUBDIRS)

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

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

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

distclean::
		$(RM) $(AC_FILES) $(CA_CONF_FILE)
