More highlighting
[infodrom.org/infocon.infodrom.org] / src / Makefile
index 71b10c6..d14799f 100644 (file)
@@ -3,6 +3,12 @@ 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;' )
@@ -12,18 +18,31 @@ IFLAGS = -I. -I$(ROOT_PREFIX)../Styles
 .SUFFIXES: .wml .html
 
 .wml.html:
-       /usr/bin/wml -n $(IFLAGS) $*.wml| sed 's:"[a-zA-Z0-9_\.-]*\.imgdot-1x1-transp\.gif":"$(ROOT_PREFIX)gifs/imgdot-1x1-transp.gif":' > $*.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 && cd $$d && make all); fi; done
+       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
-       test -z "$(DIRS)" || for d in "" $(DIRS); do if [ -n "$$d" ]; then (cp Makefile $$d && cd $$d && make clean); fi; done
+       -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