Commit Graph

167 Commits

Author SHA1 Message Date
thorpej 95a36e1425 Fix bug in previous; allprefixes didn't work if there were multiple prefixes. 1999-07-09 18:46:09 +00:00
thorpej 64f20db21b Make the outputted INCLUDES directives a bit more cosmetically appealing. 1999-07-09 18:45:31 +00:00
mrg ecdad0ec33 clean up a bit after jason :)
- 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. :)
1999-07-09 09:52:55 +00:00
thorpej 152af09e65 Add a mechanism to specify prefixes that are transparently prepended
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.
1999-07-09 06:44:58 +00:00
thorpej 02a4ec93e9 Nuke the work-around for non-normalized include paths. They have all
been fixed up.
1999-07-09 02:37:26 +00:00
thorpej 0ee6c639c7 Add a mechanism for files.* files to be included, in the kernel configuration
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
1999-07-07 00:02:09 +00:00
mycroft 01e0430cea Allow absolute path names for `object' files. 1999-05-23 19:30:30 +00:00
gwr 5a4e7b6de7 Make this build on Solaris (make -f Makefile.boot) 1999-04-02 06:36:30 +00:00
mycroft afd308129a Output a dependency on `newvers' for *every* kernel. It only gets run at most
once per make(1) invocation anyway, and not doing this screwed up parallel
makes.
1999-03-30 12:36:50 +00:00
garbled d1407362ba More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:43:46 +00:00
mjl 99d17e2ca4 Mention -v in usage. Fixes PR 6262 by Erik Bertelsen. 1999-02-08 22:32:58 +00:00
pk 74098ab84e Lennart Augustsson's multi-valued locator code. 1999-01-21 13:10:08 +00:00
christos c5b62f45b1 - rename err -> herr so that we don't conflict with libc
- KNF
- use herr when opening the files too, producing a more useful message.
1998-10-16 14:27:17 +00:00
itohy ec8a0e8dad Eliminate a memory leak. 1998-10-05 19:50:40 +00:00
pk 3237c34e03 Emit device name to device major number table. 1998-08-30 21:33:27 +00:00
tv c166f15971 NetBSD doesn't support the tahoe. 1998-08-06 14:56:17 +00:00
jonathan 50ca59e842 Fix braino. 1998-06-30 03:42:23 +00:00
jonathan eaa351c789 * Check that any declared option (def{opt,param,flag}, filesystem
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.
1998-06-30 03:30:56 +00:00
scottr a5427da04d Add and document the -v flag, and only print option-related warnings
if this flag is specified.
1998-06-28 04:41:36 +00:00
jonathan 0925cf4fda Stronger checking of options:
* 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.)
1998-06-24 11:20:54 +00:00
scottr e6eb7d0530 Implement option dependencies as part of the defopt action. We currently
restrict depended-on (or "implied") options to those that have been
previously defopt'ed, which inherently eliminates any cycles in the option
graph.
1998-06-10 04:33:31 +00:00
tv 2c23336179 Add missing colon in error message. 1998-05-22 19:29:00 +00:00
tv 95fadaa10e Add CLEANFILES+=gram.h as noticed by tron (PR 5383) 1998-05-01 13:02:09 +00:00
tv 2fd6f54874 Make the yacc rules work on 1.3 as well as -current without updating the
.mk files:  build the .c and .h files manually.  This should be removed
after the next release.  XXX.
1998-04-16 18:47:05 +00:00
tv 482063559a .y.c <sys.mk> rule fixes. Don't create a y.tab.h file unless asked for,
and use smarter creation of the header file.
1998-04-09 00:32:31 +00:00
thorpej 129a20a049 Fix a think'o that caused "config netbsd root on ? type ffs" to fail.
Fixes PR #5021.
1998-02-20 00:11:02 +00:00
thorpej a522c869e5 Fix a few semantic problems wrt. file-system, deffs, and options, pointed
out by Chris Demetriou.
1998-02-19 06:13:51 +00:00
thorpej d12d850cfe Add a "deffs" keyword, similar to "defopt", that defines file systems.
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.
1998-02-19 00:27:00 +00:00
thorpej ed063c61d5 Emit the default set of file systems as vfs_list_initial[]. 1998-02-18 07:00:27 +00:00
thorpej ea4d1b7ea1 Rather than using a separate "class" keyword, treat device classes like
special attributes.  From Chris Demetriou.
1998-02-16 22:05:35 +00:00
enami 491b9bd801 Remove redundant assignment. 1998-01-14 01:15:24 +00:00
thorpej bc1733bc88 Add code to emit the cfdriver structures into ioconf.c. This requires
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.
1998-01-12 07:37:40 +00:00
perry 3fe138c146 RCS Id Police. 1998-01-09 08:03:16 +00:00
lukem 44c22033e4 use CPPFLAGS instead of CFLAGS 1997-10-23 06:31:59 +00:00
lukem 73d91b2129 WARNSify, deprecate register, remove unused functions 1997-10-18 07:58:56 +00:00
lukem 2c30449e9c getopt returns -1 not EOF, turn off WARNS 1997-10-18 04:08:12 +00:00
lukem 03a401c4d5 getopt returns -1 not EOF, turn off WARNS 1997-10-18 04:08:08 +00:00
mycroft e8f7fd90c1 Actually, punt the `library' keyword; it does the same thing as `object',
and we really only need one of them.
1997-10-10 10:41:18 +00:00
mycroft 7d58ce9471 Add `object' and `library' keywords to pull in precompiled .o and .a files.
Syntax is like the `file' keyword; e.g.:
object	arch/i386/i386/mumble.o		[mumble] [needs-flag]
Largely from Michael Richardson in PR 3833, with some changes by me.
1997-10-10 10:27:53 +00:00
mycroft 054b6cb773 Allow options and makeoptions to take an empty string as a value. 1997-10-10 09:32:03 +00:00
jtk ce7e4557dd Don't generate defines for locators or bus attachments which have spaces
or tabs in the names; we can't generate reasonable #defines in those cases.
fixes PR# 3880.
1997-07-18 11:27:37 +00:00
thorpej 9fec93804a Changes to config(8) to support dump configuration in the wake of the
new swap system.  The dump specification syntax is now more flexible,
and supports constructs like the following:

config netbsd root on ? type ? dumps on ?
	- wildcarded root, fstype, and dump device

config netbsd root on ? type ffs dumps on sd0b
	- wildcarded root, ffs root fs, always dump on sd0b

config netbsd root on de0 type nfs dumps on wd0b
	- mount an nfs root using de0, and write kernel crash dumps
	  to wd0b

Also, garbage-collect some now unused code, now that swap configuration
is no longer handled by config(8).
1997-06-14 04:25:55 +00:00
mrg 7d9c89b0ce remove "swap" configuration. 1997-06-12 15:03:09 +00:00
thorpej 267e8357fc Implement an unfortunate, and temporary, kludge to address the problem
reported in PR #3668 from maximum entropy <entropy@tanstaafl.bernstein.com>.

The problem: The unit number is not being conveyed to the configuration
crosscheck with root is a network interface; the device number is set
to NODEV, which sets up the (correct) defaults for swap/dump devices.
We can't change NODEV to a unit number, as the PR's patch suggests, as
this breaks the swap/dump defaults.  Rewriting that code is not really
justified, since it's soon to be obsoleted.

The kludge: add an "nv_ifunit" member to struct nvlist, which convey's
a network interface's unit number to the crosscheck routine.  It's not
pretty, but it's not terribly invasive, and can be garbage-collected
easily when the swap/dump goo is obsoleted.
1997-05-25 18:42:54 +00:00
veego 924c7fcffa Add y.tab.h to CLEANFILES 1997-05-15 10:04:27 +00:00
mycroft 2c0b6f8e7f Use DPSRCS. 1997-05-09 13:56:04 +00:00
mycroft cc4a1553a1 Eliminate bogus redefinitions of standard targets. 1997-05-09 07:50:03 +00:00
cgd e3149f181c sort cloning units for a given devbase after non-cloning units. Addresses
the same problem as PR 3503, but with different code.
1997-04-17 05:01:09 +00:00
jtk 0b044b117e . NULL terminate the list of locator names on each attachment
. link to the list of locator names from each entry in cfdata[] (for
future use by programs to print out the device tree nicely and/or
for boot-time configuration tools)
1997-03-14 22:54:08 +00:00
leo 0b28c6c0b1 Don't dump when a non-existent root device is specified. (missed a
param to error()).
1997-03-14 20:43:05 +00:00