Hello,

As part of my build process I need to:

   - Generate a file with gcc, called via tup
   - Immediately modify that file by calling another executable

To do this, I used the following commands:


: $(MY_ROOT)/<objgroup> |> $(TC_DIR)/bin/gcc $(LDFLAGS) $(LDLIBS) %<objgroup
> -o %o |> ../bld/_bin/$(PROJECT_NAME).elf | ../bld/_bin/$(PROJECT_NAME).map
: ../bld/_bin/$(PROJECT_NAME).elf |> $(TC_DIR)/bin/objcopy -O ihex %f %o |> 
../bld/_bin/$(PROJECT_NAME).hex
: ../bld/_bin/$(PROJECT_NAME).map |> $(API_DIR)/Tools/crc32.exe %f %o 
FFFFFFFF 0 |> ../bld/_bin/$(PROJECT_NAME).hex
: ../bld/_bin/$(PROJECT_NAME).elf |> $(TC_DIR)/bin/size %f |>


Tup is not a fan:


tup error: Unable to create output file '../bld/_bin\tuptest.hex' because 
it is already owned by command 21868.
 - [21868] 
src/[C:/Tools/Compiler/HIGHTEC/TRICORE/3.4.6.1/bin/tricore-objcopy -O ihex 
../bld/_bin\tuptest.elf ../bld/_bin\tuptest.hex]
tup error: Error parsing Tupfile line 5
  Line was: ': ../bld/_bin/$(PROJECT_NAME).map |> 
$(API_DIR)/Tools/crc32.exe %f %o FFFFFFFF 0 |> 
../bld/_bin/$(PROJECT_NAME).hex'


I can of course use a shell to call the exec after Tup runs, but then I get 
a warning that the file was modified outside of Tup.


What's the best way to handle this?

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to