WML_FILES = $(wildcard *.wml) FILES = $(WML_FILES:%.wml=%.html) #DIRS = Termine News Infos Service DIRS = $(shell find . -maxdepth 1 -type d -not -name . -not -name CVS) #ROOT_PREFIX = $(shell perl -MCwd -e '$d = cwd;$d =~ s/^.*src\/?(.*)$/$1/;@f=split (/\//, $d);print "../"x($#f+1);') ROOT_PREFIX = $(shell perl -MCwd -e '$$_ = cwd;s/^.*src\/?//;@f=split /\//;$$n=$$\#f+1;print "../"x $$n;' ) #ROOT_PREFIX = $(shell perl -MCwd -e '$d = cwd();') #ROOT_PREFIX = $(shell echo "foo" 'bar \(\)') ifeq ($(TERM),dumb) WML = /usr/bin/wml -n -q else WML = /usr/bin/wml -n endif MLOCAL = $(wildcard Makefile.local) IFLAGS = -I. -I$(ROOT_PREFIX)../Styles .SUFFIXES: .wml .html # ${CC} ${CFLAGS} -c $*.c # .c.i: # $(RM) $@@ # $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@@ .wml.html: $(WML) $(IFLAGS) -o $*.html $*.wml # /usr/bin/wml -n $(IFLAGS) $*.wml| sed 's:"[a-zA-Z0-9_]*\.imgdot-1x1-transp\.gif":"../pix/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 && cd $$d && make all); fi; done clean: rm -f $(FILES) *.imgdot-1x1-transp.gif .depend test -z "$(DIRS)" || for d in "" $(DIRS); do if [ -n "$$d" ]; then (cp Makefile $$d && cd $$d && make clean); fi; done test -z "$(ROOT_PREFIX)" || rm -f Makefile install: cd $(ROOT_PREFIX).. && make install test: cd $(ROOT_PREFIX).. && make test depend .depend: $(ROOT_PREFIX)../bin/wmldepend.sh $(IFLAGS) $(WML_FILES) > .depend include .depend ifneq "$(MLOCAL)" "" include Makefile.local endif