make and PATH
- From: Anders Christensen <goookt2006@xxxxxxxxxx>
- Date: Wed, 12 Sep 2007 09:46:48 -0700
Hi NG,
I have a problem with paths together with make.
I'd like my Makefile to execute a program in a specific working
directory.
My rule looks something like this
%.in %.out:
cd $(dir $*.in) && \
myprogram.exe $(notdir $*.in)
My test target looks something like this
test: wanted\path\mytarget.out wanted2\path2\mytarget2.out
wanted3\path3\mytarget3.out
For some reason myprogram.exe is unknown and I get this output when
running make:
cd wanted\path\ && \
myprogram.exe mytarget.in
'myprogram.exe' is not recognized as an internal or external command,
operable program or batch file.
make: *** [wanted\path\mytarget.out] Error 1
The path to myprogram.exe is in my PATH variable and I have no problem
running it if I manually navigate to wanted\path\ to execute it.
The strange thing is that there's no error if I change the Makefile to
%.IN %.OUT:
cd $(dir $*.IN)
myprogram.exe $(notdir $*.IN)
....but then the working directory for myprogram.exe is not wanted\path
\ as I want it to be.
What could be the problem? I'd appreciate any hint!
../Anders.
.
- Follow-Ups:
- Re: make and PATH
- From: Gianni Mariani
- Re: make and PATH
- Prev by Date: Re: Using nCurses Inside Existing Program
- Next by Date: Re: How do I know if a process is being blocked?
- Previous by thread: How do I know if a process is being blocked?
- Next by thread: Re: make and PATH
- Index(es):
Relevant Pages
|