Follow up on this old thread http://forums.codeblocks.org/index.php/topic,11278.0.html (http://forums.codeblocks.org/index.php/topic,11278.0.html)
I am looking at doing some pre and post commands.
And, I have NOT figured out how to use $(CMD_NULL) in CB in a way that does NOT cause an error
In Pre-build steps
Gives this when ran
Running target pre-build steps
CMD /C dir > NUL
In Pre-build steps
Gives this when ran
Running target pre-build steps
CMD /C dir > cmd /c NUL
File Not Found
Tim S.
I am thinking this line
m_Macros[_T("CMD_NULL")] = cmd + _T("NUL");
should be instead
m_Macros[_T("CMD_NULL")] = _T("NUL");
in file macrosmanager.cpp.
Edit: Added git formatted patch file.
Tim S.
I am thinking these two macros would be useful.
CMD_CP_UPDATE is to copy files only if file is newer.
CMD_IGNORERR is to reset the OS error value to the no error value.
I have only tested them on Windows 32 bit at this time.
I tested them using these pre build steps
CMD /C dir
$(CMD_MKDIR) "a/b/c" > $(CMD_NULL) $(CMD_IGNORERR)
$(CMD_CP_UPDATE) *.cbp a
Attached Git formatted patch.
Tim S.