Makefile.inc1.patch

Garrett Cooper yaneurabeya at gmail.com
Thu Jan 23 21:30:15 UTC 2014


On Jan 23, 2014, at 1:03 PM, Simon J. Gerraty <sjg at juniper.net> wrote:

> [+brooks]
> 
> On Thu, 23 Jan 2014 12:53:31 -0800, Garrett Cooper writes:
>> 	Here=92s the working patch. The difference between this one and =
>> the prior version is that you have to explicitly override -DNO_TESTS =
>> when building lib/atf* (Simon: do you have any comments?):
> 
> Not crazy about frobbing ${MAKE}

Neither am I, but .export is a bmake only feature. I’m still using fmake :(.

>> -.if ${MK_TESTS} !=3D "no"
>> +.if defined(WITH_ATF) || ${MK_TESTS} !=3D "no"
>> +# Make sure WITH_ATF overrules -DNO_TESTS
>> +.if !defined(WITH_ATF)
>> +MAKE+=3D		-DWITH_ATF
>> +.endif
> 
> Would it make sense to have ATF or TESTS depend on the other?

This functionality was removed several months ago.. otherwise I would totally agree :/.

> As is that can't be done, since one cannot always safely include
> bsd.own.mk from the tree.
> 
> I'd really like to see the WITH[OUT]_ processing separated to its own
> makefile (I use options.mk) so that it can always be safely used - even
> with an option list specific to a given makefile.

Yeah, I would too [in an ideal world], but a lot of stuff is dependent per-TARGET/TARGET_ARCH and compiler, so things get super complicated really quickly in that regard.
> 
> The semantics in bsd.own.mk are quite broken and result in a lot of complex
> dancing to keep things working.

In this case though, this is complex dancing due to how the different stages stack upon one another in the build process and the fact that meta make isn’t here (yet), so things have to be built in the right order. This method is one that I’ve been using for quite some time without any side effects on multiple machines...

>> 
>> 	I unrolled most of the local changes to Makefile.inc1 on my =
>> github fork so it=92ll be easier to spot if you diff it against my tree.

Thanks,
-Garrett


More information about the freebsd-testing mailing list