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.

--
С уважением, Александр Гавенко.

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to