Commit graph

283 commits

Author SHA1 Message Date
Ruslan Ermilov 6646524f34 - Allow duplicate "machine" directives with the same arguments.
- Move existing "machine" directives to DEFAULTS.
2005-11-27 23:17:00 +00:00
Ruslan Ermilov a8e06f2a52 Make config(8) understand ORed dependecies in "files*" and
improve tracking of known devices.  Bump config(8) version.
2005-11-27 21:41:58 +00:00
Ruslan Ermilov 61ede7eeac Clean some code that became obfuscated over the years:
Don't keep duplicate files in the files list just to
mark the device as "known" later.  XXX: Since the
device list isn't unique (there can be two "device foo"
directives, as this the case with LINT+DEFAULTS), we
have to traverse it all to mark all copies of the same
device as "used", but this is not worse than it was.
2005-11-25 22:25:34 +00:00
Robert Watson 5baadf2110 Minor comment tweak to prevent gcc from being upset about the substring
/* appearing in a comment.
2005-11-07 18:45:46 +00:00
Peter Wemm 634e3a5c83 Add some rationale about when to bump and not bump the config version.
Clarify that it is not like the shlib versions, and not like param.h's
__FreeBSD_version/osreldate either.

When config(8) was actively changing a while back, the interface between
config and the build system (eg: /sys/conf/files.* and Makefile.*) was
changing rapidly.  configvers is a version number of that interface.

User specified config files do not have a version number.  The decision
about whether a user supplied config file is syntactically valid or not
belongs to the parser and sanity checks, not an arbitary number.
2005-11-07 17:37:27 +00:00
Warner Losh 6383e2266c since nocpu isn't used in the kernel config base, we don't need to
bump the version.  Peter Wemm, John Baldwin and I hammered this out
after the last time I needlessly incremented the version.
2005-11-04 04:16:44 +00:00
Ruslan Ermilov d3e15dbaa0 Use the eq() macro for comparing strings (style), and remove a "break"
statement to null the effect of several identical "cpu" directives.
2005-11-03 21:27:02 +00:00
Ruslan Ermilov a15aafd590 By a popular demand, add "nomakeoptions" as an alias to "nomakeoption". 2005-11-03 21:09:59 +00:00
Ruslan Ermilov acd58322c7 Implement the "nocpu" directive.
Requested by:	rwatson
2005-11-03 14:01:22 +00:00
John Baldwin b34b3c19c6 Bump config(8) version for the DEFAULTS change. 2005-10-27 19:27:55 +00:00
John Baldwin dfdbf9be00 Optionally include a DEFAULTS config file if it is present in the current
directory before the specified config file.  This is implemented by
opening DEFAULTS as stdin if it exists, and if so resetting stdin to the
actual config file when DEFAULTS is fully parsed via yywrap().  In short,
this lets us create DEFAULTS kernel configs in /sys/<arch>/conf that can
enable certain options or devices by default and allow users to disable
them via 'nooptions' or 'nodevice' rather than having to create kludge
NO_FOO options.

Requested by:	scottl
Reviewed by:	scottl
2005-10-27 17:13:23 +00:00
David E. O'Brien 216a5fbf37 Put rev. 1.65 into usage(). 2005-08-11 15:23:23 +00:00
David E. O'Brien 71d8a448ac Add an option to tell what version of config(8) this is. 2005-08-10 06:36:44 +00:00
Ruslan Ermilov de12942735 Ask that "make cleandepend" be run before "make depend", now that
we don't do this automatically.

Suggested by:	bde
2005-04-22 17:42:50 +00:00
Warner Losh 51c1297a48 Allow one to specify a second parameter to the machine line. This
allows us to specify the machine_arch as well as machine.  If
specified then a second link will be made, similar to machine, from
$MACHINE_ARCH to $S/$MACHINE_ARCH/include.

This is for ports where MACHINE != MACHINE_ARCH (pc98 today, others in
the future?).

Reviewed by: arch@, nyan@
2005-04-01 22:54:22 +00:00
Warner Losh a2920586a8 style(9) nits 2005-03-30 21:45:08 +00:00
Dag-Erling Smørgrav 8acd37ef20 Unstaticize config. It was being optimized away.
MFC after:	3 days
2005-03-27 13:44:00 +00:00
Dag-Erling Smørgrav f5c4f5a580 Bump the version number for the addition of devices / nodevices. 2005-02-10 15:16:25 +00:00
Dag-Erling Smørgrav b83d741b1c Fully document (no)?(device|option)s?.
This page should probably be repocopied to src/usr.sbin/config/.
2005-02-10 14:26:21 +00:00
Dag-Erling Smørgrav d67c43b3a9 "device" and "nodevice" lines can actually specify more than one device
(separated by commas), so add "devices" and "nodevices" as aliases.

MFC after: 	2 weeks
2005-02-10 10:46:27 +00:00
Ruslan Ermilov 59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Ruslan Ermilov fff666a6f8 The ioconf.c is no longer generated.
Submitted by:	Craig Rodrigues
2004-12-16 09:52:41 +00:00
Dag-Erling Smørgrav 30fdf276fb Allow multiple devices to be specified on one device / nodevice line.
Also allow "device" / "nodevice" to be spelled "devices" / "nodevices".

MFC after:	2 weeks
2004-10-24 10:27:16 +00:00
Dag-Erling Smørgrav 9b736ef9e6 If the file specified in an "include" line does not exist in the current
directory, and its name does not begin with a period or a forward slash,
go look for it in ../../conf.

Wished for by:	scottl
MFC after:	2 weeks
2004-10-24 09:38:41 +00:00
Poul-Henning Kamp 44c428d240 We accept both "option" and "options" so also accept both "nooption"
and "nooptions".
2004-10-12 13:21:44 +00:00
Peter Wemm f37a929ca1 Kill count device support from config. I've changed the last few
remaining consumers to have the count passed as an option.  This is
i4b, pc98/wdc, and coda.

Bump configvers.h from 500013 to 600000.

Remove heuristics that tried to parse "device ed5" as 5 units of the ed
device.  This broke things like the snd_emu10k1 device, which required
quotes to make it parse right.  The no-longer-needed quotes have been
removed from NOTES, GENERIC etc.  eg, I've removed the quotes from:
   device  snd_maestro
   device  "snd_maestro3"
   device  snd_mss

I believe everything will still compile and work after this.
2004-08-30 23:03:58 +00:00
Warner Losh 23717fc46a Per letter dated July 22, 1999, delete clause 3 from code directly
from Berkeley.
2004-08-07 04:19:37 +00:00
Brooks Davis e32e9a42a6 Static device counts will not be supported in 6.x so place the generated
macros (N<driver>) under BURN_BRIDGES.

Discussed with:	peter, imp, scottl, ...
2004-06-30 21:00:47 +00:00
Ruslan Ermilov bf7f20c2b6 Assorted markup, spelling, and grammar fixes. 2004-06-16 08:33:57 +00:00
Olivier Houchard fc0c46e313 Document the "files" directive.
Reminded by:	jmg
2004-05-13 21:55:53 +00:00
Olivier Houchard dd472ec61d Fix a few glitches in my previous commit.
This makes config(8) WARNS?=6 compliant.
2004-05-11 15:42:44 +00:00
Olivier Houchard 43a903c091 Add a new "files" directive, which allows to include a files.foo file directly
from a kernel config file.
Bump config version to reflect this change.
2004-05-09 22:29:00 +00:00
Dag-Erling Smørgrav 59b7dcd3d0 Whitespace nit. 2004-02-17 09:59:45 +00:00
Bruce Evans e3937b620a Fixed spurious syntax errors for including files that don't begin with
a SEMICOLON token (a newline or semicolon, or one of these preceded
by a comment and/or whitespace).  The input stream was switched too
early and the parser was expecting a SEMICOLON in the included file
instead of after the filename in the include directive.

Submitted by:	Stefan Farfeleder <stefan@fafoe.narf.at>
Kept alive by:	Adam C. Migus <adam@migus.org>
2003-11-14 11:23:25 +00:00
Simon L. B. Nielsen 3b5e70922f Add a reference to config(5) in the SEE ALSO section.
Suggested by:	dcs
Approved by:	ceri (mentor)
2003-08-06 21:41:35 +00:00
Joseph Koshy 81e25c5eb2 Eliminate non-existent word.
Submitted by:	jwd
2003-07-13 09:11:10 +00:00
Joseph Koshy 6203e1ea06 "towards" -> "toward". According to dictionary.com, the use of "towards"
is common in British English, while "toward" is the preferred form in
American English.  Use the American form for consistency.

Correct the date on the manual page.

Submitted by:	Tom Rhodes <trhodes@freebsd.org>,
		underway@comcast.net (Gary W. Swearingen)
2003-07-08 01:39:02 +00:00
Joseph Koshy 1949e95550 Disallow multiple 'machine' directives in a kernel configuration
file.

Reviewed by:	ru, bde
2003-07-06 02:00:52 +00:00
Joseph Koshy 1518d1294c New section 5 manual page detailing our kernel configuration file
format.

Reviewed by:	Ruslan Ermilov <ru@freebsd.org>, Jens
		Schweikhardt <schweikh@schweikhardt.net>
2003-07-06 01:52:26 +00:00
Mark Murray a97024f7c6 Not particularly pretty hack to generate rules to make .ln files
from .c files. Actually, this is overkill, as the .ln file targets
are assumed from .? (any) files. This is not a problem in practice,
merely a bit untidy, as the linting rules DTRT. See the sys/conf/*
and sys/mk/* files for usage.
2003-06-16 20:08:15 +00:00
Thomas Moestl 74155a4873 Check the return values of opendir() and unlink() in cleanheaders().
If unlink() fails, just print a warning for now.
2003-06-12 11:36:54 +00:00
David E. O'Brien 70be60d344 Best we can do is WARNS=1 due to lex. 2003-06-11 21:27:37 +00:00
David E. O'Brien 9cad751da5 Do not refer to the non-existant BDECFLAGS. 2003-06-11 21:25:15 +00:00
Dag-Erling Smørgrav d885e237ca Don't convert the kernel ident to uppercase when writing the Makefile. 2003-04-24 00:52:58 +00:00
Christian Brueffer c2f1217b0c Grammar fix
PR:		51164
Submitted by:	Jeff Ito <jeffi@rcn.com>
MFC after:	3 days
2003-04-20 13:11:11 +00:00
Poul-Henning Kamp 18b492fc8c Bump the config version to force people to upgrade their config(8)
so the fix for emitting multiple instances of .o files will prevent
link errors on LINT.
2003-04-15 21:29:11 +00:00
Poul-Henning Kamp 37b2f82295 Avoid emitting duplicate makefile entries. 2003-04-12 14:02:03 +00:00
Dag-Erling Smørgrav 76131e39c3 Print FYI messages on stderr. Previously, they were printed on stdout,
and due to buffering they would sometimes come out after the actual
error message when mkheaders() failed due to an unknown device, so you'd
get an error messages followed by 20 or 30 lines of harmless warnings.

There are lots of other warning messages in config(8) that are printed
on stdout, but these were the most egregious (at least with LINT).
2003-03-09 15:08:47 +00:00
Ruslan Ermilov 824018495d Implemented "nooption" and "nomakeoption" config(8) tokens.
Fixed memory leak in the "nodevice" option implementation.

Use these instead of sed(1) in MD NOTES.

Use a single makefile (sys/conf/makeLINT.mk) to generate
LINT for all architectures.  (Previous versions missed
the LINT dependency on Makefile, and i386 version also
missed the dependency on ${NOTES}.)

Fixed bugs in the previous NOTES conversion using the
"nodevice" token and sed(1):

- i386 LINT lost "device pst".

- pc98 LINT lost SC_*, MAXCONS and KBD_DISABLE_KEYMAP_LOAD
  options, and got needless DPT_* options.

- Added nooptions PPC_DEBUG, PPC_PROBE_CHIPSET, KBD_INSTALL_CDEV
  to sparc64 LINT so that it has a chance to config(8).

This basically returns us to where we were before.
2003-02-26 23:36:59 +00:00
Ruslan Ermilov e20f30f755 Allow for boolean make options (``makeoptions NO_MODULES'').
Fixed the potential bug in rmopt().
2003-02-21 23:17:00 +00:00