Date: Thu, 2 Jan 1997 12:42:56 +1030 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: current@freebsd.org Subject: 'base' system partitioning Message-ID: <199701020212.MAA14844@genesis.atrad.adelaide.edu.au>
next in thread | raw e-mail | index | archive | help
OK people, here's a really simple proposal to encourage some
discussion on the classification of things and to make it easier to
test.
Consider the following patch to bsd.subdir.mk. Move directories
containing non-'base' items out of the SUBDIR entry and into
foo_SUBDIR lines _after_ the .include of bsd.subdir.mk. The
gymnastics are necessary to avoid inheriting definitions from higher
up, and mean that these changes can be selectively deployed rather
than requiring a huge sweep over the whole tree.
Note that TEXTPROC and DEVEL are arbitrary; if you can think of better
names or other categories, please suggest. If nobody is in violent,
rational opposition to this, how about I commit it and let the
anti-bloatists free?
See my post to hackers about DWIM on ${${FOO}} - I would prefer to
have the names of the categories in a variable inherited from
somewhere else and then iterate over them using .for, but it looks
like that would be hard work without using the shell.
Patch follows (beware snarf-n-barf damage)
--- /local1/playpen/2.2/src/share/mk/bsd.subdir.mk Sat Sep 21 01:47:07 1996
+++ bsd.subdir.mk Thu Jan 2 12:29:59 1997
@@ -1,10 +1,24 @@
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
# $Id: bsd.subdir.mk,v 1.11 1996/09/20 16:17:07 bde Exp $
+REAL_SUBDIR= ${SUBDIR}
+
+# Add non-base subdirs
+TEXTPROC_SUBDIR=
+.if !defined(NO_TEXTPROC)
+REAL_SUBDIR+= ${TEXTPROC_SUBDIR}
+.endif
+
+DEVEL_SUBDIR=
+.if !defined(NO_DEVEL)
+REAL_SUBDIR+= ${DEVEL_SUBDIR}
+.endif
+
+
.MAIN: all
_SUBDIRUSE: .USE
- @for entry in ${SUBDIR}; do \
+ @for entry in ${REAL_SUBDIR}; do \
(if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE}"; \
edir=$${entry}.${MACHINE}; \
@@ -17,7 +31,7 @@
${MAKE} ${.TARGET:realinstall=install} DIRPRFX=${DIRPRFX}$$edir/); \
done
-${SUBDIR}::
+${REAL_SUBDIR}::
@if test -d ${.TARGET}.${MACHINE}; then \
cd ${.CURDIR}/${.TARGET}.${MACHINE}; \
else \
--
]] Mike Smith, Software Engineer msmith@gsoft.com.au [[
]] Genesis Software genesis@gsoft.com.au [[
]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[
]] realtime instrument control. (ph) +61-8-8267-3493 [[
]] Unix hardware collector. "Where are your PEZ?" The Tick [[
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701020212.MAA14844>
