Commit Graph

37 Commits

Author SHA1 Message Date
christos
202553924e Keep track where more objects are declared so that we can print where things
have been redefined.
2020-03-07 19:26:13 +00:00
christos
3a8503931f Make attribute deselection work:
- when deselecting attributes, remove files that depend on them
- when deselecting attributes, remove devices that depend on them
2016-09-09 21:09:11 +00:00
uebayasi
82a183dddd Fix previous. 2015-09-04 21:32:54 +00:00
uebayasi
cea9d6a0de Fix segmentation fault. 2015-09-04 15:50:48 +00:00
uebayasi
9b48d49489 Sort files in ${ALLFILES} in the order of parsing of `files.*'.
config(1) reads the first `files.${MACHINE}' when it encounters `machine'.
Then it includes common `files.${MACHINE_SUBARCH}', `files.${MACHINE_ARCH}',
and MI `sys/conf/files' at last.  This change makes the first "file" in
`files.${MACHINE}' appear first in ${ALLFILES}.
2015-09-04 10:16:35 +00:00
uebayasi
ca8d7a3596 *.o files don't need special handling at all now. Makefile.kern.inc knows
*.o input files don't need to get compiled, but need to get linked.
2015-09-04 06:01:40 +00:00
uebayasi
bc2bf167eb Now Makefile.kern.inc handles swap<kernel>.c compiling/linking nicely,
config(1) can become less hackish.
2015-09-04 05:13:32 +00:00
uebayasi
dc9cfb5d59 Share more code by making *.o handling less special. 2015-09-04 01:24:01 +00:00
uebayasi
bc619545b7 Add generated *.c files (devsw.c and ioconf.c) to ${CFILES} by config(1)
internally.  ${MI_CFILES} in Makefile.kern.inc is no longer needed.
2015-09-03 14:23:52 +00:00
uebayasi
b5b4952dae After thought, revert "Generate *.c files under conf/". Generate *.c files
under top build directory.  *.c files are never placed just under $S/.  Keep
this exclusiveness.
2015-09-03 13:53:36 +00:00
uebayasi
dccd2cf552 In `-S' mode, generate *.c files under conf/ subdirectory. Register generated
.c files to the `files' list internally.
2015-09-02 05:09:25 +00:00
uebayasi
b06817457f Experimental ``suffix rules + subdirectories'' build support (-S). 2015-09-01 16:01:23 +00:00
uebayasi
2cb009cdd9 Introduce a new syntax, "buildprefix", to specify prefix of files under kernel
build subdirectory.  This is not used now that everything is built at the
top of kernel build directory.  It will become mandatory for source/object
files put out of kernel source tree to specify corresponding build subdirectory.
Only ``no dots''  relative path is accepted as "buildprefix".
2015-09-01 13:42:48 +00:00
uebayasi
974426dd69 Keep track of directory of files internally. 2015-09-01 12:46:20 +00:00
uebayasi
3374c75eeb Use per-suffix lists where appropriate. 2015-09-01 12:10:56 +00:00
uebayasi
0b130540fb Merge struct objects into struct files. Keep per-suffix file lists. 2015-09-01 11:22:59 +00:00
uebayasi
ca847f032e Revert "Retire optional rule' argument of file' command". It is still used
in m68k ports.
2015-08-29 02:54:07 +00:00
uebayasi
54e231918a Retire optional rule' argument of file' command.
This has existed since Rev. 1.1 of Torek's config(8) [1], but probably has
never been used by anyone.

(I can not imagine how a `file' like look like if `rule' is specified.)

[1] http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.sbin/config.new/Attic/files.c?rev=1.1
2015-08-28 09:04:02 +00:00
uebayasi
36644ae2ff Error out if a given path is absolute. 2015-08-28 08:56:39 +00:00
uebayasi
57751c8485 Pre-calc file path len/suffix. Misc. clean up. 2014-11-17 00:53:15 +00:00
christos
d12b0036c5 - add RCSID's
- fix -Wconversion (except scanner)
2014-10-29 17:14:50 +00:00
uebayasi
b35679c08e FIT_FORCESELECT is never set anywhere. 2014-10-09 19:27:04 +00:00
uebayasi
adf6a4556b Define an implicit attribute "netbsd" internally to collect files that don't
belong to any specific attribute.

Eventually, all operations doing "foreach (files)" can be rewritten as "foreach
(attributes) foreach (files)".
2014-10-09 15:25:26 +00:00
uebayasi
fa3d850434 If a file is marked by an atom expression, like "file a.c foo", and if the
specified expression is an attribute, mark the file as belonging to the
attribute.

At this moment this information is not used for any purpose, but can be
traced by config -ddd.
2014-10-09 10:29:36 +00:00
uebayasi
2820acceff Debug print where things are selected (by user). 2014-10-09 06:49:53 +00:00
dholland
d8da1d6013 avoid error path SIGSEGV 2014-05-21 05:25:34 +00:00
dholland
a551c5e8b7 Create a struct condexpr type to hold condition expressions, instead
of abusing struct nvlist to make trees.

(These are the a|b and a&b constructs.)
2012-03-11 08:21:53 +00:00
cube
a16a636500 Actually allow a full expression for the condition for "makeoptions" in
files.*

Patch from Yorick Hardy.
2009-03-13 18:24:41 +00:00
drochner
d767912be3 Change major()/minor() to return 32-bit types again, called
devmajor_t/devminor_t, as proposed on tech-kern.
This avoids 64-bit arithmetics and 64-bit printf formats in parts
of the kernel where it is not really useful, and helps clarity.
2009-01-20 18:20:47 +00:00
christos
0001b92828 rename nv_int -> nv_num and make it long long, so that dev_t will fit when
we change it.
2008-12-28 01:23:46 +00:00
dsl
8222554340 Be more informative about duplicated device names. 2007-11-30 23:19:18 +00:00
christos
c7295a4c51 - rename {x,}error -> cfg{x,}error and {x,}warn -> cfg{x,}warn so that we
can use err(3) and warn(3) to display errors instead of using inconsistent
  fprintf's.
- remove emalloc/estrdup etc. We have them in libutil.
2007-01-13 23:47:36 +00:00
alc
2f403ebe4f CID-4275: don't leak `fixdevmtab' 2006-12-26 00:07:18 +00:00
christos
c0156a4952 Coverity CID 175: Avoid memory leak; add new function to destroy a hash table. 2006-09-27 19:05:46 +00:00
christos
d0fb89015b Now that this is part of tools, we don't need the extra build glue. 2006-08-26 18:17:13 +00:00
erh
cd42936263 Remove special hack for swapnetbsd.c when generating the makefile.
Instead, just add it to the list of files.
Make "prefix foo" lines actually work right when foo is an absolute path,
 and make sure the length calculations correspond to the output.
Provide a way to specify a file that will always be included, and a way
 to omit the prologue ("$S/") on that file.
2005-11-07 03:26:20 +00:00
thorpej
5ecc953bdb config and genassym are not sysadmin tools, they are development tools.
As such, they don't belong in /usr/sbin, but rather /usr/bin.  Move them
there.
2005-06-05 18:19:52 +00:00