help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

shell function and $PATH


From: Cristian Morales Vega
Subject: shell function and $PATH
Date: Thu, 17 Dec 2015 09:17:48 +0000

When using this Makefile

------------
export PATH:=la:$(PATH)

$(info $(shell echo $$PATH))

all:
    @echo $$PATH
------------

The output is
$ make
/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
la:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin

The PATH is not being exported to the shell from $(shell), but it is
to the shell used to run the rules.

This is being a problem for me because I am trying to use $(shell
pkg-config --cflags <pkg>) with pkg-config from the OpenWRT
(https://openwrt.org/) toolchain, which is actually a script calling
pkg-config.real... in the PATH from OpenWRT.

I am using make 4.0, from Fedora 23. Is this a bug, or expected? If
it's expected... any suggestion about how to solve my pkg-config
problem?

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]