Skip to content

TEMPFILE doesn't work on commands with curly brackets #1449

@bdbaddog

Description

@bdbaddog

This issue was originally created at: 2006-08-10 11:21:29.
This issue was reported by: issues@scons.
issues@scons said at 2006-08-10 11:21:29

With the endless flood of compiler defines and include paths that our developers produce, I have to switch CCCOM and CXXCOM tools to use TEMPFILE, just like LINKCOM and SHLINKCOM. The way I do it is this:

for cmd in ['CCCOM', 'SHCCCOM', 'CXXCOM', 'SHCXXCOM']:

This works fine. However, when I try to add PCHCOM to the list, scons fails:

Building C:\<path>\file.pch and C:\<path>\file.obj with action:
  ${TEMPFILE('$CXX $CXXFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $_CPP_NODEP_INCFLAGS /c $SOURCES /Fo${TARGETS[1]} /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS $PCHPDBFLAGS')}
scons: building terminated because of errors.
scons: *** [C:\<path>\file.pch] Syntax error `EOL while scanning single-quoted string (line 1)' trying to evaluate `${TEMPFILE('$CXX $CXXFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $_CPP_NODEP_INCFLAGS /c $SOURCES /Fo${TARGETS[1]}'

The problem seems to be with double curly brackets: one for the TEMPFILE, another for TARGETS[0] and TARGETS[1]. Once I replace the latter two with hard-coded names everything works.

Note for developers:
In 0.96.91, the regexp that fails is apparently _dollar_exps_str in Util.py.

oxfv said at 2006-08-10 11:53:15
Sorry, wasn't logged in when entered the bug
--Valera Fooksman, a.k.a. oxfv

stevenknight said at 2008-07-01 11:26:03
Target milestone and priority per bug party triage.
Reassign to Jim; quoting issue.

mightyllamas said at 2009-03-04 07:34:51
Yep, looks like a limitation in subst. This should probably be dealt with as part of the revamp of expressions that Greg started, whenever that happens.

_dollar_expr_str is in Subst.py now.

gregnoel said at 2009-03-19 00:26:16
Bug party triage. Collect issues involving substitution or quoting problems under a "subst" keyword.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TEMPFILELong-command-line handling with TEMPFILEVersion: 0.96.91bugpchPre-compiled header supportsubstProblems with quoting, substitution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions