# # $Id: makefile,v 1.1.1.1 2011/03/18 04:20:52 dkl Exp $ # INCLUDE=$(DUDE)/include MAKEFILE=$(DUDE)/makefile VPATH=.:$(DUDE)/include all: clean everything everything: main.html subdirs pages # if there's something called main.html, make a link to it. # otherwise, make an index.html from index.html.tmpl i: clean index.html main: makemain -target main.html; index.html: if [ -f main.html ]; then \ ln -s main.html index.html ; \ else \ make -f $(MAKEFILE) index.html.in ; \ makemain -target index.html; \ /bin/rm index.html.in; \ fi; index.html.in: index.html.tmpl echo "#include " | cpp -traditional -P -I. -I$(INCLUDE) > index.html.in style: style.css style.css: style.css ln -s $(DUDE)/include/style.css . pages: cd $(DUDE); bin/makepages; makefile: if [ -f makefile ]; then /bin/rm makefile ; fi ; \ ln -s $(MAKEFILE) . makefiles: dirs=`ls | grep '^[A-Z]' | grep -v CVS`; \ for i in $$dirs; do \ if [ -d ./$$i ]; then \ echo "making makefile in $$i"; \ pushd $$i; \ /bin/rm -f makefile ; \ ln -s $(MAKEFILE) . ; \ make -k makefiles ; \ popd; \ fi; \ done; subdirs: dirs=`ls | grep '^[A-Z]' | grep -v CVS`; \ for i in $$dirs; do \ if [ -d $$i -a ! -h $$i -a ! -f $$i/$$i.pl ]; then \ echo "making subdir $$i"; \ pushd $$i; \ make -k -f $(MAKEFILE) index.html subdirs; \ popd; \ fi; \ done; clean: /bin/rm -f .html *.in *.pxl *.alb *.utm *.ll *.pts # the main rule, which make an html page from a .in %.html: %.html.in makemain -target $@ ; /bin/rm $*.html.in # the other main rule, which makes a .in from a .tmpl %.html.in:: %.html.tmpl echo "#include <$*.html.tmpl>" | cpp -traditional -P -I. -I$(INCLUDE) > $@