Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Feb 2022 11:44:20 +0100
From:      Markus Hoenicka <markus.hoenicka@mhoenicka.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: gmake calls make in SUBDIRS
Message-ID:  <575c5ec81196a70b2027f838fe79da78@mhoenicka.de>
In-Reply-To: <72e6c66349485327c07ed2500dd17959@mhoenicka.de>
References:  <72e6c66349485327c07ed2500dd17959@mhoenicka.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 2022-02-05 17:05, schrieb Markus Hoenicka:
> Hi,
> 
> my apologies if this is just the result of not actively developing for
> a couple of years. I've picked up again maintaining a piece of
> software with a top-level Makefile.am which defines several
> subdirectories using the SUBDIRS variable. My lazy butt used lots of
> the oh so convenient GNU make specific pattern rules back then. This
> never used to be a problem though. Just running gmake on the top-level
> Makefile would call gmake for all subdirectories. This behaviour seems
> to have changed at some point between the days of yore and yesterday.
> At present, gmake returns an error complaining about the unknown
> pattern rules, i.e. gmake calls make in the subdirectories. I can cd
> into a subdirectory and call gmake. Or I run "MAKE=gmake gmake" in the
> top-level directory. Either way, the build goes fine. I ran autogen.sh
> and autoreconf to avoid that any old configuration stuff is outdated,
> to no avail. Am I missing something here?
> 
> My system is: FreeBSD wombat 12.2-RELEASE-p7 FreeBSD 12.2-RELEASE-p7
> GENERIC  amd64
> 
> thanks
> Markus

Thanks for the suggestions which I received off-list.

I think I've sorted out the problem. Turns out it is crucial to set 
MAKE=gmake when running ./configure. This makes sure that gmake will be 
used in the subdirs:

$ MAKE=gmake ./configure [options]
$ gmake

I guess this is what I did back then without ever adding it to the 
documentation.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?575c5ec81196a70b2027f838fe79da78>