From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5941 invoked by alias); 4 Mar 2010 14:58:08 -0000 Received: (qmail 5931 invoked by uid 22791); 4 Mar 2010 14:58:07 -0000 X-SWARE-Spam-Status: No, hits=0.3 required=5.0 tests=AWL,BAYES_00,FORGED_YAHOO_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from kuber.nabble.com (HELO kuber.nabble.com) (216.139.236.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Mar 2010 14:58:04 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NnCV0-0000Mc-6L for gcc-help@gcc.gnu.org; Thu, 04 Mar 2010 06:58:02 -0800 Message-ID: <27781832.post@talk.nabble.com> Date: Thu, 04 Mar 2010 14:58:00 -0000 From: mahmoodn To: gcc-help@gcc.gnu.org Subject: using variables in makefile MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg00064.txt.bz2 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:: /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.