Commit Graph

292 Commits

Author SHA1 Message Date
Florent Thoumie
34e703473c - Change the exit message from "make cleandepend; make depend" to
"make cleandepend && make depend".

PR:		bin/91765
Submitted by:	Soeren Straarup <xride@x12.dk>
Approved by:	cpercival
MFC after:	3 days
2006-01-14 08:12:25 +00:00
Ruslan Ermilov
8ee64886ef - Avoid adding devices multiple times to the device list.
- Avoid adding options multiple times to the option list.

Based on a patch by:	Matt Emmerton <matt@gsicomp.on.ca>
2005-12-30 16:28:06 +00:00
Ruslan Ermilov
22025511b4 Clean up most of the "XXX"-tagged items:
- The code that creates hints.c and env.c from the skeleton files
  moved into separate functions.

- Sanity checks for missing "ident" and "cputype" directives moved
  into main(), alongside the existing check for "machine".

PR:		bin/90310
Submitted by:	Matt Emmerton <matt@gsicomp.on.ca>
2005-12-30 15:29:50 +00:00
Ruslan Ermilov
f99d3b7b53 config.5 was repocopied from share/man/man5/ to usr.sbin/config/.
Repocopied by:	peter
2005-12-09 06:46:41 +00:00
Ruslan Ermilov
198423bd20 Document "makeoption", "nocpu", and "nomakeoptions" directives.
(Indeed this should be repo-copied to src/usr.sbin/config/.)
2005-12-03 20:07:32 +00:00
Ruslan Ermilov
233945839b Add "makeoption" as an alias to "makeoptions", for symmetry. 2005-12-03 20:04:24 +00:00
Ruslan Ermilov
f0caeb4419 Style: use S_ISDIR() (submitted by bde@) and eq() where appropriate. 2005-11-30 17:55:49 +00:00
Peter Wemm
03349079fe The DEFAULTS changes caused the user specified config file to be opened
much later than before, and it is now after we do a mkdir ../compile/FILE.
As a result, if you do 'config DOESNOTEXIST', it now creates the directory
../config/DOESNOTEXIST.  It did not do that before.  If DEFAULTS does not
exist, it still fails early before any permanent changes.

This shameless hack restores the old behavior of ensuring the config file
actually exists before mkdiring its counterpart directory.

Now I can rmdir ../compile/D and it will stay dead, after my fingers keep
sabotaging me with 'config D<tab><enter>'.  (Some of my kernel names
started with D, which used to be 1-character unique and my fingers knew
this very well...)
2005-11-29 22:54:49 +00:00
Warner Losh
ae54f5616d 600004 is a better new version than 700000 based on some future commits to
this file.  With ru@'s approval, change it to this version.  In this case we
had to bump the version because the old parser would choke on | in the new
'or' syntax and consider that a device.

Approved by: ru@
2005-11-28 17:47:54 +00:00
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