help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regarding running shell script from Makefile


From: Paul Smith
Subject: Re: Regarding running shell script from Makefile
Date: Mon, 14 May 2007 07:30:25 -0400

On Mon, 2007-05-14 at 03:02 -0700, gshejin wrote:
> But, my requirement is to have the PATH defined in Makefile and then
> just run the make mkp, which should execute the shell script and other
> scritps which are there in /myhome/tools/bin. But I am encountering
> the following error.
> 
> /bin/sh: line 1: mkproduct: command not found
> Error during mkproduct...
> 
> I hope this explains the problem I am facing.

It does, but you forgot to show us the part of your makefile where you
set the PATH.  Setting PATH in your makefile WILL work for the scenario
you show here, so if it's not working for you that means you didn't do
it right.  And since you didn't show us how you did it, we can't say
what you did wrong.


On Mon, 14 May 2007 11:52:59 +0100, Dave Korn wrote:
> export PATH:=/myhome/tools/bin:$PATH

This is not correct.  You need to use the make variable $(PATH), not the
shell variable $PATH, since you're in a makefile:

export PATH := /myhome/tools/bin:$(PATH)

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]