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

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

DEST_PUB_HTDOCDIR	= $(pub_htdocs_fs_prefix)

SUBDIRS	= \
	cacert	\
	crl	\
	images	\
	scripts

AC_FILES	= \
	getcert.html	\
	main.html	\
	navbar.html	\
	requests.html	\
	search_cert.html

STATIC_FILES	= \
	index.html		\
	top.html

FILES		= $(AC_FILES) $(STATIC_FILES)

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

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

.PHONY:	default install clean distclean

default::

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

install::	$(DEST_FILES)

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

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

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

distclean::
		$(RM) $(AC_FILES)
