[Scons-users] Need Help - Renaming an input file does not re-trigger SCons builder
Basil Mathew
iambasilmathew at gmail.com
Fri Feb 2 01:30:17 EST 2018
Hello Bill,
Thank you for the reply, sorry about the coloring, intention was to make it
easier to read
What I meant to convey was that if I just rename one of the input file
without modifying the content (for e.g src/work/dds/gtypes_dds_1.grl to
src/work/dds/gtypes_dds.grl ), I do not see the action
"command_process_executor_builder" running.
I make the following change:
1. I rename the file src/work/dds/gtypes_dds_1.grl to
src/work/dds/gtypes_dds.grl in the file system
2. I change the SConstruct as shown below
result1 = env.Foo("__proc_done.txt", [
"src/work/dds/codeSymbols.grl",
"src/work/dds/gtypes_dds_1.grl",
"src/work/dds/iopt_memmap.grl",
"src/work/dds/@ecu_add_test.grl"
]
)
to
result1 = env.Foo("src/work/dds/codeSymbols.grl", [
"src/work/dds/codeSymbols.grl",
"src/work/dds/gtypes_dds.grl",
"src/work/dds/iopt_memmap.grl",
"src/work/dds/@ecu_add_test.grl"
]
)
Thank you
Basil
On Fri, Feb 2, 2018 at 10:50 AM, Bill Deegan <bill at baddogconsulting.com>
wrote:
> So if you change:
> result1 = env.Foo("__proc_done.txt", [
>
> "src/work/dds/codeSymbols.grl",
>
> "src/work/dds/gtypes_dds_1.grl",
>
> "src/work/dds/iopt_memmap.grl",
> "src/work/dds/@
> ecu_add_test.grl"
> ]
> )
>
> to
> result1 = env.Foo("src/work/dds/codeSymbols.grl", [
>
> "src/work/dds/codeSymbols.grl",
>
> "src/work/dds/gtypes_dds_1.grl",
>
> "src/work/dds/iopt_memmap.grl",
> "src/work/dds/@
> ecu_add_test.grl"
> ]
> )
>
> It doesn't rebuild?
> I'm not sure what you're saying you're changing which is not resulting in
> an action running.
> (Also please don't change the color of the text, it makes it quite hard to
> read)
>
> -Bill
> SCons Project Co-Manager
>
> On Thu, Feb 1, 2018 at 8:41 PM, Basil Mathew <iambasilmathew at gmail.com>
> wrote:
>
>> Hello all,
>>
>> I am fairly new to SCons and to Python; hence, please excuse if this is a
>> silly question.
>>
>> I am using SCons version "v2.4.0.rel_2.4.0:3365:9259ea1c13d7". I was
>> playing around with some very basic topics in SCons to get myself
>> acquainted with SCons when I came across the strange scenario that SCons
>> does not execute the builder when I rename one of the input file to a
>> target without changing its content. I was really surprised since I was
>> expecting the SCons to recognize that the input files list has
>> changed(though not its content) and execute the builder. Please see the
>> content of the SConstruct file that I have been using.
>>
>> import os
>> import sys
>> import SCons
>> import subprocess
>>
>> DefaultEnvironment(tools = [])
>>
>> input_files_list = []
>> process_option_list = []
>> process_exec_cmd_line = ''
>> target_name = ''
>>
>> def command_process_executor_builder(target, source, env):
>> target_file_path_name = target[0].get_abspath()
>>
>> print "############### Executing Process"
>>
>> return None
>>
>> def build():
>> global input_files_list, process_option_list, process_exec_cmd_line,
>> target_name
>>
>> env = DefaultEnvironment(tools = [])
>> a = Action(command_process_executor_builder, varlist=['my_arg',
>> 'PROCESS_EXEC_CMD_LINE', 'PROCESS_OPTION_LIST'])
>>
>> proc_exec_bldr = Builder(action = a)
>>
>> env['my_arg'] = 'default-value'
>> env['PROCESS_EXEC_CMD_LINE'] = process_exec_cmd_line
>> env['PROCESS_OPTION_LIST'] = process_option_list
>>
>> env.Append(BUILDERS = {'Foo' : proc_exec_bldr})
>>
>> result1 = env.Foo("__proc_done.txt", [
>>
>> "src/work/dds/codeSymbols.grl",
>>
>> "src/work/dds/gtypes_dds_1.grl",
>>
>> "src/work/dds/iopt_memmap.grl",
>> "src/work/dds/@
>> ecu_add_test.grl"
>> ]
>> )
>>
>>
>> build()
>>
>> I was wondering if this is the default behaviour of SCons when it comes
>> to renaming input files or if there is some mistake with the way I am using
>> SCons. If this is indeed the default behaviour of SCons, can some one let
>> me know the reason behind this.
>>
>> Thank you
>>
>> Basil Mathew
>>
>>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180202/48e16f04/attachment-0001.html>
More information about the Scons-users
mailing list