Commit Graph

35 Commits

Author SHA1 Message Date
agc 326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
itojun e8f0e61fd7 use bounded string op 2003-07-13 12:29:20 +00:00
atatat 15d85dcb14 Alter config so that it emits a config_time.src file (the source file
for config_time.h) that contains, for example:

/* Sun Nov 17 05:37:51 2002 GMT */
#define CONFIG_TIME     1037511471
#define CONFIG_YEAR     2002
#define CONFIG_MONTH    11
#define CONFIG_DATE     17
#define CONFIG_HOUR      5
#define CONFIG_MINS     37
#define CONFIG_SECS     51

These values represent the current time as of when config was last
run, so that functions (eg, inittodr()) can use these values instead
of being updated once every year or so with the "current" time.

The associated modification to Makefile.kern.inc makes config_time.h
depend on this depend on this and the kernel Makefile, so that
granularity of kernel builds is not reduced.
2002-11-19 04:29:19 +00:00
lukem 90028da4e1 Functionality improvements:
- Add `no' keyword, which can be used in the following ways:
	no file-system SOMEFS
	no makeoptions FOO
	no options OPT1[,OPT2[,...]]
	no pseudo-device somepseudo
  This turns off a previous file-system/makeoptions/options/pseudo-device
  entry for the same item.
  Grammar support for 'no device DEV at ATTACH' added, but not
  implemented yet.

Code changes:
- Convert many simple lists to TAILQs
- Convert prefix to SLIST
- Remove argument names from prototypes.
- Don't bother with custom alloc code for hashtables; just use emalloc()
  like everything else.
- Implement ht_remove(), to remove an entry from a hash table.
  Add removed entries to a freelist for later reuse.
- Don't selectbase() devices and pseudo-devices at definition time; instead
  do it at one pass after the config file has been parsed in fixdevis().
- Rename nvhead to nvfreelist; a more apt name...
- Minor code cleanups.
2002-06-05 10:56:17 +00:00
atatat 714a76fd97 Avoid needlessly recreating the Makefile, ioconf.c, or any of the
swap*.c files if they haven't changed from the last time config was
run, so that less stuff will need to be rebuilt (ie, assym.h, upon
which many other things depend) each time config is rerun.
2002-02-12 23:20:11 +00:00
tv a328e34106 Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
2002-01-29 10:20:28 +00:00
lukem 0e59a7f124 revert previous revert previous. now back to rev 1.27 behaviour:
- 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
2001-11-28 09:02:16 +00:00
lukem 49379a0a84 revert previous (instead i'll work out why defflag isn't DTRT with Nxxx) 2001-11-28 03:23:35 +00:00
lukem cbe4dece17 - Don't bother emitting "#define NFOO 0" for defflag foo (whether or
not foo was provided); it's unnecessary #define namespace pollution
- Remove a couple of unused vars
2001-11-28 02:47:42 +00:00
cgd c2bdafab79 use getprogname() 2001-02-20 23:51:59 +00:00
cgd 463d864ef0 nuke __P, and convert all functions to use ANSI-style declarations.
Also, do a few trivial KNF cleanups (e.g. newline at start of fn if no
locals).  Verified to have no effect via diff on new and old compiled
binaries.
2000-10-02 19:48:34 +00:00
ws b17a1042ba Allow mutual dependencies.
Output string-valued options reasonably to option files.
1999-09-22 14:23:03 +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
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
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
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
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 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
lukem 73d91b2129 WARNSify, deprecate register, remove unused functions 1997-10-18 07:58:56 +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
jtk 0f6d8d88b8 Add hash table walking functions to emit manifest constants for locator
offsets within cf->cf_loc[].
Also include locator names as strings in ioconf.c.

Still to do: wire the locator names into the cfdata.
1997-03-14 00:14:09 +00:00
thorpej f12fb4ba31 Patch from Gordon Ross to make this build under SunOS, useful in
cross-compiling environments.
1997-02-03 21:18:21 +00:00
thorpej e14a0d029f Add support for generating "option headers". These allow options to
be included in object dependencies.  config(8) is told to generate
a header for a particular option with the new "defopt" keyword, used
in the files.* system description files.  Options that are placed in
header files are not given -D... cpp flags.

This approach allows options to be turned into headers incrementally,
rather than all at once, and allows for non-header options, as well.
1997-02-02 21:12:30 +00:00
mycroft ab6ebadde6 Add `source' and `build' directives, and corresponding options, per discussion
on tech-kern.  (See man page.)  Implementation by Greg Hudson.
Also, remove special case for i386 in vector handling, although this code isn't
actually used any more.
1996-08-31 20:58:16 +00:00
cgd 3ac7667c57 add BSDI-style expression support to optional file specifiers. Code mostly
taken from the parts of BSDI's 'config' which are freely-distributable
(under the LBL/UC Regents license), and adjusted to fit into our version.
1996-03-17 13:18:15 +00:00
cgd 9c4f9d2daa spaces vs. tabs, spaces/tabs at EOL bogons. 1996-03-17 06:29:19 +00:00
thorpej c5f7cf3a9e RCS id police. 1996-03-03 17:21:25 +00:00
cgd 064307e690 config.new has been moved here. names updated to match. 1995-04-28 06:54:58 +00:00
mycroft 26731dd3eb Support device drivers with multiple names, and do the right thing for fd and
wd.
1994-03-10 19:50:43 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
brezak 19049fea1a Add option dependency generation. 1993-07-23 03:01:47 +00:00
cgd 0b8e25b695 add "needs-count" specifier, which means "make a .h file if you otherwise
wouldn't".  this is overridden by (and is a subset of "device-driver".
if you have a "standard" file, you can also do: "standard foo needs-count"
to get a foo.h file.  (for the hp300 stuff)
1993-05-29 18:50:37 +00:00
glass fea6b7920f Welcome to the new order. config(8)'s code for reading files, files.i386,
and files.kernel has now been completely replaced.
features supported: not nearly as broken as the stuff before
		    expression support for dependencies
		    support for 'requires'
		    no longer generates lots of stupid unnecessary .h files
		    broke lots of broken stuff, and forced fixing it.
(docs to arrive later)
		    added '-k' option for continue even after error
		    documented '-g'
1993-04-10 12:11:55 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00