Re: [HACKERS] "make check" with non-GNU make

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: [HACKERS] "make check" with non-GNU make
Дата
Msg-id CAEepm=0fnDoXaJnRQGk+FGGttgX7m2aqsmZfiNAT9tuTq7+sxw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] "make check" with non-GNU make  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] "make check" with non-GNU make  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Aug 9, 2017 at 3:44 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thomas Munro <thomas.munro@enterprisedb.com> writes:
>> Does anyone know why "make check" doesn't work on BSD systems if
>> tmp_install doesn't exist yet?  It's no big deal, you just have to run
>> "gmake check", but Makefile is supposed to do that for you and it
>> works fine for every other target.  No big deal, but it'd be nice to
>> unravel this mystery...
>
>> Specifically, if you run "make check" then it invokes
>> "/usr/local/bin/gmake check" for you, but it seem to skip the step
>> that builds tmp_install and so then pg_regress fails.
>
> Hmm, looking into Makefile.global.in, that step seems to be conditional on
> MAKELEVEL:
>
> temp-install:
> ifndef NO_TEMP_INSTALL
> ifneq ($(abs_top_builddir),)
> ifeq ($(MAKELEVEL),0)

Ah, right.  That coding is recommended in the GNU make manual to
distinguish from explicit invocation and recursive invocation.
FreeBSD make also seems to set MAKELEVEL.  Doing this fixes the
problem for me, though it feels a bit sneaky:

diff --git a/Makefile b/Makefile
index 72e9c83733..399e69540f 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ all check install installdirs installcheck
installcheck-parallel uninstall clean       \        if [ x"$${GMAKE+set}" = xset ]; then \          echo "Using GNU
makefound at $${GMAKE}"; \
 
-          $${GMAKE} $@ ; \
+          MAKELEVEL= $${GMAKE} $@ ; \        else \          echo "You must use GNU make to build PostgreSQL." ; \
    false; \
 

-- 
Thomas Munro
http://www.enterprisedb.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: 송기훈
Дата:
Сообщение: [HACKERS] Error : undefined symbol : LWLockAssign in 9.6.3
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] Error : undefined symbol : LWLockAssign in 9.6.3