|
Question : running a batch file before compilation
|
|
I have an old project with a makefile. I try running it from the developer. I used to run a batch file that sets all environment vars (like include,path lib etc...). How can I tell the developer to first run this batch ? or how can I put a directive in the make file to that ? Thanks
|
|
Answer : running a batch file before compilation
|
|
In your batch file, you must set some environment variables. for instance:
in you batch file which must be called before the make file, set some environment variables. (i.e MyBatch.bat) set MYCFG=My Config has been setted. set INCLUDE=... set LIB=...
then in your make file, # check if the MyBatch.bat has been runed. !IF "$(MYCFG)" != "" ..... # do something other command in your make file .... !ELSE !MESSAGE You should first run MyBatch.bat !ENDIF
Good Luck.
|
|
|