AnsweredAssumed Answered

Pre & Post Build command syntax and symbols.

Question asked by Colin on May 4, 2010
Latest reply on May 6, 2010 by GlenA

Hi  (DavidS?),

  I'm also extracting version information like Thomas Gebhardt in Create a text-file during the build-process and like gpetrowitsch in Conditional Post-Build option I'm looking for more documentation on the pre/Post-build options.

 

My prefered enviroment is unix (and so cygwin under  XP).

Using a post build command like:

  bash -c 'strings "Debug/display.doj" |grep Build >"Debug/boot.h";date >>"Debug/boot.h"'

works even if it looks clumsy.

 

I find however, that:

   bash -c 'strings "Debug/display.doj" | grep Build | "../Utilities/bootheader.exe" "Debug/targetfile.ldr" '

is turned into:

   bash -c  strings Debug\display.doj | grep Build | ..\Utilities\bootheader.exe Debug\targetfile.ldr

which of course fails (wrong slashes).  While :

   bash -c 'echo -n "#define SoftwareRevision " |tee version.h ;echo -n $(read num <build.num ;echo -n $((num+1))|tee build.num)_|tee -a version.h; /cygdrive/c/Program\ Files/SlikSvn/bin/svnversion.exe .|tee -a version.h'

turns into:

    bash -c 'echo -n "#define SoftwareRevision " |tee version.h ;echo -n $(read num <build.num ;echo -n $((num+1))|tee build.num)_|tee -a version.h; /cygdrive/c/Program\ Files/SlikSvn/bin/svnversion.exe .|tee -a version.h'

and works OK (slashes left untouched).

 

Is there a clear description of what manipulations the IDE does to the string before passing it to DOS?

ie. How single and double quotes are handled and what slashes are changed.

What is the escape character to get it to leave things alone?

 

Secondly, the above example and the examples in these forums, all have been hard coded to a particular Configuration

(eg Debug).  Can the command refer to the Configuration symboliclly?  eg $(CONFIG)\targetfile.ldr

 

Are there any symbols that are expanded or passed through in the environment that relate to configuration,

output directory, project name, project directory etc?

I notice that VDSP, ADI_DIR, VDSP_INTERMEDIATE and UNIDIR expand to the install directory, what others are there?

 

(VDSP 5.0,  Update 7)

 

Regards,

 

Colin Moloney

Outcomes