|
Re: Executing Multiple Post Build Commands [message #1707587 is a reply to message #1707500] |
Mon, 07 September 2015 16:38 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
I don't really know the answer but it seems reasonable that the pre and post build commands are placed in the makefile in a way that the actual build is sandwiched between them. Afterwards, the makefile is sent to the builder. You get to choose what the builder is but it defaults to make. Make doesn't do anything with recipe lines except send them to a shell.
The answer then depends on what builder you are using to process the makefiles and what that builder uses to process the commands. If you are running linux and using GNU Make then the shell is likely bash. If you are running under Windows, the recipe is likely executed by cmd.exe.
So you need to know what is actually executing the command lines. If you aren't using make, then you should go to the proper forum(s) for the answer -- either a forum for the builder or a forum for the command executor.
If command executor is bash, the commands are separated by a semicolon ';'
If it's cmd.exe, the commands are separated by ampersane '&' when running from the command line but a double '&&' if the command is in a batch file or script. I think, anyway. I don't have an easy way to experiment. See: https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true
Scroll down to Using multiple commands and conditional processing symbols
If it's actually Eclipse executing the pre/post build commands then the documentation doesn't explicitly state it. The current documentation says, "Custom build steps are not verified for correctness in any regard and are passed exactly as entered into the build stream." Whatever that means. It does say to separate the commands with ';' but I think that's because the system shell is being used -- either directly or via the makefile -- and it is assumed to be bash. I could be wrong, of course.
http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_prop_build_settings_steps.htm
There is also the possibility that ';' is the correct separator but your command line somehow causes it to be missed.
I trust, you haven't been sitting on your hands waiting for an answer. If all else fails, you could just execute a script which, in turn, executes the multiple commands.
|
|
|
Powered by
FUDForum. Page generated in 0.06981 seconds