]> granicus.if.org Git - postgresql/commit
Prevent passing down MAKELEVEL/MAKEFLAGS from non-GNU make to GNU make.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 9 Aug 2017 16:05:53 +0000 (12:05 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 9 Aug 2017 16:06:14 +0000 (12:06 -0400)
commita784d5f215ff509a96bf70a8d98131eace0eec15
treefc9026bc847a72194d9b07c1aa6cd7fc4fd7b806
parent9cc510fe89a3f013091bf7234ca893ba74a15094
Prevent passing down MAKELEVEL/MAKEFLAGS from non-GNU make to GNU make.

FreeBSD's make, for one, sets the MAKELEVEL environment variable when
invoking commands.  In the special Makefile we provide to hand off control
from a non-GNU make to GNU make, this causes GNU make to think it is a
child make invocation rather than top-level.  That interferes with the hack
added in commit dcae5facc to cause the temp-install tree to be made only by
the top-level invocation of gmake.  Unset the variable to prevent that.

Likewise unset MAKEFLAGS, which FreeBSD's make also sets, and which could
easily confuse gmake.  There are no reports of actual trouble from that,
but it seems better to be proactive.

Back-patch to 9.5 where dcae5facc came in.

Thomas Munro, hacked a bit more by me

Discussion: https://postgr.es/m/CAEepm=1ueww35AXTkt1A3gyzZUqv5XCzh8RUNvJZAQAW=eOhVw@mail.gmail.com
Makefile