]> git.donarmstrong.com Git - lilypond.git/blob - make/ly.make
Doc-es: update Usage/Suggestions.
[lilypond.git] / make / ly.make
1 #!/usr/bin/make
2 #
3 # Mutopia Makefile Project
4 #
5 # Rename this file to GNUmakefile, and issue `make help'
6 #
7
8
9 #
10 # Magic: find and include LilyPond's StepMake rules
11 #
12 # 0: try local tree
13 # 1: follow LILYPOND_DATADIR
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
18 #
19 make-root=$(wildcard $(depth)/make)
20 make-root?=$(wildcard $(LILYPOND_DATADIR)/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
26 ifneq ($(make-root),)
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
32 else
33 $(error can't find LilyPond's stepmake installation)
34 endif
35 #
36
37
38 #
39 # Mutopia/user targets.
40 # This needs some work.
41 #
42
43 #
44 # Name of mutopia project
45 #
46 name=book
47 tarball=$(name)
48 parts=$(patsubst %.ly,%,$(wildcard *-part.ly))
49
50 #
51 # scores for target local-WWW (duh)
52 #
53 examples=
54
55 #
56 # scores for target mutopia
57 #
58 mutopia-examples=$(name) $(parts)
59
60 # moved to ly-rules.make
61 # Timothy's booklet
62 #
63 #$(outdir)/%-book.ps: $(outdir)/%.ps
64 #       psbook $< $<.tmp
65 #       pstops  '2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)' $<.tmp $@
66
67 #
68 # Catch-all target: type `make foo' to make out/foo.ps,
69 # or make `foo-book' to make out/foo-book.ps
70 #
71 %: $(outdir)/%.ps
72         @echo Generated $< for target $@.
73
74 #
75 # Also clean hand-compiled stuff in cwd
76 #
77 local-clean: local-auto-gen-clean
78
79 # Compose string from two parts: must not remove myself.
80 auto-gen-tag=Generated
81 auto-gen-tag+= automatically by
82
83 local-auto-gen-clean:
84         rm -f `grep -l '$(auto-gen-tag)' *`
85         rm -f *.dvi *.png
86