]> git.donarmstrong.com Git - lilypond.git/blobdiff - make/mutopia-targets.make
patch::: 1.3.130.jcn5
[lilypond.git] / make / mutopia-targets.make
index 5c7011da3d8e43d3db48975237825d2d646288e2..994418db1008c2cc6cee01ac2ea4f3913c897fbc 100644 (file)
@@ -1,6 +1,8 @@
 
 .PHONY: mutopia png ps scores tar
 
+.PRECIOUS: $(outdir)/%.ps $(outdir)/%-book.ps
+
 all: $(OUT_FILES)
 
 local-WWW: $(ly_examples) $(fly_examples) $(ps_examples) $(png_examples)
@@ -14,10 +16,20 @@ convert-ly: local-convert-ly
 local-convert-ly:
        $(PYTHON) $(CONVERT_LY) -e *ly
 
+#
+# Also clean hand-compiled stuff in cwd
+#
+localclean: local-auto-gen-clean
+
+local-auto-gen-clean:
+       rm -f `grep -l 'Generated automacially by'  *`
+       rm -f *.dvi *.png
+
 tar:
        mkdir -p $(outdir)/$(tarball)
        cp -p *.ly $(outdir)/$(tarball)
        cd $(outdir) && tar czf $(tarball).tar.gz $(tarball)
+       rm -rf $(outdir)/$(tarball)
 
 png: $(png_examples)
 
@@ -31,8 +43,33 @@ mutopia-letter=$(mutopia-examples:%=out-letter/%.ps.gz)
 mutopia:
        $(MAKE) examples="$(mutopia-examples)" PAPERSIZE=letter local-WWW $(mutopia-letter)
 
+#
+# <NAME> and -book targets only available through ly.make template makefile;
+# too scary to install in LilyPonds make yet.
+#
+#
+
+ifeq (0,1)
+#
+# Timothy's booklet
+#
+$(outdir)/%-book.ps: $(outdir)/%.ps
+       psbook $< $<.1
+       pstops '2:0L(11.45in,0.25in)+1L(11.45in,5.6in)' $<.1 $@
+       rm -f $<.1
+
+#
+# Catch-all target: type `make foo' to make out/foo.ps,
+# or make `foo-book' to make out/foo-book.ps
+#
+%: $(outdir)/%.ps
+       @echo Making $@ from $<
+endif
+
 local-help:
        @echo -e "\
+  <NAME>      update $(outdir)/<NAME>.ps\n\
+  <NAME>-book update booklet $(outdir)/<NAME>-book.ps\n\
   convert-ly  convert all LilyPond sources\n\
   mutopia     update PNGs, PostScript a4 and letter of all mutopia-examples\n\
   png         update PNGs of all examples\n\