LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-19-2006, 06:07 PM   #1
Peter Shepard
Member
 
Registered: Apr 2005
Posts: 96

Rep: Reputation: 15
makefile settings


Hello,

I am trying to run a make command in a directory. In this directory sits a makefile file. When the the compiler gets to the command:

usage.msg: usage.txt
echo '/* GENERATED CODE, DO NOT EDIT */' > $@.tmp
stringify $< >> $@.tmp
mv -f $@.tmp $@

I get the following error:

stringify usage.txt >> usage.msg.tmp
/bin/sh: stringify: not found
make: *** [usage.msg] Error 127

The stringify command is in my PATH and comes up when I type it on the command line but obviously not with this makefile?

Any ideas.

Thanks
 
Old 12-21-2006, 10:50 AM   #2
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 727

Rep: Reputation: 74
Hi.

I have run with a trivial Makefile to try to replicate the error you report. I tried executing a local script, a shell script in a $HOME/bin directory, a builtin command (echo), and an alias.

The only way I can elicit the message (other than to use a command that was clearly not found in my PATH) was to use an alias . Aliases are not usually exported, so although they look like commands, they couldn't be used in Makefile without special preparation.

Post the result of:
Code:
whereis stringify
cheers, makyo
 
Old 12-21-2006, 11:00 AM   #3
Peter Shepard
Member
 
Registered: Apr 2005
Posts: 96

Original Poster
Rep: Reputation: 15
whereis stringify

Hi Makyo,

I have it working now. If I set my path in the /etc/environment folder to

which stringify output:
/home/pedro/bin/i686/stringify, it works as user but not as root?

Thanks,

Peter
 
Old 12-21-2006, 12:24 PM   #4
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 727

Rep: Reputation: 74
Hi, Peter.
Quote:
Originally Posted by Peter Shepard
... it works as user but not as root?
Yes, root and user will almost certainly have different settings for PATH. Use:
Code:
echo $PATH
while as user and while as root to see the differences. To see root PATH be certain to use su with a minus sign:
Code:
su -
to make sure you are using the environment of root ... cheers, makyo

( edit 1: typo )

Last edited by makyo; 12-24-2006 at 04:53 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
automake, makefile, makefile.in and makefile.am Fond_of_Opensource Linux - Newbie 1 09-12-2006 09:35 PM
what is the meaning of Makefile,Makefile.am,Makefile.in cynthia_thomas Linux - General 3 12-08-2005 06:00 AM
How to modify makefile.in or makefile.am QiangWan Linux - Newbie 1 05-17-2005 12:07 PM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 04:57 AM
generate Makefile from Makefile.in without calling ./configure ? chris78 Programming 2 05-02-2004 01:23 PM


All times are GMT -5. The time now is 04:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration