From: Valentin Villenave <valentin@villenave.net>
Date: Thu, 21 Apr 2016 15:35:35 +0000 (+0200)
Subject: 'embed-source-code should disregard Scheme-generated input
X-Git-Tag: release/2.19.41-1~7^2~1
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7d3fa8cb4799303da8e5fd2ead35f1ac32180157;p=lilypond.git

'embed-source-code should disregard Scheme-generated input

(... for now at least).

This fixes the include-string.ly regtest, and a few others,
that previously could not be compiled when enabling
the -dembed-source-code switch.
---

diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm
index d3234b3329..ca3372ca92 100644
--- a/scm/framework-ps.scm
+++ b/scm/framework-ps.scm
@@ -483,8 +483,11 @@
   (if (ly:get-option 'embed-source-code)
       (let ((source-list (delete-duplicates
                           (remove (lambda (str)
-                                    (string-contains str
-                                      (ly:get-option 'datadir)))
+                                    (or
+                                     (string-contains str
+                                       (ly:get-option 'datadir))
+                                     (string=? str
+                                       "<included string>")))
                             (ly:source-files)))))
          (display "\n/pdfmark where
 {pop} {userdict /pdfmark /cleartomark load put} ifelse" port)