Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1650)

Unified Diff: third_party/scons/scons-local/SCons/Tool/pdf.py

Issue 17024: Update to SCons 1.2.0. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/scons/scons-local/SCons/Tool/pdf.py
===================================================================
--- third_party/scons/scons-local/SCons/Tool/pdf.py (revision 7505)
+++ third_party/scons/scons-local/SCons/Tool/pdf.py (working copy)
@@ -1,6 +1,7 @@
"""SCons.Tool.pdf
Common PDF Builder definition for various other Tool modules that use it.
+Add an explicit action to run epstopdf to convert .eps files to .pdf
"""
@@ -27,13 +28,15 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/pdf.py 3603 2008/10/10 05:46:45 scons"
+__revision__ = "src/engine/SCons/Tool/pdf.py 3842 2008/12/20 22:59:52 scons"
import SCons.Builder
import SCons.Tool
PDFBuilder = None
+EpsPdfAction = SCons.Action.Action('$EPSTOPDFCOM', '$EPSTOPDFCOMSTR')
+
def generate(env):
try:
env['BUILDERS']['PDF']
@@ -45,12 +48,24 @@
prefix = '$PDFPREFIX',
suffix = '$PDFSUFFIX',
emitter = {},
- source_ext_match = None)
+ source_ext_match = None,
+ single_source=True)
env['BUILDERS']['PDF'] = PDFBuilder
env['PDFPREFIX'] = ''
env['PDFSUFFIX'] = '.pdf'
+# put the epstopdf builder in this routine so we can add it after
+# the pdftex builder so that one is the default for no source suffix
+def generate2(env):
+ bld = env['BUILDERS']['PDF']
+ #bld.add_action('.ps', EpsPdfAction) # this is covered by direct Ghostcript action in gs.py
+ bld.add_action('.eps', EpsPdfAction)
+
+ env['EPSTOPDF'] = 'epstopdf'
+ env['EPSTOPDFFLAGS'] = SCons.Util.CLVar('')
+ env['EPSTOPDFCOM'] = '$EPSTOPDF $EPSTOPDFFLAGS ${SOURCE} -o ${TARGET}'
+
def exists(env):
# This only puts a skeleton Builder in place, so if someone
# references this Tool directly, it's always "available."
« no previous file with comments | « third_party/scons/scons-local/SCons/Tool/packaging/zip.py ('k') | third_party/scons/scons-local/SCons/Tool/pdflatex.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698