Commit Graph

12929 Commits

Author SHA1 Message Date
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
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 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 dfa246e2cf Fix build. 2015-09-03 06:08:38 +00:00
mrg aa0a9ba7c2 remove these items:
o Disallow unknown options.
 o Kill makeoptions.

because they're overly strict and i use these both regularly
to do stuff that isn't in the base src, and i'm quite sure
i am not the only one.
2015-09-03 05:45:16 +00:00
uebayasi 77d324a2b9 In `-S' mode, create symlinks from outside of $S to build directory, for
files that are placed outside of $S, so that `Makefile.kern.inc' can see all
files under either $S or build directory.
2015-09-03 02:45:24 +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 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 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 64903d9c8f Prepare to build subdirectories. Not enabled yet. 2015-09-01 14:32:20 +00:00
uebayasi 57eaa88e97 Bump version for "buildprefix". 2015-09-01 13:45:52 +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 3f0546850b Clean up struct files. 2015-09-01 12:32:26 +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 a0ed6f857a Start merging struct files and struct objects. 2015-09-01 10:37:48 +00:00
pgoyette 06cd199b91 Allow redefinition of options (with only a warning message). Removal
of non-included options was already only a warning.

This also affects redefinition and removal of file-system and makeoption
entries.

Reviewed and OKd by uebayasi@
2015-09-01 01:50:14 +00:00
uebayasi 5f38d8b6fe Properly handle absolute prefix. 2015-09-01 01:17:56 +00:00
jnemeth cd3c3a4632 If we're going to note the USSR shooting down civilian airliners,
we should be fair and pick on the USA as well.
2015-09-01 00:56:17 +00:00
uebayasi 4c482b808f Refactor emit file functions. No functional changes. 2015-09-01 00:38:30 +00:00
pgoyette b899b8fdca Need to read closer - there was another occurrence of the same tyepo 2015-08-31 12:00:12 +00:00
pgoyette 2ff0a553cb Tyepo 2015-08-31 11:52:37 +00:00
uebayasi b877b4042a Restore the old behavior of "maxusers" to allow the value to be overriden.
Problem reported by John D. Baker.
2015-08-31 02:58:25 +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
wiz 7cb8e9f6ca Fix a macro usage. Add more markup. 2015-08-30 06:57:51 +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 0fac7c8310 Define `makeoptions' values as parameters with "makeoptions_" prefix too.
C sources are encouraged to include relevant opt_*.h files rather than relying
on -DXXX passed via makefiles.
2015-08-30 01:33:20 +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 95712061f0 Revert MAXUSERS. CVS is hard. 2015-08-29 13:34:21 +00:00
uebayasi 9d7c5e580c Revert MAXUSERS changes. Need fresh air. 2015-08-29 07:33:18 +00:00
uebayasi 8b68b0de02 Fix previous. 2015-08-29 07:24:49 +00:00
uebayasi 4401376950 Define MAXUXERS in opt_param.h. Bump config(1) version. 2015-08-29 07:08:38 +00:00