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

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

DEST_RA_CGI_CONFDIR	= ${etc_prefix}/servers

RA_CONF_FILE	= \
	ra.conf

SUBDIRS = \
	htdocs	\
	mails	\
	sheets

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

.PHONY:	default install clean distclean

default::

install::	$(RA_CONF_FILE) $(SUBDIRS)

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

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

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

distclean::
		$(RM) $(AC_FILES) $(RA_CONF_FILE)
