# -*- makefile -*-
HTML = $(patsubst %,%.html,$(FILES))
WMLFLAGS = -I/usr/contrib/share/wml/include -q -Eweblint
WML_EXEC = /usr/contrib/lib/wml/exec/wml_aux_
%.html: %.wml
wml $(WMLFLAGS) -o $@ $<
# ( cd $(dir $<) && wml $(WMLFLAGS) -o $(notdir $@) $(notdir $<) )
ALL_SUBDIRS = $(addprefix all-,$(SUBDIRS))
WEBLINT_SUBDIRS = $(addprefix weblint-,$(SUBDIRS))
HTMLINFO_SUBDIRS = $(addprefix htmlinfo-,$(SUBDIRS))
CLEAN_SUBDIRS = $(addprefix clean-,$(SUBDIRS))
.PHONY: $(ALL_SUBDIRS) $(WEBLINT_SUBDIRS) $(HTMLINFO_SUBDIRS) $(CLEAN_SUBDIRS)
all: $(HTML) $(ALL_SUBDIRS)
#all-recursive:
# @set fnord $(MAKEFLAGS); amf=$$2; \
# list='$(SUBDIRS)'; for subdir in $$list; do \
# target=`echo $@ | sed s/-recursive//`; \
# echo "Making $$target in $$subdir"; \
# (cd $$subdir && $(MAKE) $$target) \
# || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
# done && test -z "$$fail"
$(ALL_SUBDIRS) $(WEBLINT_SUBDIRS) $(HTMLINFO_SUBDIRS) $(CLEAN_SUBDIRS):
@target=`echo $@ | sed 's/-.*//'`; \
dir=`echo $@ | sed 's/[^-]*-//'`; \
echo "Making $$target in " `pwd`/"$$dir"; \
$(MAKE) -C $$dir $$target
# $(MAKE) --no-print-directory -C $$dir $$target
clean: $(CLEAN_SUBDIRS)
-rm $(HTML)
weblint: $(WEBLINT_SUBDIRS)
$(WML_EXEC)weblint $(HTML)
htmlinfo: $(HTMLINFO_SUBDIRS)
@for X in $(HTML); do \
echo '=============================================='; \
echo `pwd`/"$$X"; \
$(WML_EXEC)htmlinfo "$$X"; \
done
tags:
-rm TAGS
find . -name '*.wml' -o name Makefile | xargs etags -a -l none