]> git.donarmstrong.com Git - lilypond.git/blob - make/Rules.make
1389ef4bd7253118d01f5c4c19607fb65b19b2ce
[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 # so why does make still consider xx.y : RCS/xx.y,v ?
13 # there is no suffix ,v anymore!
14 .SUFFIXES: .cc .o .hh .y .l .pod .txt .1 .dep
15
16 # cancel implicit rules:
17 #
18 # shit, how to get rid of these stupid built-in rules?
19 # include ./$(depth)/make/Builtin-rules.make
20 #
21
22 # compile rules:
23 #
24 $(outdir)/%.o: %.cc
25         $(DODEP)\
26         $(CXX) -c $(CXXFLAGS) $(CXX_OUTPUT_OPTION) 
27
28 $(outdir)/%.cc: %.y
29 #       $(BISON) -d $<
30         $(BISON) $<
31 #       mv $(shell basename $@ .cc ).tab.h $(include-lib)/$(shell basename $@ .cc).hh
32 #       mv $(shell basename $@ .cc ).tab.h $(outdir)/$(shell basename $@ .cc).hh
33         mv $(shell basename $@ .cc ).tab.c $@
34
35 $(outdir)/%.hh: %.y
36         $(BISON) -d $<
37         mv $(shell basename $@ .hh ).tab.h $@
38         mv $(shell basename $@ .hh ).tab.c $(outdir)/$(shell basename $@ .hh).cc
39
40 $(outdir)/%.cc: %.l
41         $(FLEX)  -t $< > $@
42
43 $(outdir)/%.text: $(outdir)/%.1
44         groff -man -Tascii $< > $@
45
46 $(depth)/%.text: $(outdir)/%.text
47         cp $< $@
48
49 $(outdir)/%.1: %.pod
50         pod2man --center="LilyPond documentation" --section="0"\
51                 --release="LilyPond $(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)" $< > $@
52 #
53
54 # outdirs:
55 #
56 # ?$(outdir)/%.dep:
57 %.dep:
58         touch $@
59
60
61 # build and config stuff: (could make this generic default rule...)
62 #
63 %/.build:
64         echo 0 >$@
65
66
67 # specific stuff:
68 #
69 $(LIBFLOWER): check-flower-deps
70         $(MAKE) ./$(outdir)/$(@F) -C $(depth)/flower/lib
71
72 check-flower-deps:
73         $(MAKE)  -C $(depth)/flower/lib
74
75 check-lily-deps: check-flower-deps
76         $(MAKE)  -C $(depth)/lib
77
78 $(LIBLILY): dummy
79         $(MAKE) ./$(outdir)/$(@F) -C $(depth)/lib
80 #
81