]> git.donarmstrong.com Git - lilypond.git/blob - lily/GNUmakefile
partial: 0.1.57.jcn
[lilypond.git] / lily / GNUmakefile
1 # lilypond/GNUmakefile
2 #
3 # This file helps maintainers to keep their Makefile.am automatically
4 # up to date using GNU make features.
5 # If you don't have (or run) GNU make, Makefile.am will not be updated
6 # automatically when source files are added/removed.
7
8 # automake/wild-make should generate this file from Makefile.am.wild
9
10 #ugh
11 Makefile=$(wildcard Makefile)
12 # are we configured here, or are we using --srcdir
13 ifeq ($(Makefile),Makefile)
14
15 include Makefile
16
17 biltdir=.
18
19 else
20
21 #ugh
22 biltdir=../../build/lily
23
24 make-in-build: wild-check
25         echo exec $(MAKE) -C $(biltdir)
26         exec $(MAKE) -C $(biltdir)
27
28 include $(biltdir)/Makefile
29
30 clean: wild-check
31         exec $(MAKE) -C $(biltdir) $@
32
33 dist: wild-check
34         exec $(MAKE) -C $(biltdir) $@
35
36 distclean: wild-check
37         exec $(MAKE) -C $(biltdir) $@
38
39 lexer.cc: wild-check
40         exec $(MAKE) -C $(biltdir) $@
41
42 parser.hh: wild-check
43         exec $(MAKE) -C $(biltdir) $@
44
45 parser.cc: wild-check
46         exec $(MAKE) -C $(biltdir) $@
47
48 #ugh OMIT_DEPENDENCIES does not seem to work
49 .deps/lexer.P:
50         exec $(MAKE) -C $(biltdir) $@
51
52 .deps/parser.P:
53         exec $(MAKE) -C $(biltdir) $@
54
55 endif
56
57 # Makefile.am.wild: lilypond_SOURCES = $(wildcard *.cc *.ll *.yy)
58 # ugh
59 CURRENT_lilypond_SOURCES = $(wildcard *.cc lexer.ll parser.yy)
60
61 # ugh: stupid lexer.cc/parser.cc cluttering sourcedir!
62 wild-check: check-lilypond-sources
63
64 check-lilypond-sources:
65 ifneq ($(lilypond_SOURCES),$(filter-out $(IGNORE_WILDCARDS), $(CURRENT_lilypond_SOURCES)))
66         @echo \"$(lilypond_SOURCES)\"
67         @echo \"$(CURRENT_lilypond_SOURCES)\"
68         @echo  lilypond_SOURCES changed: rerunning make-wild.
69         @-rm -f Makefile.am
70         $(PERL) $(top_srcdir)/bin/wild-perl < Makefile.am.wild > Makefile.am
71 endif
72