From: Joey Schulze Date: Wed, 6 Aug 2003 13:22:01 +0000 (+0000) Subject: Imported file from www.infodrom.org X-Git-Url: https://git.infodrom.org/?p=infodrom.org%2Flists.infodrom.org;a=commitdiff_plain;h=26e989ae86b62b92a797532fd7986810fe204c4d Imported file from www.infodrom.org --- diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..40e83d9 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,53 @@ +WML_FILES = $(wildcard *.wml) +FILES = $(WML_FILES:%.wml=%.html) +SFILES = $(WML_FILES:%.wml=%.shtml) +PFILES = $(WML_FILES:%.wml=%.php3) +MLOCAL = $(wildcard Makefile.local) + +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\(-ffffff\)\?\.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 + +ifneq "$(MLOCAL)" "" +include Makefile.local +endif