Details
Description
The TEMPLATE rule doesn't care about your `cmd` value:
rule TEMPLATE
|
command = $SCONS_INVOCATION $out
|
description = Rendering $out
|
pool = scons_pool
|
restat = 1
|
But if you have a stanza like this in your SCons:
env.Command(
|
target=[
|
'feature_flag_test.idl',
|
],
|
source=[
|
'#buildscripts/cheetah_source_generator.py',
|
'feature_flag_test.idl.tpl',
|
'$BUILD_DIR/mongo/util/version/releases.yml',
|
],
|
action=[
|
'$PYTHON ${SOURCES[0]} -o ${TARGETS[0]} ${SOURCES[1]} ${SOURCES[2]} ${MONGO_VERSION}',
|
],
|
# Ensure that that SCons is used to produce this file rather than Ninja, to avoid spurious
|
# dependency cycles due to how we manage generated sources with Ninja.
|
NINJA_TEMPLATE=True,
|
)
|
It ends up in the `cmd` stanza of the sole invocation of the `TEMPLATE` rule:
build build/aib_make_archive.py build/cached/mongo/config.h $
|
build/cached/mongo/idl/feature_flag_test.idl build/cached/mongo/util/version_constants.h $
|
build/cached/resmoke.ini build/cached/third_party/third_party_shim.cpp $
|
build/cached/third_party/wiredtiger/wiredtiger.h: TEMPLATE src/mongo/config.h.in $
|
buildscripts/cheetah_source_generator.py src/mongo/idl/feature_flag_test.idl.tpl $
|
src/mongo/util/version/releases.yml src/mongo/util/version_constants.h.in $
|
src/third_party/wiredtiger/src/include/wiredtiger.in | $
|
buildscripts/cheetah_source_generator.py src/mongo/util/version/releases.yml $
|
src/mongo/idl/feature_flag_test.idl.tpl @install_dir@$ install//usr/locala/bin
|
cmd = /Users/acm/.virtualenvs/mongo/bin/python buildscripts/cheetah_source_generator.py -o $
|
build/cached/mongo/idl/feature_flag_test.idl src/mongo/idl/feature_flag_test.idl.tpl $
|
src/mongo/util/version/releases.yml 5.1.0-alpha-1746-g1cf0b1f
|
env = export PATH='/usr/local/bin:/opt/bin:/bin:/usr/bin';export $
|
PATHOSX='/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin';
|
This is harmless, since TEMPLATE isn't going to honor it, but it is confusing when reading the generated ninja file and is probably something we should avoid doing.