X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=make%2Fly.make;h=f9a3f212d447e64408b41f804065d934bd209750;hb=c4e6444c7b022fa314f7ca36e385fdf44127a7fd;hp=0a0d8a6f2ab3ca0aa6ca129729f4421ee912e565;hpb=d53a619ef343bc5a5e19699d011b873bc0cf86d8;p=lilypond.git diff --git a/make/ly.make b/make/ly.make index 0a0d8a6f2a..f9a3f212d4 100644 --- a/make/ly.make +++ b/make/ly.make @@ -1,126 +1,86 @@ #!/usr/bin/make +# # Mutopia Makefile Project # +# Rename this file to GNUmakefile, and issue `make help' +# + # -# For testing installed lily +# Magic: find and include LilyPond's StepMake rules # -make-root=$(wildcard $(HOME)/tmp/test/usr/share/lilypond/make) -#make-root=$(wildcard $(HOME)/usr/src/lilypond/make) +# 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 +# +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),) - -depth=$(make-root)/.. -LOCALSTEPMAKE_TEMPLATES=mutopia +### some versions apparently choke on $(message) +### $(message running from $(make-root)) +depth:=$(make-root)/.. +LOCALSTEPMAKE_TEMPLATES=ly mutopia include $(make-root)/stepmake.make - else - burp -# -# Minimalistic standalone part. I'd very much like to install make/* -# and stepmake/stepmake/* in /usr/share/lilypond, and junk this. +$(error can't find LilyPond's stepmake installation) +endif # -outdir=out -PAPERSIZE= -LY_FILES=$(wildcard *.ly) - -default: - echo $(DEP_FILES) - $(examples) -clean: - rm -f $(outdir)/* $(outdir)-letter/* - # -# stepmake/stepmake/files.ly +# Mutopia/user targets. +# This needs some work. # -DEP_FILES:=$(wildcard $(outdir)/*.dep) # -# stepmake/stepmake/generic-targets.make +# Name of mutopia project # -include $(outdir)/dummy.dep $(DEP_FILES) - -$(outdir)/dummy.dep: - -mkdir -p $(outdir) - touch $(outdir)/dummy.dep +name=book +tarball=$(name) +parts=$(patsubst %.ly,%,$(wildcard *-part.ly)) # -# make/mutopia-rules.make +# scores for target local-WWW (duh) # - -# don't junk intermediate .dvi files. They're easier to view than -# .ps or .png -.PRECIOUS: $(outdir)/%.dvi +examples= # -# should we dist ps-to-pngs? +# scores for target mutopia # -$(outdir)/%.png: $(outdir)/%.ps - ps-to-pngs $< - -mv $(name-stem)-page*.png $(outdir)/ - touch $@ - -$(outdir)/%.dvi: %.ly - ly2dvi --outdir=$(outdir) --dependencies $< - -mv $(basename $<)*.midi $(outdir) - -$(outdir)-$(PAPERSIZE)/%.dvi: %.ly - ly2dvi.py --outdir=$(outdir)-$(PAPERSIZE) --dependencies --papersize=$(PAPERSIZE) $< - -mv $(basename $<)*.midi $(outdir)-$(PAPERSIZE) +mutopia-examples=$(name) $(parts) - -# -# stepmake/stepmake/tex-rules.make +# moved to ly-rules.make +# Timothy's booklet # -$(outdir)/%.tex: %.tex - cp $< $@ - -$(outdir)/%.dvi: $(outdir)/%.tex - (cd $(outdir); tex \\nonstopmode \\input $(