riastradh
72c36f8199
Tag each .c file with the options that might have brought it in.
2018-08-27 05:35:00 +00:00
christos
c8eb41c615
un-c99
2017-06-16 02:01:10 +00:00
christos
f3bbdc592c
Allow multiline makeoptions to work by quoting the newline..
2017-06-15 23:52:15 +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
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
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
9d10d0209d
Pretty-print `Makefile' output.
2015-09-03 13:32:07 +00:00
uebayasi
eaa72931c4
Move `all' target definition to Makefile.kern.inc.
2015-09-03 09:28:00 +00:00
uebayasi
d891b756ba
Define kernel dependency in Makefile.kern.inc.
2015-09-03 06:09:46 +00:00
uebayasi
a453d60989
Fix build.
2015-09-02 16:29:44 +00:00
uebayasi
7a8426662a
Define ${OBJS} in `Makefile.kern.inc'. Relative paths are not truncated
...
(a/b/c/x.c -> x.c) in `-S' mode. Don't provide some explicit rules for `-S'
mode for safety.
2015-09-02 14:17:03 +00:00
uebayasi
558aab1be0
Output relative path for ${CFILES} and ${SFILES} in generated `Makefile'.
...
`Makefile.kern.inc' knows how to deal with $S prefix, so don't bother it in
config(1).
2015-09-02 13:42:14 +00:00
uebayasi
7db0c115b3
Simplify generated `Makefile' by calculating ${OBJS} from merging ${CFILES},
...
${SFILES}, and ${OFILES} except swap<kernel>.o excluded.
2015-09-02 13:06:06 +00:00
uebayasi
e53d4b70ba
Fix build.
2015-09-01 20:18:41 +00:00
uebayasi
b06817457f
Experimental ``suffix rules + subdirectories'' build support (-S).
2015-09-01 16:01:23 +00:00
uebayasi
3374c75eeb
Use per-suffix lists where appropriate.
2015-09-01 12:10:56 +00:00
uebayasi
f5d74fcda3
Abstract struct filetype is no longer needed.
2015-09-01 11:35:46 +00:00
uebayasi
0b130540fb
Merge struct objects into struct files. Keep per-suffix file lists.
2015-09-01 11:22:59 +00:00
uebayasi
5f38d8b6fe
Properly handle absolute prefix.
2015-09-01 01:17:56 +00:00
uebayasi
4c482b808f
Refactor emit file functions. No functional changes.
2015-09-01 00:38:30 +00:00
uebayasi
cf356c3efd
Revert "Accept only relative paths ...". This will be redone in much better,
...
stricter way.
2015-08-30 21:58:19 +00:00
uebayasi
623bd6b2aa
Define compile rules in sys/conf/Makefile.kern.inc except those overriden by
...
"file ... compile-with ...". As rules are still explicit, be careful to not
override by checking .if !target(xxx.o).
2015-08-30 05:12:00 +00:00
uebayasi
8c9276859d
No need to define swap<kernel>.o build rule.
2015-08-29 17:42:05 +00:00
uebayasi
b6c3503b87
Define ``normal'' .c/.S rules as .for loops. Still explicit and ugly, but
...
these will be eventually replaced with suffix rules. Tested x68k where .c/.S
rules are overriden with "compile-with".
2015-08-29 17:35:23 +00:00
uebayasi
75298111a7
Convert MAXUSERS, take 2.
...
Define MAXUSERS in opt_param.h and include it from sys/param.h, for more
accurate dependency. Don't define -DMAXUSERS and add it to ${CPPFLAGS}.
config(5)'s "maxusers" syntax doesn't change.
(The version just before revert was OK, but I had something bad in my obj
dirs.)
2015-08-29 14:07:45 +00:00
uebayasi
9d7c5e580c
Revert MAXUSERS changes. Need fresh air.
2015-08-29 07:33:18 +00:00
uebayasi
4401376950
Define MAXUXERS in opt_param.h. Bump config(1) version.
2015-08-29 07:08:38 +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
b5595827d0
Simplify.
2015-08-28 09:16:29 +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
47065f5afc
Accept only relative paths (from $S) for `file' and `object'. Simplify code.
...
config(1) does not need to be super-smart about path handling, because it is
usually used with make(1), that is much smarter.
Pre-compiled object files, specified using `object', are regarded as read-only
input, thus they should be put under $S (or $S/..), as part of a source tree.
2015-08-28 08:31:28 +00:00
uebayasi
50408f97eb
Global paths looked up at output stage (mk*()) are relative to `srcdir'.
...
Ignore "prefix" by not calling sourcepath().
2015-08-28 03:55:15 +00:00
uebayasi
d8aa702d35
Revert debug code. Simplify.
2014-12-15 15:49:25 +00:00
uebayasi
fc1f7728b8
config(1): Fix build of old trees (bin/49389) (take 2)
...
Look into sys/conf/Makefile.kern.inc to check if "build_kernel" .USE target
is defined. If not (== old source trees), generate one on the fly.
2014-12-15 15:41:18 +00:00
uebayasi
10b064f35c
config(1): Fix build of old tree (bin/49389)
...
Define the default, empty "build_kernel" target, so that old source trees,
whose sys/conf/Makefile.kern.inc don't have "build_kernel" .USE target, can
be built.
(When "build_kernel" is defined, the target is overriden, as far as
sys/conf/Makefile.kern.inc is included later than the "netbsd: ..." definition
in sys/arch/*/conf/Makefile.*.)
This should address PR bin/49389.
2014-12-15 10:10:24 +00:00
christos
c8da6eb49b
Use proper index types, delete casts, use correct sizeof() in allocations.
2014-11-21 20:46:56 +00:00
uebayasi
57751c8485
Pre-calc file path len/suffix. Misc. clean up.
2014-11-17 00:53:15 +00:00
uebayasi
9eb1865390
Fix oops in r1.30.
2014-11-16 15:10:54 +00:00
uebayasi
d2824e0952
Simpfily code by assuming suffix is a single character.
2014-11-16 14:57:59 +00:00
uebayasi
8a0d672c53
Refactor.
2014-11-16 14:49:12 +00:00
uebayasi
20fd8a9d0f
Consistently wrap long lines in ioconf.c.
2014-11-16 14:26:14 +00:00
uebayasi
dfd51da465
config(1): Avoid buffer overrun (modular build)
2014-11-15 12:18:55 +00:00
uebayasi
70dd8e7d2a
config(1): Sort objects by weight in modular build
...
Sort per-module kernel objects (*.ko) by dependency weight. Important modules
are placed in lower addresses. The ``machdep'' module will be always placed
in the lowest.
(At this moment, the order is not exact because dependency information is
incomplete in config files (files.*). Thus ``sysmon_power.ko'' comes lower
than ``machdep.ko'' and/or ``uvm.ko''; but still much better than alphabetical
sort.)
2014-11-15 08:21:38 +00:00
uebayasi
7710d317bc
config(1): Rename internal flag to enable modular build
2014-11-06 11:40:32 +00:00
christos
d12b0036c5
- add RCSID's
...
- fix -Wconversion (except scanner)
2014-10-29 17:14:50 +00:00
uebayasi
1c89d26524
Style.
2014-10-09 19:33:43 +00:00
uebayasi
9a04781594
FIT_NOPROLOGUE is never set anywhere.
2014-10-09 19:24:36 +00:00
uebayasi
eb981efe66
Kill more unused indent code in emitfiles().
2014-10-09 19:22:31 +00:00