|
-
December 9th, 2010, 01:32 PM
#1
Customizing exe search PATH inside makefile
Hello,
Is it possible to modify or customize binaries search path y a nmake command or macro?
Assuming I have a system general PATH and I want nmake to lookup CL.exe in different directory than in the system wide PATH string...
Thx
-
December 9th, 2010, 03:58 PM
#2
Re: Customizing exe search PATH inside makefile
Not sure if you can do it inside the make file, however you could create a batch file that changes the PATH and then calls nmake.
It would look something like this:
Code:
set path=%PATH%;C:\myspecialpath1;d:\anotherdir\myspecialpath2
nmake ....
That would append your paths to the existing path variable, and applies as long as you're within that command window.
Hope that helps.
Be sure to rate those who help!
-------------------------------------------------------------
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
-
December 9th, 2010, 04:05 PM
#3
Re: Customizing exe search PATH inside makefile
and is is possible to call that bath file from inside makefile?
app.exe : $(OBJS)
call changeoath.bat
cl.exe "$@" $<
-
December 9th, 2010, 05:14 PM
#4
Re: Customizing exe search PATH inside makefile
 Originally Posted by krmed
Code:
set path=%PATH%;C:\myspecialpath1;d:\anotherdir\myspecialpath2
Hint: If you want to override .exe files that are already present in the current search path, you should prepend your additional directories to the path since it is searched from fromt to back. The command to do that would then look like this:
Code:
set path=C:\myspecialpath1;d:\anotherdir\myspecialpath2;%PATH%
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
-
December 9th, 2010, 05:23 PM
#5
Re: Customizing exe search PATH inside makefile
Okay thx
so
writing
PATH=c:\myvcdir;d:\mytolsdir;$(PATH)
has no effect?
One more thing I struggle, how to terminate lines that have to end with '\' token,
e.g.
ICLInstDir = D:\develop\CPP\bin\
would instruct nmake to merge with following line as \ token is taken as line continuor, silly
Could it be prefixed with a special char that instructs nmake to take \ literally, not a control character?
-
December 9th, 2010, 05:31 PM
#6
Re: Customizing exe search PATH inside makefile
 Originally Posted by Anakunda
so
writing
PATH=c:\myvcdir;d:\mytolsdir;$(PATH)
has no effect?
At least not in a batch file. I'm not really familiar with the makefile syntax though...
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|