[Scons-users] Command builder, how to execute svnrevision through action
Pierre-Luc Boily
pierreluc.boily at gmail.com
Tue May 28 16:20:40 EDT 2019
Hello,
I have the following Command builder :
tgt = env.Command(target = 'gwversion.h',
source = os.path.join('#', srcDir, '..', 'VERSION.txt'),
action = ['echo creating $TARGET',
'echo #define SVN_REVISION `svnversion -n` >
$TARGET ;',
'grep VERSION $SOURCE | awk -F"=" \'{printf (
"#define GW_VERSION \\"%s\\"\\n", $2)}\' >> $TARGET '
])
In the previous code, the following line is not appending to $TARGET :
echo #define SVN_REVISION `svnversion -n` > $TARGET
I think I have 2 problems
1- Command builder is not aware of svnversion, I have to use full path
2- Even with full path ('echo #define SVN_REVISION
`/opt/CollabNet_Subversion/bin/svnversion -n` > $TARGET), I have no luck, it
looks like Action doesn't like back quote
So, my question, how to make my Command builder above working properly? It
looks simple, I just want to execute to Actions...
thx
--
Sent from: http://scons.1086193.n5.nabble.com/Users-f16930.html
More information about the Scons-users
mailing list