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)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_installinstall >>'$(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