Kleine Korrekturen nach dem letzten Linux-Stammtisch
[infodrom.org/oldenburg.linux.de] / src / Makefile
1 WML_FILES = $(wildcard *.wml)
2 FILES = $(WML_FILES:%.wml=%.html)
3
4 #DIRS = Termine News Infos Service
5 DIRS = $(shell find . -maxdepth 1 -type d -not -name . -not -name CVS)
6
7 #ROOT_PREFIX = $(shell perl -MCwd -e '$d = cwd;$d =~ s/^.*src\/?(.*)$/$1/;@f=split (/\//, $d);print "../"x($#f+1);')
8 ROOT_PREFIX = $(shell perl -MCwd -e '$$_ = cwd;s/^.*src\/?//;@f=split /\//;$$n=$$\#f+1;print "../"x $$n;' )
9 #ROOT_PREFIX = $(shell perl -MCwd -e '$d = cwd();')
10 #ROOT_PREFIX = $(shell echo "foo" 'bar \(\)')
11
12 IFLAGS = -I. -I$(ROOT_PREFIX)../Styles
13
14 .SUFFIXES: .wml .html
15
16 #       ${CC} ${CFLAGS} -c $*.c
17 # .c.i:
18 #       $(RM) $@@
19 #       $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@@
20
21 .wml.html:
22         /usr/bin/wml -n $(IFLAGS) -o $*.html $*.wml
23 #       /usr/bin/wml -n $(IFLAGS) $*.wml| sed 's:"[a-zA-Z0-9_]*\.imgdot-1x1-transp\.gif":"../pix/imgdot-1x1-transp.gif":' > $*.html
24
25 all: $(FILES)
26         test -z "$(DIRS)" || for d in "" $(DIRS); do if [ -n "$$d" ]; then (cp Makefile $$d && cd $$d && make all); fi; done
27
28 clean:
29         rm -f $(FILES) *.imgdot-1x1-transp.gif .depend
30         test -z "$(DIRS)" || for d in "" $(DIRS); do if [ -n "$$d" ]; then (cp Makefile $$d && cd $$d && make clean); fi; done
31         test -z "$(ROOT_PREFIX)" || rm -f Makefile
32
33 install:
34         cd $(ROOT_PREFIX).. && make install
35
36 test:
37         cd $(ROOT_PREFIX).. && make test
38
39 depend .depend:
40         $(ROOT_PREFIX)../bin/wmldepend.sh $(IFLAGS) $(WML_FILES) > .depend
41
42 include .depend