History log of /freebsd-10.3-release/usr.sbin/config/main.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 296373 04-Mar-2016 marius

- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.3.
- Update default pkg(8) configuration to use the quarterly branch.

Approved by: re (implicit)

# 276280 27-Dec-2014 ian

MFC r274924, r274936:

Consider the negation operator (!) to be a word even if it is not followed
by whitespace. This allows "optional !foo" which is what most programmers
are naturally going to tend to do as opposed to "optional ! foo".

Fix the negation (!) operator so that it binds only to the word that
immediately follows it.


# 264325 10-Apr-2014 asomers

MFC r263429

Fix kern/187712: config(8) does not respect KERNCONFDIR.
The impact of this bug is that you cannot build a kernel if both of the
following are true:
1) The kernel config file is in a non-default location
2) The kernel config file uses the "include" statement from config(5).

usr.sbin/config/main.c
usr.sbin/config/config.8
usr.sbin/config/config.h
usr.sbin/config/lang.l
Added a "-I path" option to config(8). By analogy to cc(1), it adds
an extra path in which the "include" statement will search for
files.

Makefile.inc1
Pass "-I ${KERNCONFDIR}" to config(8).


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 250133 01-May-2013 wkoszek

Make the internal assertion correct--only fail when '\0' is found in
places other than the end of the test section. Otherwise, with kernel
compiled with Clang which happens to be setting ELF section alignment
differently config(8) was throwing assert() failure unnecessarily

Reported by: Kimmo Paasiala <kpaasial (at) gmail.com>
Tested by: Kimmo Paasiala <kpaasial (at) gmail.com>
MFC after: 10 days


# 248777 27-Mar-2013 jkim

Loosen restrictions for quoted strings. Now we can use more complex strings
and "escaped" quote characters.

MFC after: 1 month


# 235789 22-May-2012 bapt

Fix world after byacc import:
- old yacc(1) use to magicially append stdlib.h, while new one don't
- new yacc(1) do declare yyparse by itself, fix redundant declaration of
'yyparse'

Approved by: des (mentor)


# 229403 03-Jan-2012 ed

Replace index() and rindex() calls with strchr() and strrchr().

The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.


# 223744 03-Jul-2011 ed

Improve portability of config(8).

- Use strlen(dp->d_name) instead of the unportable dp->d_namlen. Rename
i to len to make it slightly more descriptive and prevent negative
indexing of the array.
- Replace index() by strchr().

This supposedly fixes compilation on GNU systems.

Submitted by: Robert Millan <rmh debian org> (original patch)
MFC after: 3 weeks


# 214523 29-Oct-2010 jhb

Remove support for creating the 'machine' symlink as well as creating the
extra MACHINE_ARCH symlink for certain platforms (such as pc98). The
support for creating these symlinks was added to sys/conf/kern.post.mk in
changeset 152964. The intention of that commit was to remove this code
from config(8), but config(8) was never updated.

Approved by: imp


# 209969 13-Jul-2010 nwhitehorn

Enhance config to handle MACHINEs with multiple architectures:

- Passing -m to config will now print the MACHINE and MACHINE_ARCH
given in the passed kernel configuration file and then exit.
- If an option is defined in options.MACHINE with the same name as the
architecture of the kernel being configured, that option will be
considered set. This allows conditional compilation based on CPU
architecture.

Config version is now 600010.

Reviewed by: imp


# 207461 01-May-2010 imp

sparc64, and possibly other architectures, pads the length of the
section holding the config file to sh_addralign bytes using NULs.
This bogusly triggers an assert. Break out of the loop when we hit an
NUL within that many bytes of the end.

MFC after: 3 days


# 207260 27-Apr-2010 imp

Move checking the version up from Makefile generation to just after
we've parsed the config file. Makefile generation is too late if
we've introduce changes to the syntax of the metafiles to warn about
version skew, since we have to try to parse them and we get an parse
error that's rather baffling to the user rather than a 'your config is
too old, upgrade' which we should get.

We have to defer doing it until after we've read the user's config
file because we define machinename there. The version required to
compile the kernel is encoded in Makefile.machinename. There's no
real reason for this to be the case, but changing it now would
introduce some logistical issues that I'd rather avoid for the moment.
I intend to revisit this if we're still using config in FreeBSD 10.

This also means that we cannot introduce any config metafile changes
that result in a syntax error or other error for the user until 9.0 is
released. Otherwise, we break the upgrade path, or at least reduce
the usefulness of the error messages we generate.

# This implies that the config file option mapping will need to be redone.

MFC after: 3 days


# 205880 30-Mar-2010 ru

- Handle calloc() allocation failures.
- Fixed a comment.
- 2 -> EXIT_FAILURE in some places.
- errx() -> err() where appropriate.

PR: 144644
Submitted by: Garrett Cooper


# 188280 07-Feb-2009 wkoszek

Move the comment to it's correct place.


# 188277 07-Feb-2009 wkoszek

Remove leftover of alpha support for config(8)--we have MAP_FAILED
globally defined.


# 188214 06-Feb-2009 wkoszek

Make config -x <kernel> only return non-zero characters,
so that:

config -x <kernel> | grep <something>

just works.

Reported by: Danny Braniss <danny@cs.huji.ac.il>


# 178085 10-Apr-2008 imp

Fix a bug introduced by DEFAULTS feature. When the config file
doesn't exist, we make a directory and then say "oops, that file isn't
there" leaving the directory behind. Add a stat for the config file
so that we detect this before making the directory. This is
semi-lame, but less lame than having this bug.


# 175163 08-Jan-2008 emaste

Honour the logical current working directory ($PWD) when using config's
-d destdir option. For an automounted src tree using the logical cwd
in the Makefile keeps amd(8)'s mount timeout refreshed. Code to check
$PWD's validity cribbed from pwd(1).

Discussed on hackers@.


# 169647 17-May-2007 imp

Fix some problems that affect multiple file inclusion. Bruce found
this bug and submitted these patches to dunstan@. He sent them to me
to test, and I discovered they were needed for the atmel kernel config
files. Since we were playing with them in the terminal room after the
developer's summit today, I thought I'd go ahead and commit them to
allow those folks that now have atmel hardware (thanks Andre) a chance
to try it out w/o my help. Since dunstan@ is asleep right now, risk
stepping on his toes a little by going ahead and committing this
change.

Submitted by: dunstan@, bde@
Tested by: bde@


# 169512 12-May-2007 wkoszek

This is loser's commit message:

Remember about tricky cases, where options contain unfriendly characters,
from the ANSI-C string point of view ('"' in this case). The x09 build
breakage was caused by SC_CUT_SEPCHARS options.

I did test this patch number of times; each time unprofessionally and
inappropriately.

OKed by: cognet (mentor)


# 169507 12-May-2007 wkoszek

Improve INCLUDE_CONFIG_FILE support.

This change will let us to have full configuration of a running kernel
available in sysctl:

sysctl -b kern.conftxt

The same configuration is also contained within the kernel image. It can be
obtained with:

config -x <kernelfile>

Current functionality lets you to quickly recover kernel configuration, by
simply redirecting output from commands presented above and starting kernel
build procedure. "include" statements are also honored, which means options
and devices from included files are also included.

Please note that comments from configuration files are not preserved by
default. In order to preserve them, you can use -C flag for config(8). This
will bring configuration file and included files literally; however,
redirection to a file no longer works directly.

This commit was followed by discussion, that took place on freebsd-current@.
For more details, look here:

http://lists.freebsd.org/pipermail/freebsd-current/2007-March/069994.html
http://lists.freebsd.org/pipermail/freebsd-current/2007-May/071844.html

Development of this patch took place in Perforce, hierarchy:

//depot/user/wkoszek/wkoszek_kconftxt/

Support from: freebsd-current@ (links above)
Reviewed by: imp@
Approved by: imp@


# 163638 24-Oct-2006 imp

End my resistance to jmg's multiple hints files and bring in support
for having multiple hints files generate a correct hints.c (eg, with
all the specified ones catenated together).


# 159362 07-Jun-2006 delphij

Use calloc() instead of zeroing the memory our own.


# 154338 14-Jan-2006 flz

- 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


# 153888 30-Dec-2005 ru

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>


# 152963 30-Nov-2005 ru

Style: use S_ISDIR() (submitted by bde@) and eq() where appropriate.


# 152937 29-Nov-2005 peter

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...)


# 151744 27-Oct-2005 jhb

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


# 148962 11-Aug-2005 obrien

Put rev. 1.65 into usage().


# 148916 10-Aug-2005 obrien

Add an option to tell what version of config(8) this is.


# 145405 22-Apr-2005 ru

Ask that "make cleandepend" be run before "make depend", now that
we don't do this automatically.

Suggested by: bde


# 144509 01-Apr-2005 imp

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@


# 144352 30-Mar-2005 imp

style(9) nits


# 144179 27-Mar-2005 des

Unstaticize config. It was being optimized away.

MFC after: 3 days


# 133248 07-Aug-2004 imp

Per letter dated July 22, 1999, delete clause 3 from code directly
from Berkeley.


# 129073 09-May-2004 cognet

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.


# 116257 12-Jun-2003 tmm

Check the return values of opendir() and unlink() in cleanheaders().
If unlink() fails, just print a warning for now.


# 110895 15-Feb-2003 ru

Convert to using <sys/queue.h> macros.


# 99478 06-Jul-2002 obrien

We don't need to hit the user over the head so strong now that we've
fixed all the known warnings suffiently to not require NO_WERROR.

Ok'ed by: peter


# 91254 25-Feb-2002 peter

Add a hint about -DNO_WERROR


# 79694 14-Jul-2001 peter

Remove the old machine symlink first.


# 79607 12-Jul-2001 dd

Introduce an "include" directive. It takes one argument, a filename
to be included into this one. This works the same way as #include
does in C; as far as the user is concerned, the included file is
inlined into the current one.

Since config(8) is no longer limited to working on one user-supplied
file, printing just a line number in an error message is not
sufficient. The new global variable yyfile represents the file
currently being parsed, and must be printed as well.

Reviewed by: imp
Obtained from: OpenBSD


# 79013 30-Jun-2001 imp

Move kernel compile directory from sys/compile/FOO to
sys/compile/${MACHINE}/FOO.

Reviewed by: obrien, peter and the USENIX terminal room secret kernel cabal


# 72927 23-Feb-2001 peter

Move the 'dont forget "make depend"' to be the last thing that people see,
after the warnings.


# 72684 19-Feb-2001 peter

${BDECFLAGS} work. And fix a real error in the process. A "MAXUSERS"
string could have been passed to free(); There are some warnings here
I am not sure how to fix as they are in the lex scanner code, etc.


# 72000 04-Feb-2001 peter

Remove the need to list each and every cpu platform. Config will now
take your word for the 'machine' switch.


# 71866 31-Jan-2001 peter

Redo the stray header file cleanup code to not depend on timestamps
or access times or anything. Just bite the bullet and keep a list of
header files that we know about.


# 71804 29-Jan-2001 peter

AARGH! This does not mix too well with the -o noatime mount option.
:-(


# 71784 29-Jan-2001 peter

I confess. This is a truely nasty hack. I am so ashamed!
(I think config(8) source does bad things to your brain :-)

Clean up likely stray *.h files in the build directory.
Eg: if isa.h ceases being generated, zap it.
The heuristics to figure out a 'likely' file are pretty revolting.


# 71374 22-Jan-2001 benno

Add support for configuring PowerPC kernels.

Reviewed by: peter


# 71363 22-Jan-2001 peter

Clean up some obsolete stuff. config -r has not been needed since around
FreeBSD 3.x or so when the 'make depend' picked up the opt_foo.h files.
Convert warnings into actual errors in the hope that buildkernel users
will pay more attention. :-(


# 70673 04-Jan-2001 peter

Try and stop config(8) from freaking out due to unnecessary paranoia
when using -d. Use realpath(3) to locate the top of the tree rather than
trying to manually trim back the results of a getcwd().

Requested by: alfred


# 69004 21-Nov-2000 imp

Fix buffer overflows in filenames. If you had a path > 80 characters
for your /usr/obj/path/to/my/files path to the kernel, then weird
things happened. make buildkernel would fail because config was
dumping core or generating bad file names (depending on the lenght of
the path).

While I was here, also use strlcpy, strlcat and snprintf (or asprintf)
as necessary. Minor format policing for the snprintf calls as well.


# 66457 29-Sep-2000 dfr

Add ia64 support.


# 61640 13-Jun-2000 peter

Borrow phk's axe and apply the next stage of config(8)'s evolution.

Use Warner Losh's "hint" driver to decode ascii strings to fill the
resource table at boot time.

config(8) no longer generates an ioconf.c table - ie: the configuration
no longer has to be compiled into the kernel. You can reconfigure your
isa devices with the likes of this at loader(8) time:
set hint.ed.0.port=0x320

userconfig will be rewritten to use this style interface one day and will
move to /boot/userconfig.4th or something like that.

It is still possible to statically compile in a set of hints into a kernel
if you do not wish to use loader(8). See the "hints" directive in GENERIC
as an example.

All device wiring has been moved out of config(8). There is a set of
helper scripts (see i386/conf/gethints.pl, and the same for alpha and pc98)
that extract the 'at isa? port foo irq bar' from the old files and produces
a hints file. If you install this file as /boot/device.hints (and update
/boot/defaults/loader.conf - You can do a build/install in sys/boot) then
loader will load it automatically for you. You can also compile in the
hints directly with: hints "device.hints" as well.

There are a few things that I'm not too happy with yet. Under this scheme,
things like LINT would no longer be useful as "documentation" of settings.
I have renamed this file to 'NOTES' and stored the example hints strings
in it. However... this is not something that config(8) understands, so
there is a script that extracts the build-specific data from the
documentation file (NOTES) to produce a LINT that can be config'ed and
built. A stack of man4 pages will need updating. :-/

Also, since there is no longer a difference between 'device' and
'pseudo-device' I collapsed the two together, and the resulting 'device'
takes a 'number of units' for devices that still have it statically
allocated. eg: 'device fe 4' will compile the fe driver with NFE set
to 4. You can then set hints for 4 units (0 - 3). Also note that
'device fe0' will be interpreted as "zero units of 'fe'" which would be
bad, so there is a config warning for this. This is only needed for
old drivers that still have static limits on numbers of units.
All the statically limited drivers that I could find were marked.

Please exercise EXTREME CAUTION when transitioning!

Moral support by: phk, msmith, dfr, asmodai, imp, and others


# 61523 10-Jun-2000 peter

A checkpoint of a part of a work-in-progress. Some more cleanups for
config(8). This commit allows control of the creation of the
#include "foo.h" files. We now only create them explicitly when needed.
BTW; these are mostly bad because they usually imply static limits on
numbers of units for devices. eg: struct mysoftc sc[NFOO];
These static limits have Got To Go.


# 52653 30-Oct-1999 marcel

Add option "-d destdir" which instructs config to use another output
directory than the default one. If the option is not given, then the
output of config is exactly as before. Only when an alternate output
directory has been specified will config modify its behavior.

Additional changed:
o Remove the now conflicting and unused NODEV define. It
conflicts with NODEV in sys/param.h.
o Rename the now conflicting MACHINE token to ARCH. It
conflicts with MACHINE in sys/param.h.
o Fix some easy style bugs.
o Fix some easy grammar bugs in the manpage.

Approved by: peter, archie


# 52098 10-Oct-1999 peter

Further cleanup. Also remove the following unused or defunct tokens:
and, bio, cam, master, minor, net, priority, sequential, size, slave, trace


# 50479 28-Aug-1999 peter

$Id$ -> $FreeBSD$


# 46821 09-May-1999 peter

Put on my viking helmet from the closet, and get out the war axe and
"retire" some more stuff.


# 46815 09-May-1999 phk

config(8) lobotomy, please see commit msg in sys.

(I have no idea why cvs didn't take these changes before.)


# 46021 24-Apr-1999 peter

More cleanups, tweaks and features.
- make this work: options FOO123=456 *without quotes*
- grumble (but accept) vector xxxintr, and tty/net/bio/cam flags.
- complain if a device is specified twice (eg: 2 x psm0)
- don't require quotes around: port IO_COM2
- recognize negative numbers. (ie: options CAM_DEBUG_UNIT=-1)
- GC some more unused stuff (we don't have composite disks from config(8)).
- various other nits (snprintf paranoia etc)


# 45775 18-Apr-1999 peter

Further cleanups. i386_ioconf.c and alpha_ioconf.c were essentially the
same and were merged into a single newbus_ioconf.c. CG'd some more unused
code.


# 45744 17-Apr-1999 peter

Get out the blow torch and hack away all the unused stuff. Note that
I zapped the MACHINE_MIPS stuff, it isn't likely to be useful apart from
recognition of the machine name. It would be reasonable to expect new
ports would look something like the alpha/i386 from a config perspective.


# 45579 11-Apr-1999 grog

Back out default debug kernel. The flags revert to historical behaviour.

Requested-by: ache
bde
dg

Modify targets for debug kernels: when -g was specified, make will
now build a debug kernel called kernel.debug, and create a stripped
version called kernel at the same time. The two targets install and
install.debug are otherwise unchanged.

Requested-by: dillon

Update man page accordingly.


# 45545 10-Apr-1999 ache

add -s to usage

PR: 11056
Submitted by: Nickolay N. Dudorov <nnd@mail.nsk.ru>


# 45424 07-Apr-1999 grog

1. Modify config to issue different code for debugging.
2. Config complains if you use -g:

Debugging is enabled by default, there is no ned to specify the -g option

3. Config warns you if you don't use -s:

Building kernel with full debugging symbols. Do
"config -s BSD" for historic partial symbolic support.
To install the debugging kernel, do make install.debug

(BSD was the name of the config file I used; I print out the same
name).

4. Modify Makefile.i386, Makefile.alpha, Makefile.pc98 and config to
work if a kernel name other than 'kernel' is specified. This is
not absolutely necessary, but useful, and it was relatively easy.
I now have a kernel called /crapshit :-)

5. Modify Makefile.i386, Makefile.alpha, Makefile.pc98 "clean" target
to remove both the debug and normal kernel.

6. Modify all to install the stripped kernel by default and the debug
kernel if you enter "make install.debug".

7. Update version number of Makefiles and config.


# 41637 10-Dec-1998 archie

Eliminate compiler warning when compiling "config.c" in a kernel.


# 36813 09-Jun-1998 dfr

Add (mostly stub) alpha support. Incidentally, it doesn't build on stable
unless I manually construct y.tab.h. Is this normal?


# 35609 02-May-1998 kato

Support PC-98 machine.


# 35403 23-Apr-1998 bde

Don't generate code with syntax errors (hard newlines in string constants
in config.c).


# 34620 16-Mar-1998 eivind

Add message when using obsolete command line option.

Suggested by: joerg


# 33597 19-Feb-1998 eivind

Re-introduce '-n' - now a no-op for backwards compatibility only.

Requested by: David Quattlebaum <sasdrq@unx.sas.com>


# 33538 18-Feb-1998 eivind

Make '-n' the default, and introduce a new flag '-r' to get old
behaviour. Also indicate which option(s) are unknown if there are any
old-style options.


# 31216 18-Nov-1997 jdp

Fix incorrect format string detected by "-Wformat".


# 29451 15-Sep-1997 charnier

Use err(3), add usage(). -Wall clean.


# 24428 31-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 21786 16-Jan-1997 alex

Sweep through the tree fixing mmap() usage:

- Use MAP_FAILED instead of the constant -1 to indicate
failure (required by POSIX).
- Removed flag arguments of '0' (required by POSIX).
- Fixed code which expected an error return of 0.
- Fixed code which thought any address with the high bit set
was an error.
- Check for failure where no checks were present.

Discussed with: bde


# 20940 26-Dec-1996 peter

Tidy up the generated config.c file. Use #include "opt_config.h", comment
out text after #endif line, add missing \n at end of file, only install new
config.c if it's different to the last one which preserves the timestamp.


# 16239 08-Jun-1996 jkh

Bring back the `config file in the kernel' feature from the 1.x days. This
is conditionalized by the INCLUDE_CONFIG_FILE option in your kernel config
file and is not turned on by default.

Submitted-By: Bill Pechter <pechter@shell.monmouth.com>


# 16073 02-Jun-1996 phk

Backout yacc changes.


# 16023 30-May-1996 phk

yacc rule changes.


# 13400 12-Jan-1996 peter

Make a little more effort to avoid touching certain generated files if
they were not changed. This makes 'make depend' more useful.


# 12772 11-Dec-1995 peter

Implement support for conf/options and i386/conf/options.i386
Note that this code is dormant unless the options files exist.
Also, parsing of quoted options in the config files is improved.

What this allows, is all the options in LINT to be specified to be
configured as #defines in a file rather than on the CC command line at
kernel build time. This means that 'make depend' will catch dependencies
on actual *options*, meaning that you can run 'config' and 'make depend'
in complete safety WITHOUT removing the compile directory each time.

Unfortunately, this requires a pass over the source to get the individual
files to #include the new .h files that would be generated by config.
This has a small compile time penalty (appears up to about 2% slower)
from a "fresh" build. Of course, you should not be needing to do complete
rebuilds very often once this was completed, so it would be an overall
win for most people.

Since this code is dormant and we've got a lot of other things happening
on the kernel tree at the moment (prototypes, devfs, static declarations
etc) I am not planning on doing any changes to activate this feature just
yet.


# 12508 28-Nov-1995 wollman

If CONFIG_NO_CLOBBER_EVER is defined (e.g., in /etc/make.conf), don't make
it possible for config to ever blow away a work directory. Default behavior
remains broken.


# 8248 03-May-1995 jkh

Change the perennially annoying reminder to "make depend" (which may or
may not be desired if you're just going to blow the kernel away again later)
and substitute one that tells the user where the new kernel build
directory actually IS, which can at least be argued to be useful information
in all cases.
Reviewed by: davidg


# 6631 22-Feb-1995 jkh

Make good on my promise to finally clean up the config clobbering.
If you invoke config with the `-n' flag or have NO_CONFIG_CLOBBER in
your environment, config will behave the same way it used to. This is
now _documented_ as well. Rip out all the CONFIG_DONT_CLOBBER cruft;
some of it wasn't even correct anyway.


# 4571 17-Nov-1994 gibbs

Add new keywords to config. The options availible in file.i386 are now:

/*
* filename [ standard | optional ] [ config-dependent ]
* [ dev* | profiling-routine ] [ device-driver] [ no-obj ]
* [ compile-with "compile rule" [no-implicit-rule] ]
* [ dependancy "dependancy-list"]
*/

I added

no-obj - This entry does not create anything linkable to the kernel.
dependancy - Add additional dependancy rules to a target.
no-implicit-rule - Don't assume .c -> .o type rules. Config is really
dumb in this area and assumes that everything is a .c file
irregarless of extention. This was the best choice really
since there may even be .c file that you don't want to follow
the standard rules.

This was all done so that the building to the aic7770 assembler and using
the aic7770 assembler in the building of the aic7770 driver could be config
dependant. I can now have an entry like this for the driver:

aic7770 optional ahc device-driver \
compile-with "${CC} $> -o $@" \
dependancy "$S/gnu/misc/aic7770/aic7770.c" \
no-obj no-implicit-rule
aic7770_seq.h optional ahc device-driver \
compile-with "${.CURDIR}/aic7770 -o $@ $S/gnu/misc/aic7770/aic7770.seq"\
dependancy "$S/gnu/misc/aic7770/aic7770.seq aic7770" \
no-obj no-implicit-rule
i386/isa/aic7770.c optional ahc device-driver \
dependancy "aic7770_seq.h"

I also added '\' escaping to newlines so that this doesn't look as gross as
it could have.

Reviewed by: jkh


# 2567 08-Sep-1994 jkh

Undo the damage done to my previous changes. Whoever added the
conditional did it backwards, thus flipping the behavior back off
again by default (and only re-enableable through a very counter-intuitive
option setting!). I'm glad I caught this and would merely like to state
again for the record that if you're going to go and modify my changes then
you should at least:

1. Do it correctly, since to do otherwise is kind of a slap in the
face.

2. TELL me.

This is not me just being compulsive, this is simple courtesy.
I'm speaking just of my own preferences here, not necessarily trying
to impose my standards on the group at large (e.g. some other folks might
not even care).
Submitted by: jkh


# 2525 06-Sep-1994 wollman

Revert back to old config behavior if compiled with -DCONFIG_DONT_CLOBBER.


# 2483 03-Sep-1994 jkh

Eradicate my #1 (ok, maybe #2) peeve by making config now blow away
and recreate any previous ../../compile/<blah> directory before laying
down new files. The depends just aren't smart enough to save
us from the grief that config's old behavior has always caused.
Submitted by: jkh


# 1566 26-May-1994 rgrimes

Upgrade config to be compatible with our i386 port, pull in 95% of the
changes that have been made in FreeBSD 1.x, except for possibly the nfs
diskless support this is a completed config.


# 1554 26-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1553,
which included commits to RCS files with non-trunk default branches.


# 1553 26-May-1994 rgrimes

BSD 4.4 Lite usr.sbin Sources