Dag-Erling,

On Thu, Sep 04, 2008 at 09:26:28PM +0200, Dag-Erling Smørgrav wrote:
> Jeremie Le Hen <[EMAIL PROTECTED]> 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 >
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.
 #
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to