Re: "make check" with non-GNU make

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "make check" with non-GNU make
Date: 2017-08-09 03:44:11
Message-ID: 31395.1502250251@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)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)
rm -rf '$(abs_top_builddir)'/tmp_install
$(MKDIR_P) '$(abs_top_builddir)'/tmp_install/log
$(MAKE) -C '$(top_builddir)' DESTDIR='$(abs_top_builddir)'/tmp_install install >'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1
endif
$(if $(EXTRA_INSTALL),for extra in $(EXTRA_INSTALL); do $(MAKE) -C '$(top_builddir)'/$$extra DESTDIR='$(abs_top_builddir)'/tmp_install install >>'$(abs_top_builddir)'/tmp_install/log/install.log || exit; done)
endif
endif

I'm not real clear on how make invoking gmake would end up affecting
gmake's initial value of MAKELEVEL, but I bet the problem is somewhere
around there.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2017-08-09 04:03:00 Re: dubious error message from partition.c
Previous Message Tom Lane 2017-08-09 03:34:13 Re: dubious error message from partition.c