round has been tested on Solaris/x86 and Linux hosts.
* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
preprocessors complain bitterly when they are encountered.
For now, terminate all lines with \n (and make each line its own
string literal). The author of this code can figure out how to
do the sed trick another way.
the term used in config(9), autoconf(9) and in Torek's paper.
Also remove (comment out) reference to the 4.4BSD config docs,
since they are not installed in usr/share/doc/smm/02.config and
possibly aren't relevant any longer. From comments made on
tech-kern by jhawk and tls.
- Don't bother emitting "#define NFOO 0" for defflag foo (whether or
not "options FOO" was given); it's really useful as is.
Until I recently started converting stuff from defopt to defflag,
nothing used defflag, and because defopt doesn't provide NFOO for FOO,
the NFOO behaviour shouldn't be missed. The NFOO stuff also added
a lot of #define namespace pollution that we'd rather avoid.
- Remove a couple of unused vars
restore the previous behaviour of packing locators.
Results in a 2.5KB increase in size for the current i386 GENERIC
kernel. My custom kernel resulted in a 12-byte increase.
a `machine' line. For each of these subarches, its
arch/${SUBARCH}/conf/files.${SUBARCH} is included, and
a symlink ${SUBARCH} -> arch/${SUBARCH}/include is made.
This will for a "richer structure" and easier code
sharing under sys/arch.
Make major() et al match current NetBSD implementation. In reality,
the code here in config which plays with these bits should be cleaned up
to treat major and minor separately. (They only reason they're being mashed
together is storage convenience.)
file, make command specified, and no flags or attrs-which-cause-inclusion
are spec'd. The notion is, if you change either of the last 2, it will
probably have very undesirable results, so only allow the make command to
be changed. override by clobbering the make command in the previous entry.
also, fix a bug where line number of original entry would get clobbered on
dup entry, so that if you had multiple dups the later ones would get bogus
initial definition info.
have a way to embed the revision number into the kernel's "uname -v"
output. The patch below does this, by generating a new keyword "ident"
that can be followed by any string, e.g.
ident "NOON-$Revision$"
will lead to
vvvvvvvvvvvvvvvvvvvvvv
char version[] = "NetBSD 1.4P (NOON-$Revision: 1.21 $) #37: Thu Jan
20 02:01:23 MET 2000\n feyrer@noon:/usr/cvs.local/src-current/sys/arch/i386/c
ompile/NOON\n";
This will lead to a version of "MYMACHINE-$Revision$" instead of the
kernel config file name. If "ident" is not present, the current behaviour
of using the kernel config file's name as identifier is used.
Implement by writing the ident to a file ("ident") in the compile dir,
which newvers.sh will pick up for generating the ident.
- fix emitrules() like emitfiles() to deal with the prefix (otherwise it
would attempt to find the file in the normal base for the NORMAL_C rule).
- add emitincludes() which adds include directives for each prefix to the
$INCLUDES variable in the makefile.
- add %INCLUDES to each Makefile.arch to deal with the above.
this makes "prefix" actually work in a usable manner, and now i can move
on to fixing compiler warnings (errors) in the ESP code. :)
to file specifications. The prefixes are arranged in a stack, and
nest, so that file, object, and include specifications are normalized,
and all end up relative to the kernel compile directory.
For example, in the kernel config file:
# Pull in config fragments for kernel crypto
prefix ../crypto-us/sys # push it
cinclude "conf/files.crypto-us" # include it if it's there
prefix # pop it
and in files.crypto-us:
file netinet6/esp_core.c ipsec & ipsec_esp
file netinet6/esp_output.c ipsec & ipsec_esp
file netinet6/esp_input.c ipsec & ipsec_esp
...generates the following in the kernel Makefile:
$S/../crypto-us/sys/netinet6/esp_core.c \
$S/../crypto-us/sys/netinet6/esp_output.c \
$S/../crypto-us/sys/netinet6/esp_input.c \
By placing this all in the kernel config file, all the magic involved in
reaching into non-standard kernel source directories is placed into a file
that the user is expected to edit anyway, and reasonable examples (and
sane defaults, for typical source checkouts) can be provided.
file, conditional on their existence. For example:
[ in ../conf/GENERIC ]
cinclude "../crypto-intl/sys/conf/files.crypto-intl"
This required a change to the files.* grammar; pseudo-device in that
context has been changed to defpseudo, to avoid a conflicting rule
for pseudo-device in the kernel config files.
The same grammar change allows vendors to ship files.* files for
commercial drivers, rather than diffs to e.g. files.pci, i.e.:
include "arch/i386/pci/files.zap"
zap* at pci? device ? function ?
Where files.zap might contain:
device zap: ether, ifnet, arp, mii
attach zap at pci
object arch/i386/pci/zap.o zap
is declared at most once.
* Do option dependency across all def{opt,param, flag}.
* Make the default value of otherwise-unspecified defopt's be 1,
for consistency with non-defopt'ed options.
* Wrap an abstraction layer (macros) around tests for defopt, filesystem,
defparam, etc. to catch outdated defopt-vs-filesystem tests.
* machinery for nonfatal warnings.
* new backend config-file keywords:
defparam -- like defopt, but each defparam option is required
to have a value when configured via "options".
defflag -- like defopt, but defflag options may not have a value.
Also, on "option FOO", a needs-count style flag
(NFOO, either 0 or 1) is emitted to the .h file.
* Warn about old-style options that aren't defined via def{opt,param,flag}
and which are added to IDENT. (These behave subtly differently
to defopt options when no explicit value is given.)
Only things defined with this keyword will be allowed on "file-system"
lines in the kernel config files.
By default, -D... directives for file systems are not generated, since
they are not needed for most file systems now that vfs_conf.c is gone.
However, some file systems must have dependencies generated on them
(e.g. NFS, UNION). So, provide a way to specify an option file for
these file systems.
a change to the config grammar, to specify a device's class (i.e. DV_xxx)
like:
device sd class disk: ...
Also emit an ioconf.h, which contains extern declarations of the
cfdriver structures.
While I'm here, add support for specifying multiple options per defopt
line, as well as specifying the file name in which the options will
appear.
defopt foo bar baz
generates "opt_foo.h", "opt_bar.h", and "opt_baz.h"
defopt opt_mumble.h foo bar baz
generates "opt_mumble.h" which contains all three options.
Also, clean up and fix some bugs in the code that generates header files.