lilypond-0.1.54
[lilypond.git] / lily / GNUmakefile
blob0a05b2684968ebd32c77b39796a6290ea2f0e66e
1 # lilypond/GNUmakefile
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.
8 # automake/wild-make should generate this file from Makefile.am.wild
10 #ugh
11 Makefile=$(wildcard Makefile)
12 # are we configured here, or are we using --srcdir
13 ifeq ($(Makefile),Makefile)
15 include Makefile
17 biltdir=.
19 else
21 #ugh
22 biltdir=../../build/lily
24 make-in-build: wild-check
25 echo exec $(MAKE) -C $(biltdir)
26 exec $(MAKE) -C $(biltdir)
28 include $(biltdir)/Makefile
30 clean: wild-check
31 exec $(MAKE) -C $(biltdir) $@
33 dist: wild-check
34 exec $(MAKE) -C $(biltdir) $@
36 distclean: wild-check
37 exec $(MAKE) -C $(biltdir) $@
39 lexer.cc: wild-check
40 exec $(MAKE) -C $(biltdir) $@
42 parser.hh: wild-check
43 exec $(MAKE) -C $(biltdir) $@
45 parser.cc: wild-check
46 exec $(MAKE) -C $(biltdir) $@
48 #ugh OMIT_DEPENDENCIES does not seem to work
49 .deps/lexer.P:
50 exec $(MAKE) -C $(biltdir) $@
52 .deps/parser.P:
53 exec $(MAKE) -C $(biltdir) $@
55 endif
57 # Makefile.am.wild: lilypond_SOURCES = $(wildcard *.cc *.ll *.yy)
58 # ugh
59 CURRENT_lilypond_SOURCES = $(wildcard *.cc lexer.ll parser.yy)
61 # ugh: stupid lexer.cc/parser.cc cluttering sourcedir!
62 wild-check: check-lilypond-sources
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