X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=make%2Fly.make;h=f9a3f212d447e64408b41f804065d934bd209750;hb=212ca268e813cd72eca8c07e714e1b6669cba747;hp=69802512487946cd6966a39d3708ce41b588d171;hpb=0713e9256dc1f35299ce716cf29ddeab4ebca93b;p=lilypond.git diff --git a/make/ly.make b/make/ly.make index 6980251248..f9a3f212d4 100644 --- a/make/ly.make +++ b/make/ly.make @@ -9,21 +9,24 @@ # # Magic: find and include LilyPond's StepMake rules # -# First, try source tree -# Second, try installed tree in $HOME -# Third, try system installed tree +# 0: try local tree +# 1: follow LILYPOND_DATADIR +# 2: try source tree in home +# 3: try installed tree in $HOME +# 4: try system installed tree +# 5: try system installed tree # -# -##For testing installed lily -##make-root=$(wildcard $(HOME)/tmp/test/usr/share/lilypond/make) -# -# -make-root=$(wildcard $(HOME)/usr/src/lilypond/make) -make-root?=$(wildcard /usr/share/lilypond/make) +make-root=$(wildcard $(depth)/make) +make-root?=$(wildcard $(LILYPOND_DATADIR)/make) +make-root?=$(wildcard $(HOME)/usr/src/lilypond/make) +make-root?=$(wildcard $(HOME)/usr/share/lilypond/make) make-root?=$(wildcard /usr/share/lilypond/make) +make-root?=$(wildcard /usr/local/share/lilypond/make) +#make-root=/make ifneq ($(make-root),) -$(message running from $(make-root)) -depth=$(make-root)/.. +### some versions apparently choke on $(message) +### $(message running from $(make-root)) +depth:=$(make-root)/.. LOCALSTEPMAKE_TEMPLATES=ly mutopia include $(make-root)/stepmake.make else @@ -37,7 +40,47 @@ endif # This needs some work. # -parts=$(patsubst %.ly,%,$(wildcard *-part.ly)) +# +# Name of mutopia project +# +name=book tarball=$(name) -mutopia-examples=$(name) +parts=$(patsubst %.ly,%,$(wildcard *-part.ly)) + +# +# scores for target local-WWW (duh) +# +examples= + +# +# scores for target mutopia +# +mutopia-examples=$(name) $(parts) + +# moved to ly-rules.make +# Timothy's booklet +# +#$(outdir)/%-book.ps: $(outdir)/%.ps +# psbook $< $<.tmp +# pstops '2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)' $<.tmp $@ + +# +# Catch-all target: type `make foo' to make out/foo.ps, +# or make `foo-book' to make out/foo-book.ps +# +%: $(outdir)/%.ps + @echo Generated $< for target $@. + +# +# Also clean hand-compiled stuff in cwd +# +local-clean: local-auto-gen-clean + +# Compose string from two parts: must not remove myself. +auto-gen-tag=Generated +auto-gen-tag+= automatically by + +local-auto-gen-clean: + rm -f `grep -l '$(auto-gen-tag)' *` + rm -f *.dvi *.png