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

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

DEST_RA_HTDOCDIR	= $(ra_htdocs_fs_prefix)

SUBDIRS	= \
	crl		\
	images		\
	scripts

AC_FILES	= \
	index.html	\
	certs.html	\
	crrs.html	\
	main.html	\
	navbar.html	\
	requests.html	\
	search_cert.html

STATIC_FILES	= \
	pwd.html	\
	top.html

FILES		= $(AC_FILES) $(STATIC_FILES)

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

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

.PHONY:	default install clean distclean

default::

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

install::	$(DEST_FILES)

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

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

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

distclean::
		$(RM) $(AC_FILES)
