WML_FILES = $(wildcard *.wml) FILES = $(WML_FILES:%.wml=%.html) SFILES = $(WML_FILES:%.wml=%.shtml) PFILES = $(WML_FILES:%.wml=%.php3) ifeq ($(TERM),dumb) WML = /usr/bin/wml -n -q else WML = /usr/bin/wml -n endif DIRS = $(shell find . -maxdepth 1 -type d -not -name . -not -name CVS) ROOT_PREFIX = $(shell perl -MCwd -e '$$_ = cwd;s/^.*src\/?//;@f=split /\//;$$n=$$\#f+1;print "../"x $$n;' ) IFLAGS = -I. -I$(ROOT_PREFIX)../Styles .SUFFIXES: .wml .html .wml.html: $(WML) $(IFLAGS) $*.wml| sed 's:"[a-zA-Z0-9_\.-]*\.imgdot-1x1-transp\.gif":"$(ROOT_PREFIX)gifs/imgdot-1x1-transp.gif":' > $*.html $(ROOT_PREFIX)../bin/fixsuffix $*.html all: $(FILES) test -z "$(DIRS)" || for d in "" $(DIRS); do if [ -n "$$d" ]; then (cp Makefile $$d && make -C $$d all); fi; done dir: $(FILES) clean: -rm -f $(FILES) $(SFILES) $(PFILES) .depend *.imgdot-1x1-transp.gif imgdot-1x1-transp.gif imgdot-1x1-transp-ffffff.gif -rm -f *~ test -z "$(DIRS)" || for d in "" $(DIRS); do if [ -n "$$d" ]; then (cp Makefile $$d && make -C $$d clean); fi; done test -z "$(ROOT_PREFIX)" || rm -f Makefile install: make -C $(ROOT_PREFIX).. install test: make -C $(ROOT_PREFIX).. test depend .depend: $(ROOT_PREFIX)../bin/wmldepend.sh $(IFLAGS) $(WML_FILES) > .depend rdepend: make depend test -z "$(DIRS)" || for d in "" $(DIRS); do if [ -n "$$d" ]; then (cp Makefile $$d && make -C $$d rdepend); fi; done include .depend