[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
May be bug in export PATH and $(shell ...).
From: |
Oleksandr Gavenko |
Subject: |
May be bug in export PATH and $(shell ...). |
Date: |
Fri, 11 Jun 2010 11:29:40 +0300 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 |
Just do:
$ mkdir test
$ cat <<EOF >test/test.sh
#!/bin/sh
echo I am HERE
EOF
$ cat <<EOF >Makefile
export PATH := test:$(PATH)
$(shell test.sh)
all:
test.sh
EOF
$ make
make: temp.sh: Command not found # from $(shell ...)
temp.sh
I am HERE # from target command
So export PATH work for spawned process under target command and don't work
for $(shell ...).
When work with proprietary toolchain (like MSVC, Keil, IAR, Intel C) on
Windows under
Cygwin build env I use such techniques:
TOOL_ROOT = cygwin_like_path
export PATH := $(TOOL_ROOT)/bin:$PATH
And it work fine for target commands like:
my.o: my.c
proprietary-compiler.exe /c /OUT:$@ $<
But for some tricks I try use:
ifeq '' '$(shell which proprietary-compiler.exe)'
....
endif
And see that 'which' not found proprietary-compiler.exe.
--
С уважением, Александр Гавенко.
- May be bug in export PATH and $(shell ...).,
Oleksandr Gavenko <=