Date: Fri, 5 Sep 2008 09:00:28 +0200 From: Jeremie Le Hen <jeremie@le-hen.org> To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@des.no> Cc: freebsd-hackers@FreeBSD.org Subject: Re: Creation of the NO_SSP build knob Message-ID: <20080905070028.GN72107@obiwan.tataz.chchile.org> In-Reply-To: <8663pbzp97.fsf@ds4.des.no> References: <20080904124653.GK72107@obiwan.tataz.chchile.org> <20080904135200.GC31289@alpha.local> <86ljy857zz.fsf@ds4.des.no> <20080904141705.GL72107@obiwan.tataz.chchile.org> <86hc8w55mr.fsf@ds4.des.no> <20080904154138.GM72107@obiwan.tataz.chchile.org> <8663pbzp97.fsf@ds4.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
--xesSdrSSBC0PokLI
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Dag-Erling,
On Thu, Sep 04, 2008 at 09:26:28PM +0200, Dag-Erling Smørgrav wrote:
> Jeremie Le Hen <jeremie@le-hen.org> writes:
> > If SSP belongs to this list, then NO_SSP is an alias for WITHOUT_SSP.
> > But it will still not be possible to use WITH_SSP in src.conf or
> > command-line.
> > [...]
> > Shouldn't we have a knob that overrides whatever the user says, only for
> > internal use in the source tree? That was my original intent when
> > asking if I could add NO_SSP.
>
> That's *exactly* what NO_* does. Just add SSP to that list and replace
> WITHOUT_SSP with NO_SSP wherever it occurs in Makefiles in the tree.
I've just tested it with NO_SSP and I can confirm it doesn't work
despite the explicit comment above stating otherwise. By the way, the
code is nearly identical between the supported options and the compat
ones, I don't see how it could override the user settings:
186 #
187 # Supported NO_* options (if defined, MK_* will be forced to "no",
188 # regardless of user's setting).
189 #
190 .for var in \
191 INSTALLLIB \
192 MAN \
193 PROFILE \
194 SSP
195 .if defined(NO_${var})
196 WITHOUT_${var}=
197 .endif
198 .endfor
199
200 #
201 # Compat NO_* options (same as above, except their use is deprecated).
202 #
203 .if !defined(BURN_BRIDGES)
204 .for var in \
205 ACPI \
[...]
267 WPA_SUPPLICANT_EAPOL
268 .if defined(NO_${var})
269 #.warning NO_${var} is deprecated in favour of WITHOUT_${var}=
270 WITHOUT_${var}=
271 .endif
272 .endfor
273 .endif # !defined(BURN_BRIDGES)
The attached patch implements a behaviour that seems more correct
to me WRT the intent. What do you think of it?
Thanks!
--
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
--xesSdrSSBC0PokLI
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="NO_FOO.diff"
Index: bsd.own.mk
===================================================================
RCS file: /mnt/octobre/space/freebsd-cvs/src/share/mk/bsd.own.mk,v
retrieving revision 1.77
diff -u -r1.77 bsd.own.mk
--- bsd.own.mk 16 Jun 2008 07:23:12 -0000 1.77
+++ bsd.own.mk 5 Sep 2008 06:56:17 -0000
@@ -182,19 +182,6 @@
#
#
-# Supported NO_* options (if defined, MK_* will be forced to "no",
-# regardless of user's setting).
-#
-.for var in \
- INSTALLLIB \
- MAN \
- PROFILE
-.if defined(NO_${var})
-WITHOUT_${var}=
-.endif
-.endfor
-
-#
# Compat NO_* options (same as above, except their use is deprecated).
#
.if !defined(BURN_BRIDGES)
@@ -393,6 +380,19 @@
.endfor
#
+# Supported NO_* options (if defined, MK_* will be forced to "no",
+# regardless of user's setting).
+#
+.for var in \
+ INSTALLLIB \
+ MAN \
+ PROFILE
+.if defined(NO_${var})
+MK_${var}= no
+.endif
+.endfor
+
+#
# Force some options off if their dependencies are off.
# Order is somewhat important.
#
--xesSdrSSBC0PokLI--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080905070028.GN72107>
