Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2009 16:02:05 -0400
From:      Coleman Kane <cokane@FreeBSD.org>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: MAKE_JOBS_SAFE with gmake
Message-ID:  <1237924925.1735.11.camel@localhost>
In-Reply-To: <49C937F1.4000406@FreeBSD.org>
References:  <49C937F1.4000406@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-V3TP+94fUMQKGBALYFgB
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Tue, 2009-03-24 at 12:43 -0700, Doug Barton wrote:
> Question,
>=20
> I'm testing my ports for MAKE_JOBS_SAFE-ness, and came across this
> message when building xscreensaver (which uses gmake):
>=20
> gmake[1]: warning: jobserver unavailable: using -j1.  Add `+' to
> parent make rule.
>=20
> I have zero gmake fu, can anyone help me make sense of that? The good
> news is that the build finished successfully ...
>=20
>=20
> Doug
>=20

I'll give it a stab, as I've dealt with this when trying to write a "one
makefile to rule them all" build system recently (in other words, I
maintain a collection of 200+ packages and my makefile attempts to call
$(MAKE) within those subdirectories).

The GNU make process for some reason was not able to determine the type
of your "make" that was used for building a target of the following
flavor:

mytarget: deps dep2 ...
	$(MAKE) -C $(mytargetdir) mytarget

Supposedly, GNU make is supposed to recognize that $(MAKE) above is a
"make program" and not a "normal program" (such as install, BSD make,
sed, etc....). In the event that it is calling a compatible GNU make
program, it can (through some means I don't fully understand) provide
access to its job pool to the "child" (the make process that will be
executed in the target above). This allows, for instance, you to pass -j
4 to the parent make process, and it will guarantee that no more than
four jobs get run, even if there are subdirs-within-subdirs, etc....

Something is preventing this detection from succeeding in your case. I
see this a lot as well (in my own make system), but I've chosen to
ignore it in my environment. I think, in my case, that I am using
$(MAKE) within an $(eval ...) block and the $(MAKE) gets expanded before
the $(eval ...) does, making the GNU make program actually see something
like this, before it actually builds the target list:
mytarget: deps dep2 ...
	/usr/local/bin/gmake -C $(mytargetdir) mytarget

Which may confuse it.

Here's a link to the ambiguous description on the GNU make website:
http://www.gnu.org/software/automake/manual/make/Error-Messages.html


--=20
Coleman Kane

--=-V3TP+94fUMQKGBALYFgB
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEABECAAYFAknJPDoACgkQcMSxQcXat5eFvwCfYwfkAUvznkOAoeZ+AQMER9yr
YtYAnR0kcfZaEGNycxQM0FZ7SeXCz8Hr
=UgOp
-----END PGP SIGNATURE-----

--=-V3TP+94fUMQKGBALYFgB--




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