]> git.donarmstrong.com Git - lilypond.git/blob - make/ly.make
patch::: 1.3.130.jcn6
[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: follow LILYPONDPREFIX
13 # 1: try source tree
14 # 2: try installed tree in $HOME
15 # 3: try system installed tree
16 #
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
22 ifneq ($(make-root),)
23 $(message running from $(make-root))
24 depth=$(make-root)/..
25 LOCALSTEPMAKE_TEMPLATES=ly mutopia
26 include $(make-root)/stepmake.make
27 else
28 $(error can't find LilyPond's stepmake installation)
29 endif
30 #
31
32
33 #
34 # Mutopia/user targets.
35 # This needs some work.
36 #
37
38 #
39 # Name of mutopia project
40 #
41 name=book
42 tarball=$(name)
43 parts=$(patsubst %.ly,%,$(wildcard *-part.ly))
44 mutopia-examples=$(name) $(parts)
45
46 #
47 # Timothy's booklet
48 #
49 $(outdir)/%-book.ps: $(outdir)/%.ps
50         psbook $< $<.tmp
51         pstops '2:0L(11.45in,0.25in)+1L(11.45in,5.6in)' $<.tmp $@
52
53 #
54 # Catch-all target: type `make foo' to make out/foo.ps,
55 # or make `foo-book' to make out/foo-book.ps
56 #
57 %: $(outdir)/%.ps
58         @echo Making $@ from $<
59
60 #
61 # Also clean hand-compiled stuff in cwd
62 #
63 localclean: local-auto-gen-clean
64
65 local-auto-gen-clean:
66         rm -f `grep -l 'Generated automacially by'  *`
67         rm -f *.dvi *.png