Date: Tue, 18 Mar 2003 23:07:25 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Guido van Rooij <guido@gvr.org> Cc: Guy Helmer <ghelmer@palisadesys.com>, "" <audit@FreeBSD.ORG> Subject: Re: /bin/sh flag NO_HISTORY Message-ID: <20030318225521.M4509@gamplex.bde.org> In-Reply-To: <20030318095509.GA70239@gvr.gvr.org> References: <FPEBKMIFGFHCGLLKBLMMCENKCBAA.ghelmer@palisadesys.com> <20030318095509.GA70239@gvr.gvr.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 Mar 2003, Guido van Rooij wrote: > On Mon, Mar 17, 2003 at 02:11:53PM -0600, Guy Helmer wrote: > > --- /usr/src/bin/sh/Makefile Mon Mar 17 10:38:03 2003 > > +++ Makefile Mon Mar 17 10:34:07 2003 > > @@ -14,8 +14,12 @@ > > # utilities of the same name are handled with the associated manpage, > > # builtin.1 in share/man/man1/. > > > > +.if !defined(NO_HISTORY) > > DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} > > LDADD+= -ll -ledit -ltermcap > > +.else > > +CFLAGS+=-DNO_HISTORY > > +.endif > > Could you please do this the other way around: > .if defined(NO_HISTORY) > CFLAGS+=-DNO_HISTORY > .else > DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} > LDADD+= -ll -ledit -ltermcap > .endif > > I think double negations don't add in readbility. I agree with supporting NO_HISTORY in some way and not using double negatives. However, it's not really necessary to provide a global knob for every possible -D option. I sometimes test compiling sh with -DNO_HISTORY (too see how much bloatier the library bloat has become). I just use something like "make CC='cc -DNOHISTORY'". For more global builds like picobsd it would be better to hack on COPTS and fix COPTS to work right. I think removing unused libraries from the command line has no effect, at least for static linkage, so a knob outside of CC/CFLAGS/COPTS is not needed. Removing the used library libl has the effect of breaking the build. libl has nothing to do with history. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030318225521.M4509>