tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Sets, subsets, syspkgs, and MK*
NetBSD provides MK* variables to enable / disable features. Its definition
is unclear. How is it different from USE_* or HAVE_*?
I think we should have a concept of "subsets". Which is subset of "sets",
and superset of "syspkgs". "Subsets" is also the unit of "conditional build";
if you do -V MKLVM=no, you don't build LVM and LVM files are not installed
into ${DESTDIR}.
If you look close at distrib/sets/lists/*/* you'll see lines like:
distrib/sets/lists/base/mi:
220 ./sbin/ipf base-ipf-root
ipfilter
221 ./sbin/ipppctl base-netutil-root
222 ./sbin/ispppcontrol base-obsolete
obsolete
223 ./sbin/lmcctl base-obsolete
obsolete
224 ./sbin/lvm base-lvm-root
lvm
So I wonder; why line 220 and 224 have 3 columns. Why not line 221?
220 (ipfilter) and 224 (lvm) supports conditional build. 221 does *not*
support. Why not? Because the way we support conditional build is hard to
maintain:
usr.sbin/Makefile:
55 # IP Filter
56 .if (${MKIPFILTER} != "no")
57 SUBDIR+=ipf
58 .endif
Such knowledges are scattered all around the tree.
I think we should concentrate these knowledges into a single place. Maintain
build (sub) directory as a set for each "subsets". We should be able to build
only "netutil", like "build.sh build_subsets="netutil".
This leads to a question how to deal with conditions across subsets like
MKDEBUGLIB:
distrib/sets/lists/base/mi:
2241 ./usr/lib/i18n/libBIG5.a comp-i18n-lib
2242 ./usr/lib/i18n/libBIG5_g.a -unknown-
debuglib
:
2294 ./usr/lib/libasn1.a comp-krb5-lib
kerberos
2295 ./usr/lib/libasn1_g.a -unknown-
debuglib,kerberos
2296 ./usr/lib/libasn1_p.a comp-krb5-proflib
profile,kerberos
Here which subsets should *_g.a belong to?
Probably MKDEBUGLIB should be just an alias to enable all MK*DEBUGLIB.
Actually those lib*_g.a files are not even subsets; subset of subsets.
Because you can't build only libBIG5_g.a or libasn1_g.a. I haven't sorted
out these and don't have a good word to represent this.
Masao
--
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635
Home |
Main Index |
Thread Index |
Old Index