| 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."
|
|
|