# file: src/web-interfaces/ldap/i18n/english/htdocs/Makefile
#
#  2002 OpenCA Group

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

DEST_LDAP_HTDOCDIR	= $(ldap_htdocs_fs_prefix)

SUBDIRS	= \
	images		\
	scripts	

AC_FILES	= \
	index.html	\
	certs.html	\
	main.html	\
	navbar.html

STATIC_FILES	= \
	top.html

FILES		= $(AC_FILES) $(STATIC_FILES)

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

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

.PHONY:	default install clean distclean

default::

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

install::	$(DEST_FILES)

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

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

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

distclean::
		$(RM) $(AC_FILES)
