help-make
[Top][All Lists]
Advanced

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

Re: Running one Makefile from another in an "isolated" way


From: Kaz Kylheku (gmake)
Subject: Re: Running one Makefile from another in an "isolated" way
Date: Tue, 27 Oct 2020 12:20:09 -0700
User-agent: Roundcube Webmail/0.9.2

On 2020-10-27 03:56, Nikolay Shaplov wrote:
My guess is that make have tendency to work in "recusive" way remembering variables or something else across the runs. But here I need to make and isolated run, so parent make session were isolated from child one. How can I
do this?

Hi Nikolay,

One thing I can immediately think of is to use the env utility with the -i option. This is specified by POSIX. The -i option causes env to start with an empty environment, so that only those environment variables specified on the env
command line will be present.

    all:
env -i FOO=bar ... make -C /home/nataraj/test/make-ci/zzz/build/postgres

Replace FOO=bar ... by the actual environment variables your Makefile
needs; you almost certainly need to set a PATH, and a few others.






reply via email to

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