SHELL 변수로 설정되지 않으면 /bin/sh가 되므로
bash에서 지원하는 popd pushd 등이 봉인..
환경 변수 등을 끌어 가지 않으므로.. 결론은 Makefile 별로 설정을 해주어야 한다.
5.3.2 Choosing the Shell
The program used as the shell is taken from the variable SHELL
. If this variable is not set in your makefile, the program /bin/sh is used as the shell. The argument(s) passed to the shell are taken from the variable .SHELLFLAGS
. The default value of .SHELLFLAGS
is -c
normally, or -ec
in POSIX-conforming mode.
Unlike most variables, the variable SHELL
is never set from the environment. This is because the SHELL
environment variable is used to specify your personal choice of shell program for interactive use. It would be very bad for personal choices like this to affect the functioning of makefiles. See Variables from the Environment.
Furthermore, when you do set SHELL
in your makefile that value is not exported in the environment to recipe lines that make
invokes. Instead, the value inherited from the user’s environment, if any, is exported. You can override this behavior by explicitly exporting SHELL
(see Communicating Variables to a Sub-make
), forcing it to be passed in the environment to recipe lines.
[링크 : https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html]
[링크 : https://www.gnu.org/software/make/manual/html_node/Variables_002fRecursion.html]
'프로그램 사용 > make, configure' 카테고리의 다른 글
make order (0) | 2016.06.16 |
---|---|
make /bin/sh: 1: pushd: not found 에러 (0) | 2016.06.08 |
makefile := = 차이점 (0) | 2016.06.04 |
make 의존성 파일? (0) | 2015.12.18 |
make 암시적 룰 (0) | 2015.12.18 |