lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tiny fixes for "Extract PDFmark" (issue 571420055 by address@hidden)


From: jonas . hahnfeld
Subject: Re: Tiny fixes for "Extract PDFmark" (issue 571420055 by address@hidden)
Date: Sat, 25 Jan 2020 01:19:27 -0800

Reviewers: lemzwerg,


https://codereview.appspot.com/571420055/diff/571400046/configure.ac
File configure.ac (right):

https://codereview.appspot.com/571420055/diff/571400046/configure.ac#newcode391
configure.ac:391: ["(Using Ghostscript >= 9.20 together with Extract
PDFmark"])
On 2020/01/25 09:15:10, lemzwerg wrote:
> I suggest to use the program's name.
> 
>   s/Extract PDFmark/extractpdfmark/

I wasn't sure either, but https://github.com/trueroad/extractpdfmark
says "Extract PDFmark" it's the full name of the project. But maybe we
should just change it for consistency.

Description:
Tiny fixes for "Extract PDFmark"

Individual changes:
1) Fix extractpdfmark not coming from PATH

If STEPMAKE_PROGS cannot find an optional program, it returns "false".
Checking for this value is better than requiring exactly
"extractpdfmark"
which does not hold if the program is not in PATH and the user
explicitly
sets the environment variable EXTRACTPDFMARK.

2) Fix extractpdfmark with GhostScript 9.50

GhostScript 9.50 defaults to -dSAFE, so the build system needs to pas
in -dNOSAFE explicitly.

3) Update message for optional extractpdfmark

>From my experiments, enabling Extract PDFmark rather increases the
required disk space. This is probably because the process produces
additional intermediate files. It only benefits the final PDF docs.

Please review this at https://codereview.appspot.com/571420055/

Affected files (+6, -5 lines):
  M configure.ac
  M make/lilypond-book-rules.make
  M stepmake/stepmake/texinfo-rules.make


Index: configure.ac
diff --git a/configure.ac b/configure.ac
index 
c6261aeb6abc224490b52458578dfe947133e37c..0cbd0c26b1e3ea6ebaa57cab801b151e18c37e11
 100644
--- a/configure.ac
+++ b/configure.ac
@@ -382,17 +382,15 @@ if test "$GS920_VERSION" -lt "$req"; then
     GS920=
     USE_EXTRACTPDFMARK=no
 fi
-if test "$EXTRACTPDFMARK" != "extractpdfmark"; then
+if test "$EXTRACTPDFMARK" == "false"; then
     EXTRACTPDFMARK=
     USE_EXTRACTPDFMARK=no
 fi
 if test "$USE_EXTRACTPDFMARK" != "yes"; then
     STEPMAKE_ADD_ENTRY(OPTIONAL,
-        ["(Optionally using Ghostscript >= 9.20 together with"])
+        ["(Using Ghostscript >= 9.20 together with Extract PDFmark"])
     STEPMAKE_ADD_ENTRY(OPTIONAL,
-        [" Extract PDFmark can significantly reduce the disk space required"])
-    STEPMAKE_ADD_ENTRY(OPTIONAL,
-        [" for building the documentation and the final PDF files.)"])
+        [" can significantly reduce the size of the final PDF files.)"])
 fi
 
 STEPMAKE_PROGS(MAKEINFO, makeinfo, REQUIRED, 6.1)
Index: make/lilypond-book-rules.make
diff --git a/make/lilypond-book-rules.make b/make/lilypond-book-rules.make
index 
f914bcc37574048bdeb463e6e9f9853547611e9a..98265fec230d36fdd35e07200c0eb6f3a3adaa0d
 100644
--- a/make/lilypond-book-rules.make
+++ b/make/lilypond-book-rules.make
@@ -43,6 +43,7 @@ $(outdir)/%.pdf:  $(outdir)/%.tex
 ifeq ($(USE_EXTRACTPDFMARK),yes)
        $(EXTRACTPDFMARK) -o $(outdir)/$*.pdfmark $(outdir)/$*.build/$*.pdf
        $(GS920) -dBATCH \
+                 -dNOSAFER \
                  -dNOPAUSE \
                  $(LILYPOND_BOOK_GS_QUIET) \
                  -sDEVICE=pdfwrite \
@@ -94,6 +95,7 @@ $(outdir)/%.pdf:  $(outdir)/%.xml
 ifeq ($(USE_EXTRACTPDFMARK),yes)
        $(EXTRACTPDFMARK) -o $(outdir)/$*.pdfmark $(outdir)/$*.tmp.pdf
        $(GS920) -dBATCH \
+                 -dNOSAFER \
                  -dNOPAUSE \
                  $(LILYPOND_BOOK_GS_QUIET) \
                  -sDEVICE=pdfwrite \
Index: stepmake/stepmake/texinfo-rules.make
diff --git a/stepmake/stepmake/texinfo-rules.make 
b/stepmake/stepmake/texinfo-rules.make
index 
f6398ae05c80b6d3d12e2e5c191420ce13844c69..26b392fc68282394f0da14111254aea6bea6c05a
 100644
--- a/stepmake/stepmake/texinfo-rules.make
+++ b/stepmake/stepmake/texinfo-rules.make
@@ -97,6 +97,7 @@ $(outdir)/%.pdf: $(outdir)/%.texi $(outdir)/version.itexi 
$(outdir)/%.pdf.omf $(
 ifeq ($(USE_EXTRACTPDFMARK),yes)
        $(EXTRACTPDFMARK) -o $(outdir)/$*.pdfmark $(outdir)/$*.tmp.pdf
        $(GS920) -dBATCH \
+                 -dNOSAFER \
                  -dNOPAUSE \
                  $(TEXINFO_GS_QUIET) \
                  -sDEVICE=pdfwrite \





reply via email to

[Prev in Thread] Current Thread [Next in Thread]