User forums > Using Code::Blocks
Custom command build and waiting file generation command
Bruno38:
Hello Code::blocks community.
I am using custom command build to generate assembler file before object file.
The commands are follow :
ch38 -cpu=2600a:24 -regparam=3 -include="$HEW_DIR\include","..\..\SCOTTC","..\..\SCOTTC\HITACHI","..\..\SCOTTC\HITACHI\ACQ","..\..\SCOTTC\HITACHI\BOO","..\..\SCOTTC\HITACHI\CAN","..\..\SCOTTC\HITACHI\CIP","..\..\SCOTTC\HITACHI\MDB","..\..\SCOTTC\HITACHI\RES","..\..\SCOTTC\HITACHI\SEP","..\..\SCOTTC\HITACHI\SYS","..\..\SCOTTC\HITACHI\Hitachi\serie" -message -code=asmcode -object=$(TARGET_OBJECT_DIR)SCOTTC\HITACHI\CIP\$file_name.src -show=nostatistics,tab=4 -speed=register,switch,shift,struct,expression,loop=2,inline=105 -byteenum $file -lang=c -nologo -nolist
asm38 -cpu=2600a:24 -include="$HEW_DIR\include","..\..\SCOTTC","..\..\SCOTTC\HITACHI","..\..\SCOTTC\HITACHI\ACQ","..\..\SCOTTC\HITACHI\BOO","..\..\SCOTTC\HITACHI\CAN","..\..\SCOTTC\HITACHI\CIP","..\..\SCOTTC\HITACHI\MDB","..\..\SCOTTC\HITACHI\RES","..\..\SCOTTC\HITACHI\SEP","..\..\SCOTTC\HITACHI\SYS","..\..\SCOTTC\HITACHI\Hitachi\serie" -nodebug -goptimize -object=$object $(TARGET_OBJECT_DIR)SCOTTC\HITACHI\CIP\$file_name.src -errorpath -nologo -nolist
But when I launch the build of this file I have an error. I have to launch again to generate the expected object file.
Is there a mean to put a script between the two command build file which waiting the .src file generate by the 1st command before executing the 2nd command ?
Best regards for all.
Bruno
oBFusCATed:
You're supposed to pass a single command there. You could probably use a script file which would execute both commands.
stahta01:
The link I am posting may or may not help you. I really do not understand your exact problem.
http://wiki.codeblocks.org/index.php/Adding_support_for_non_C/C%2B%2B_files_to_the_build_system
Tim S.
sodev:
I guess this only happens when using parallel builds, both commands will be put into the execution queue and distributed to different threads and executed in parallel. In this case putting a WAIT between the commands will empty the queue before processing the second command. If you have more of these files this will slow down the parallel build speed.
I would also suggest the approach mentioned by stahta01 to build these files, unless you can't supply all the required parameters in a generic way.
oBFusCATed:
--- Quote from: sodev on October 01, 2020, 09:59:49 pm ---I guess this only happens when using parallel builds, both commands will be put into the execution queue and distributed to different threads and executed in parallel. In this case putting a WAIT between the commands will empty the queue before processing the second command. If you have more of these files this will slow down the parallel build speed.
--- End quote ---
Are you sure the build queue in C::B works in this way? If you're can you show the place in the code where this happens? I think you're wrong and this isn't what is happening.
Navigation
[0] Message Index
[#] Next page
Go to full version