Subject: Re: bin/2932:
To: Curt Sampson <cjs@portal.ca>
From: David Brownlee <abs@anim.dreamworks.com>
List: current-users
Date: 09/28/1997 21:58:30
On Sun, 28 Sep 1997, Curt Sampson wrote:

> On Sun, 28 Sep 1997, Erik Bertelsen wrote:
> 
> > Yes, at one point, I suggested to a set of flags that may be used
> > in /etc/mk.conf, e.g. with the following names:
> > 
> >      BUILD_SENDMAIL=NO
> >      BUILD_UUCP=NO
> > maybe even
> >      BUILD_INET_APPS=NO
> > etc.
> 
> Etc. indeed! This does not appear to scale well.
> 
	How about having a 'NOBUILD' variable in /etc/mk.conf, which
	could be set to a space separated list of programs, then 
	bsd.prog.mk would do nothing if PROG was in that list.

	Sounds like it might scale very nicely :)

	I've just hacked up an implemention - its possibly not for the
	weak of stomach, but it seems to work. Diffs from bsd.prog.mk
	below. If anyone could give me hints on how to tidy it up I'd
	be greatful :)

		David/abs

*** bsd.prog.mk.orig	Sun Sep 28 21:20:35 1997
--- bsd.prog.mk	Sun Sep 28 21:51:52 1997
***************
*** 56,61 ****
--- 56,71 ----
  LIBY?=		${DESTDIR}/usr/lib/liby.a
  LIBZ?=		${DESTDIR}/usr/lib/libz.a
  
+ .if defined(NOBUILD)
+ NOBUILD!=if echo " ${NOBUILD} " | egrep -q " ${PROG} " ; \
+     then echo YES ; else echo NO ; fi
+ .if (${NOBUILD} == "YES") 
+ NOBUILD!=echo "Not building ${PROG}, (NOBUILD set)." 1>&2 ; echo YES
+ .undef PROG
+ .undef MAN
+ .endif
+ .endif
+ 
  .if defined(SHAREDSTRINGS)
  CLEANFILES+=strings
  .c.o: