3 # Mutopia Makefile Project
5 # Rename this file to GNUmakefile, and issue `make help'
10 # Magic: find and include LilyPond's StepMake rules
13 # 1: follow LILYPONDPREFIX
14 # 2: try source tree in home
15 # 3: try installed tree in $HOME
16 # 4: try system installed tree
17 # 5: try system installed tree
19 make-root=$(wildcard $(depth)/make)
20 make-root?=$(wildcard $(LILYPONDPREFIX)/make)
21 make-root?=$(wildcard $(HOME)/usr/src/lilypond/make)
22 make-root?=$(wildcard $(HOME)/usr/share/lilypond/make)
23 make-root?=$(wildcard /usr/share/lilypond/make)
24 make-root?=$(wildcard /usr/local/share/lilypond/make)
25 #make-root=<LilyPond's datadir>/make
27 ### some versions apparently choke on $(message)
28 ### $(message running from $(make-root))
29 depth:=$(make-root)/..
30 LOCALSTEPMAKE_TEMPLATES=ly mutopia
31 include $(make-root)/stepmake.make
33 $(error can't find LilyPond's stepmake installation)
39 # Mutopia/user targets.
40 # This needs some work.
44 # Name of mutopia project
48 parts=$(patsubst %.ly,%,$(wildcard *-part.ly))
51 # scores for target local-WWW (duh)
56 # scores for target mutopia
58 mutopia-examples=$(name) $(parts)
63 $(outdir)/%-book.ps: $(outdir)/%.ps
65 pstops '2:0L(11.45in,0.25in)+1L(11.45in,5.6in)' $<.tmp $@
68 # Catch-all target: type `make foo' to make out/foo.ps,
69 # or make `foo-book' to make out/foo-book.ps
72 @echo Generated $< for target $@.
75 # Also clean hand-compiled stuff in cwd
77 local-clean: local-auto-gen-clean
79 # Compose string from two parts: must not remove myself.
80 auto-gen-tag=Generated
81 auto-gen-tag+= automatically by
84 rm -f `grep -l '$(auto-gen-tag)' *`