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

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

DEST_CA_HTDOCDIR	= $(ca_htdocs_fs_prefix)

SUBDIRS	= \
	images	\
	scripts

AC_FILES	= \
	batchProcessors.html	\
	certs.html		\
	crrs.html		\
	configuration.html	\
	index.html		\
	initCA.html		\
	initPublic.html		\
	initRA.html		\
	initUser.html		\
	issueCRL.html		\
	issueCRLfromFile.html	\
	navbar.html		\
	requests.html		\
	thanks.html

STATIC_FILES	= \
	dBs.html		\
	getDB.html		\
	init.html		\
	main.html		\
	pwd.html		\
	top.html

FILES		= $(AC_FILES) $(STATIC_FILES)

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

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

.PHONY:	default install clean distclean

default::

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

install::	$(DEST_FILES)

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

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

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

distclean::
		$(RM) $(AC_FILES)
