[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
exported vs command line variables
From: |
Pietro |
Subject: |
exported vs command line variables |
Date: |
Tue, 20 Sep 2016 15:28:19 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Hi,
I have noticed that there is a difference between the two scenarios
listed below:
i) make CC=arm-linux-gnueabihf-gcc CPPFLAGS=[..]
ii) export CPPFLAGS=[..] [RET]
make CC=arm-linux-gnueabihf-gcc
I was told that the difference is that in the second case Make
will append stuff to the CPPFLAGS variable exported while in the first
case the command line argument will override the settings contained
in the makefile itself.
The following example, literally pasted from another thread could
clarify the matter :
var := $(shell echo "echo hi" >say_hi.sh; chmod +x say_hi.sh; say_hi.sh)
all: ; @echo $(var)
Calling make with the PATH environment variable either way yields:
$ make PATH=$PATH:.
/bin/sh: 1: say_hi.sh: not found
$ PATH=$PATH:. make
hi
Is this working as intended ? What is the difference between the two ?
I have posted a question at the general make mailing list and I was told
that this might be a bug, I would love to have a clarification - is it a bug ?
Thanks
P.
- exported vs command line variables,
Pietro <=
- Re: exported vs command line variables, Paul Smith, 2016/09/20
- Re: exported vs command line variables, Pietro, 2016/09/21
- Re: exported vs command line variables, David Boyce, 2016/09/23
- Re: exported vs command line variables, Paul Smith, 2016/09/23
- Re: exported vs command line variables, Philip Guenther, 2016/09/23
- Re: exported vs command line variables, David Boyce, 2016/09/23
- Re: exported vs command line variables, Philip Guenther, 2016/09/23
- Re: exported vs command line variables, Paul Smith, 2016/09/24
- Re: exported vs command line variables, David Boyce, 2016/09/25
- Re: exported vs command line variables, Paul Smith, 2016/09/25