public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* using variables in makefile
@ 2010-03-04 14:58 mahmoodn
  2010-03-04 15:28 ` John (Eljay) Love-Jensen
  0 siblings, 1 reply; 3+ messages in thread
From: mahmoodn @ 2010-03-04 14:58 UTC (permalink / raw)
  To: gcc-help


In my makefile I have these lines:
GPGPUSIM_ROOT := $(GPGPUSIM_ROOT)
include $(NVIDIA_CUDA_SDK_LOCATION)/C/common/common.mk

I have set two variables in bash.rc file. The results for echo are:
mahmood@magma:~$ echo $GPGPUSIM_ROOT
/home/mahmood/gpgpusim/gpgpu-sim_v2.1.1b

mahmood@magma:~$ echo $NVIDIA_CUDA_SDK_LOCATION
/home/mahmood/NVIDIA_GPU_Computing_SDK

Now when I run the makefile I get this error:
Makefile:<line number>: /C/common/common.mk: No such file or directory
make: *** No rule to make target `/C/common/common.mk'.  Stop.

I have searched to find why environment variables don't work in makefile,
but didn't find anything useful. I am not expert in makefile structures but
I have compiled makefiles that contain 
-I$(VARIABLE)/include and they are successfull. So what is the difference
here?

-- 
View this message in context: http://old.nabble.com/using-variables-in-makefile-tp27781832p27781832.html
Sent from the gcc - Help mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: using variables in makefile
  2010-03-04 14:58 using variables in makefile mahmoodn
@ 2010-03-04 15:28 ` John (Eljay) Love-Jensen
  2010-03-05  7:07   ` mahmoodn
  0 siblings, 1 reply; 3+ messages in thread
From: John (Eljay) Love-Jensen @ 2010-03-04 15:28 UTC (permalink / raw)
  To: mahmoodn, gcc-help

Hi mahmoodn,

You question is off topic for this forum.

This is a GCC forum.

Your question is a Make question.

I do not say this to chastise.  I mention it so that you may ask your question on the appropriate forum, so as to get answers from people who are more familiar with that domain -- and as such the answers will probably be more quickly answered and more accurately answered.

That being said...

You should read the documentation on Make on how it uses environment variables.

6.9 Variables from the Environment
http://www.gnu.org/software/make/manual/html_node/Environment.html

You should also verify that your environment variables are exported.  If they are not exported, then they are not visible to child processes.

HTH,
--Eljay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: using variables in makefile
  2010-03-04 15:28 ` John (Eljay) Love-Jensen
@ 2010-03-05  7:07   ` mahmoodn
  0 siblings, 0 replies; 3+ messages in thread
From: mahmoodn @ 2010-03-05  7:07 UTC (permalink / raw)
  To: gcc-help


Thanks, I wasn't aware of gnu-make forum. I will post it there. Please delete
this thread from this forum.


John (Eljay) Love-Jensen wrote:
> 
> Hi mahmoodn,
> 
> You question is off topic for this forum.
> 
> This is a GCC forum.
> 
> Your question is a Make question.
> 
> I do not say this to chastise.  I mention it so that you may ask your
> question on the appropriate forum, so as to get answers from people who
> are more familiar with that domain -- and as such the answers will
> probably be more quickly answered and more accurately answered.
> 
> That being said...
> 
> You should read the documentation on Make on how it uses environment
> variables.
> 
> 6.9 Variables from the Environment
> http://www.gnu.org/software/make/manual/html_node/Environment.html
> 
> You should also verify that your environment variables are exported.  If
> they are not exported, then they are not visible to child processes.
> 
> HTH,
> --Eljay
> 
> 

-- 
View this message in context: http://old.nabble.com/using-variables-in-makefile-tp27781832p27790572.html
Sent from the gcc - Help mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-05  7:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-04 14:58 using variables in makefile mahmoodn
2010-03-04 15:28 ` John (Eljay) Love-Jensen
2010-03-05  7:07   ` mahmoodn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).