Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adv Help?: Custom Builds and Macros

Status
Not open for further replies.

vbbartlett

Programmer
Feb 9, 2005
5
0
0
US
I have an old project that was compiled with scripts however the scrips are failing so I want to move the project into VC++. Problems is that the scripts actually preprocessed some of the files with defines that were based on the prjs location. Thus the prj would sit in usr/local/prj/{name}/{build}/{release}/src. The preprocessing script used sed to capture the name,build, and release and then create a define SREL_BLD, which then was used on the preprocess command

pwd = usr/local/prj/s5k/14.0/x/src
excerp from the script:(s5k is the prj name in this case)

set ID = `pwd | sed "s/.*\/s5k\/\(.*\)\.\(.*\)\/\(.*\)\/src/\1 \2 \3/"`
set SREL_BLD = "'BUILD $ID[1].$ID[3] RELEASE:$ID[1].$ID[2]'"

cl /C /TC /DNT86 /DWIN32 /DUNICODE /D_UNICODE /DFORTRAN /DREL_BLD="$SREL_BLD" ...


Is there anyway to duplicate this behavior in VC++? Only thing I can come up with is environment variables. But this step could be forgotten and improper values used, it also means restarting the project everytime the values change. I just can load a workspace and compile it...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top