vbbartlett
Programmer
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 scripts5k 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...
pwd = usr/local/prj/s5k/14.0/x/src
excerp from the scripts5k 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...