]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/stepmake/tex-rules.make
Build: Unify the rules and variables for xref-map files.
[lilypond.git] / stepmake / stepmake / tex-rules.make
index 96f2bd0ae864906181b14b93a46cc1019dff83ff..6751e5da9a03b292ae95b1535bcdbb0053d99928 100644 (file)
@@ -1,16 +1,36 @@
 
+$(outdir)/%.tex: %.tex
+       cp $< $@
 
 $(outdir)/%.dvi: $(outdir)/%.tex
        (cd $(outdir); tex \\nonstopmode \\input $(<F))
 
 $(outdir)/%.dvi: $(outdir)/%.latex
-       (cd $(outdir); \
-         latex \\nonstopmode \\input $(<F);\
-         bibtex $(basename $(<F));\
-         latex \\nonstopmode \\input $(<F);\
-         latex \\nonstopmode \\input $(<F);\
-       )
-
-$(outdir)/%.ps: $(outdir)/%.dvi
-       dvips -ta4 -o $@ $<
+       (cd $(outdir)&& \
+         latex \\nonstopmode \\input $(<F)&&\
+         (bibtex $(basename $(<F)) || true) && \
+         latex \\nonstopmode \\input $(<F)&&\
+         (makeindex $(basename $(<F)) || true) && \
+         latex \\nonstopmode \\input $(<F) )
+
+$(outdir)/%.pdf: $(outdir)/%.dvi
+       cd $(outdir) \
+               && dvips $(DVIPS_FLAGS) -t $(DVIPS_PAPERSIZE) \
+                       -o $(@F).pdfps $(<F) \
+               && gs -dCompatibilityLevel=1.2\
+                       -sPAPERSIZE=a4\
+                       -q\
+                       -dNOPAUSE\
+                       -dBATCH\
+                       -sDEVICE=pdfwrite\
+                       -sOutputFile=$(@F)\
+                       -dCompatibilityLevel=1.2\
+                       -sPAPERSIZE=a4\
+                       -c .setpdfwrite\
+                       -f $(@F).pdfps
+
+
+# without -dSAFER
+# gs 8.15 complains of safety of loading a ttf directly
+