Hi Paul, Thanks for the quick reply. Let me put my problem in a clear way. I have third party shell script which are used for generating and compiling there source files. This scritps inturn calls some more scripts and all these are located in one common place let's say /myhome/tools/bin. In my make file i have the following thing to build the product. The MY_DIR has the third party source. The script name is mkproduct which builds the thrid party source.
================================= mkp: @echo "Mkproduct..." @echo "-----------------------------------------" @if [ ! "$(MY_DIR)" ] ;then echo "The Atmos Directory path is not set..."; else echo "Atmos Directory path is set" ;if [ -d $(MY_DIR) ] ;then echo "$(MY_DIR) exists...Starting mkproduct..." ; echo "mkproduct options:$(ARGS_MKP)";cd $(MY_DIR); mkproduct $(ARGS_MKP); if [ $$? -eq 0 ] ;then echo "Mkproduct ended successfully..." ;else echo "Error during mkproduct..." ;fi ;else echo "$(MY_DIR) does not exist" ;fi;fi ================================= In normal scenerio I will do the following thing $export PATH=/myhome/tools/bin:$PATH $make mkp This will build the third party source. 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. Thanks in advance. -sg gshejin wrote: > > Hi , > > I am having a scenerio where in I have to execute a shell script from the > Makefile. If I am exporting the path where the shell script is located in > the PATH variable and then run the make the script get's executed. But if > i am not exporting the path in the shell and then run the make it throws > an error, some thing like this > > /bin/sh: line 1: mkproduct: command not found > > > now the problem is that i do not want to every time export the path of the > scritp in the shell and then run the make. I have tried exporting the path > variable in the Makefile it self , but still i am encountering the error. > > Is there any way to resolve this problem. > > Thanks in advance. > -Gautam > -- View this message in context: http://www.nabble.com/Regarding-running-shell-script-from-Makefile-tf3727692.html#a10600959 Sent from the Gnu - Make - Help mailing list archive at Nabble.com. _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
