3 # Mutopia Makefile Project
5 # Rename this file to GNUmakefile, and issue `make help'
10 # Magic: find and include LilyPond's StepMake rules
12 # 0: follow LILYPONDPREFIX
14 # 2: try installed tree in $HOME
15 # 3: try system installed tree
17 make-root=$(wildcard $(LILYPONDPREFIX)/make)
18 make-root?=$(wildcard $(HOME)/usr/src/lilypond/make)
19 make-root?=$(wildcard /usr/share/lilypond/make)
20 make-root?=$(wildcard /usr/share/lilypond/make)
21 #make-root=<LilyPond's datadir>/make
23 ### some versions apparently choke on $(message)
24 ### $(message running from $(make-root))
26 LOCALSTEPMAKE_TEMPLATES=ly mutopia
27 include $(make-root)/stepmake.make
29 $(error can't find LilyPond's stepmake installation)
35 # Mutopia/user targets.
36 # This needs some work.
40 # Name of mutopia project
44 parts=$(patsubst %.ly,%,$(wildcard *-part.ly))
47 # scores for target local-WWW (duh)
52 # scores for target mutopia
54 mutopia-examples=$(name) $(parts)
59 $(outdir)/%-book.ps: $(outdir)/%.ps
61 pstops '2:0L(11.45in,0.25in)+1L(11.45in,5.6in)' $<.tmp $@
64 # Catch-all target: type `make foo' to make out/foo.ps,
65 # or make `foo-book' to make out/foo-book.ps
68 @echo Making $@ from $<
71 # Also clean hand-compiled stuff in cwd
73 local-clean: local-auto-gen-clean
75 # Compose string from two parts: must not remove myself.
76 auto-gen-tag=Generated
77 auto-gen-tag+= automatically by
80 rm -f `grep -l '$(auto-gen-tag)' *`