]> git.donarmstrong.com Git - lilypond.git/blob - make/Rules.make
a5ea5760d527ad5fe08cb230a03587c6b4062662
[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  .dep
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) $<
28         mv $(shell basename $@ .cc ).tab.c $@
29
30 $(outdir)/%.hh: %.y
31         $(BISON) -d $<
32         mv $(shell basename $@ .hh ).tab.h $@
33         mv $(shell basename $@ .hh ).tab.c $(outdir)/$(shell basename $@ .hh).cc
34
35 $(outdir)/%.cc: %.l
36         $(FLEX) -Cfe -p -p -t $< > $@
37 # could be faster:
38 #       $(FLEX) -8 -Cf -t $< > $@
39
40 $(outdir)/%: %.m4
41         $(M4) $< > $@
42
43 # outdirs:
44 #
45 # ?$(outdir)/%.dep:
46 %.dep:
47         touch $@
48
49
50 # build and config stuff: (could make this generic default rule...)
51 #
52 %/.build:
53         echo 0 > $@
54
55
56 $(depth)/%.txt: check-doc-deps
57         rm -f $@
58         ln `find ${depth}/Documentation -name $@|head -1` .