On Tue, Oct 27, 2020 at 5:38 AM Nikolay Shaplov <[email protected]> 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
