]> git.donarmstrong.com Git - lilypond.git/blob - make/Rules.make
d9e51b11c0f9440be6c3978ff85b48fb2b7d84ea
[lilypond.git] / make / Rules.make
1 #
2 # project  LilyPond -- the musical typesetter
3 # title    generic make rules
4 # file     make/Rules.make
5 #
6 # Copyright (c) 1997 by    
7 #       Jan Nieuwenhuizen <jan@digicash.com>
8 #       Han-Wen Nienhuys <hanwen@stack.nl>
9
10 # this is supposed to clear all suffixes:
11 .SUFFIXES:
12
13 # so why does make still consider xx.y : RCS/xx.y,v ?
14 # there is no suffix ,v anymore!
15 .SUFFIXES: .cc .o .hh .y .l .pod .text .1 .dep .html
16
17
18 # compile rules:
19 #
20 $(outdir)/%.o: %.cc
21         $(DO_CXX_COMPILE)
22
23 $(outdir)/%.o: $(outdir)/%.cc
24         $(DO_CXX_COMPILE)
25
26 $(outdir)/%.cc: %.y
27 #       $(BISON) -d $<
28         $(BISON) $<
29 #       mv $(shell basename $@ .cc ).tab.h $(include-lib)/$(shell basename $@ .cc).hh
30 #       mv $(shell basename $@ .cc ).tab.h $(outdir)/$(shell basename $@ .cc).hh
31         mv $(shell basename $@ .cc ).tab.c $@
32
33 $(outdir)/%.hh: %.y
34         $(BISON) -d $<
35         mv $(shell basename $@ .hh ).tab.h $@
36         mv $(shell basename $@ .hh ).tab.c $(outdir)/$(shell basename $@ .hh).cc
37
38 $(outdir)/%.cc: %.l
39         $(FLEX) -Cfe -p -p -t $< > $@
40 # could be faster:
41 #       $(FLEX) -8 -Cf -t $< > $@
42
43 $(outdir)/%.text: $(outdir)/%.1
44         groff -man -Tascii $< > $@
45
46 $(depth)/%.text: $(outdir)/%.text
47         cp $< $@
48
49 $(outdir)/%.html: %.pod
50         $(pod2html)  $<
51         mv $(notdir $@) $(outdir)/
52
53 $(outdir)/%.5: %.pod
54         $(pod2groff)
55 $(outdir)/%.1: %.pod
56         $(pod2groff)
57
58
59
60 #
61
62 # outdirs:
63 #
64 # ?$(outdir)/%.dep:
65 %.dep:
66         touch $@
67
68
69 # build and config stuff: (could make this generic default rule...)
70 #
71 %/.build:
72         echo 0 > $@
73
74
75 $(depth)/%.text: check-doc-deps
76         rm -f $@
77         ln `find ${depth}/Documentation -name $@|head -1` .
78
79 $(outdir)/%.xpm: %.gif
80         giftopnm $< | ppmtoxpm > $@