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: Philip Guenther
Subject: Re: Running one Makefile from another in an "isolated" way
Date: Tue, 27 Oct 2020 12:07:36 -0900

On Tue, Oct 27, 2020 at 5:38 AM Nikolay Shaplov <dhyan@nataraj.su> wrote:

> Hi!
>
> I am trying to use make system to build and run some projects. Some META
> build
> system.
> But these projects also uses make build system, and when I am run one make
> from another I am getting "No such file or directory" error, which is not
> there when I am running same command from bash.
>
> How to reproduce. I am working with postgres sources, so download latest
> source, i.e. https://www.postgresql.org/ftp/source/v13.0/
> ./confiugre it and in some separate dir write a Makefile that runs make
> form
> the dir with the sources
>
> all:
>         make -C /home/nataraj/test/make-ci/zzz/build/postgres
>
> and then run make, it will finish with "No such file or directory" error.
>

Yep.  This is presumably a bug in the postgres build system.  The
workaround is to add "unset MAKELEVEL; " at the start of the recipe, ala:

all:
         unset MAKELEVEL; ${MAKE} -C
/home/nataraj/test/make-ci/zzz/build/postgres

I don't recall the details of why MAKELEVEL causes the postgres build to
trip up, but unsetting it has worked for years at $DAYJOB.


Philip Guenther


reply via email to

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