Commit Graph

395 Commits

Author SHA1 Message Date
christos 180ab6e0aa Add an enabled bit to keep track of the parent state (if we are ignoring
or parsing). Idea from uwe.
2020-03-09 17:27:03 +00:00
christos eb23c9a273 Add debugging, no functional change. 2020-03-08 17:38:37 +00:00
christos 782c9b9101 Recognize {if{,n}def,elfif{,n}def,else,endif} only at the beginning of the
line or after whitespace.
2020-03-08 00:04:11 +00:00
christos c2ac5ba400 PR/55057: Paul Goyette: Don't use % 6 arithmetic that hurts the brain for
the ifdef state machine, use bits and shifts instead. Also don't forget to
restore the state once an include file ends.
2020-03-07 22:35:16 +00:00
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
wiz 80e58ff06c genric -> generic 2020-03-05 22:44:19 +00:00
fox 8d874901c0 usr.bin/config: Suppress -Werror=stringop-truncation error.
Add GCC_NO_STRINGOP_TRUNCATION to scan.c to prevent build failure.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.
gcc version 8.3.0

Reviewed by: kamil@
2020-02-07 20:17:48 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
christos 2763409dc3 yydebug is now defined only if YYDEBUG is 2018-12-24 02:07:44 +00:00
riastradh 3432a2eb7f Bump config(5) version for OPT.foo.c variables. 2018-08-27 16:04:45 +00:00
riastradh 72c36f8199 Tag each .c file with the options that might have brought it in. 2018-08-27 05:35:00 +00:00
christos aa6e79d158 Keep previous location of device definitions so we can print them in error
messages.
2018-04-09 17:46:56 +00:00
christos 3ee01a2ea9 - make the level computation consistent
- keep going only if things changed.
2017-11-28 15:31:33 +00:00
christos dd0971df99 use a reference count to avoid deleting psrefs still in use. 2017-11-27 00:25:46 +00:00
christos e4a9783186 - Instead of checking the recursion level before we recurse, check in on
function entry.
- Always decrement the level and reset levelparent on exit.
2017-11-24 23:42:36 +00:00
christos 0daba4343e Tidy up error messages, line wraps, initialization. NFC. 2017-11-24 18:45:59 +00:00
christos 536abc0958 Don't print instances we've already printed. 2017-11-19 01:46:29 +00:00
kre b83cb69bb5 Remove a stray left over debug printf that crashes the builds (ab==NULL). 2017-11-19 00:41:10 +00:00
christos 3011cfe714 Allow multiple attachments methods to the same child+parent combination:
foo* at bar? with baz
    foo* at bar? with barf

Do this by scanning the list of iba's and allocating a new cfparent for
each. Keep track of the shared parent+child combinations by using the
same id for them.
2017-11-18 18:44:20 +00:00
christos 3434d2c82b - Factor out the remove_pspec code into a function.
- Avoid NULL pointer when printing an error.
2017-11-18 18:41:44 +00:00
christos 021dbaa0a1 add more debugging, no functional change. 2017-11-18 18:39:16 +00:00
christos de334c4e67 avoid creating infinite loops. 2017-11-18 01:11:05 +00:00
christos f4a905f0b8 When deleting orphans detect parent<->child loops and break them.
"active" is not a boolean, use the right comparison.
2017-11-16 17:08:07 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
christos c8eb41c615 un-c99 2017-06-16 02:01:10 +00:00
christos 8090156fb8 Bump for quoting makeoptions with multiple lines. 2017-06-16 00:10:09 +00:00
christos f3bbdc592c Allow multiline makeoptions to work by quoting the newline.. 2017-06-15 23:52:15 +00:00
christos ea8949d86b define the attribute first. 2016-09-13 16:06:59 +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
sevan 39bbc68a3b Drop main() prototype. 2016-09-05 00:40:28 +00:00
christos 6a9ab0dd0e Bump version for -no 2016-08-07 21:11:55 +00:00
christos f138f6c50d Accept "-no" as a "no" that does not cause errors if the object deleted
does not exist.
2016-08-07 10:37:24 +00:00
maya bd2a0d0ca6 Don't reference older CFATTACH_DECL 2016-07-19 17:01:04 +00:00
pgoyette e8f1cd85e9 Only emit bdevsw externs for entries in the bdev table, rather than for
entries in the cdev table.
2016-07-16 07:13:26 +00:00
wiz 4b483a8522 New sentence, new line. Bump date for previous. 2016-05-02 09:33:15 +00:00
mlelstv 6fc95ff617 Extend syntax of config phrase, a quoted string instead of a device name
is passed as root specification string. This can be used to specify a
wedge by name.
2016-04-29 18:18:22 +00:00
christos 0f160f0ea7 match the updated <sys/types.h> definition 2016-03-18 15:05:49 +00:00
uebayasi e1ddff408d A few more. 2015-11-22 01:20:36 +00:00
pooka d0f0cf2fcb In ioconfname mode, #define IOCONF as the ioconf token.
Avoids having to retype the name to call config_init/fini_component().
2015-11-12 14:38:21 +00:00
joerg 2bb600f982 Negating an integer and comparing it to 1 is a fancy way of checking for
0, which in this case would be DEVI_ORPHAN. That clearly can't be the
intention here, so switch to using != as operation without negation
instead.
2015-09-12 19:11:13 +00:00
uebayasi ba0b12db31 Libraries should be built in sub-make. libkern is polluting .PATH too much. 2015-09-11 02:26:22 +00:00
uebayasi 6639db6cc2 About ${CTFCONVERT}. 2015-09-08 05:48:07 +00:00
uebayasi fe281df765 ${MD_OBJS} and friends. 2015-09-08 02:23:34 +00:00
uebayasi 0e43d38dc2 ${LD} input files and library (*.a) support. 2015-09-08 00:53:39 +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 ce4642ec41 Make config(1) output only ${ALLFILES}, selected input files, and pass it to
Makefile.kern.inc, where files are filtered by suffix.
2015-09-04 06:10:47 +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 5b92bb3c7a Output ${ALLFILES}, the list of selected *.[csSo] files, sorted in the exact
order config(1) parses "file ..." commands in config(5) files.  Define
${CFILES}, ${SFILES}, and ${OFILES} as subset of ${ALLFILES} selected by
suffix.
2015-09-04 05:52:15 +00:00