Commit Graph

249 Commits

Author SHA1 Message Date
christos
e77b077223 use commands() instead of target() because assym.mk creates all the targets
unconditionally.
2015-11-27 20:59:47 +00:00
christos
8089a0f85d PR/50483: David A. Holland: fix building of assym.d:
1. use += to add to DEPS
	2. move inclusion of rules mk. files before the rules are defined
	   so that variables are set.

Now we get on amd64:

	mkdep: ignoring acpi_wakeup_low.d: No such file or directory
	mkdep: ignoring amd64func.d: No such file or directory
	mkdep: ignoring busfunc.d: No such file or directory
	mkdep: ignoring copy.d: No such file or directory
	mkdep: ignoring cpu_in_cksum.d: No such file or directory
	mkdep: ignoring cpufunc.d: No such file or directory

because there are no rules to generate those, but it is harmless.
2015-11-27 20:33:55 +00:00
uebayasi
229ff8e5ba Clean up splash image build. Print messages when creating files. 2015-09-15 02:22:43 +00:00
uebayasi
133a84bb3c Indent. 2015-09-11 01:40:52 +00:00
uebayasi
a8bf1974db Fix dependency of *.d -> assym.h in `-S' mode. 2015-09-10 13:11:39 +00:00
uebayasi
b04184e8d4 Preserve the order of files in ${ALLFILES} -> ${OBJS} conversion. 2015-09-07 15:55:06 +00:00
uebayasi
c009404037 More build ordering. 2015-09-06 15:20:59 +00:00
uebayasi
9e0fc0ebb7 Don't pass ``-DCOPY_SYMTAB'' to ${CC}; it's replaced with opt_copy_symtab.h. 2015-09-06 14:35:01 +00:00
uebayasi
2d76cceae9 Move ldscript related code out of Makefile.kern.inc. 2015-09-06 06:41:14 +00:00
uebayasi
ed2bed87de Clean up. Move assym.h/vers.c related code out of Makefile.kern.inc. 2015-09-06 06:13:16 +00:00
uebayasi
347749a8bd Clean up. Move SSP-specific adjustment out of Makefile.kern.inc. 2015-09-06 04:42:06 +00:00
uebayasi
472997e0ab Allow MD to link libraries. Build rules are written in MD makefiles until
config(1) will support library properly.
2015-09-06 02:05:11 +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
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
361a961386 Prepare for relative ${MD_OBJS}. 2015-09-03 12:31:16 +00:00
uebayasi
eaa72931c4 Move `all' target definition to Makefile.kern.inc. 2015-09-03 09:28:00 +00:00
uebayasi
caf44640e0 Kernel depends on swap<kernel>.o too. 2015-09-03 06:24:15 +00:00
uebayasi
fc3a975cb5 Sort dependendy to keep alphabetical build order. 2015-09-03 06:10:53 +00:00
uebayasi
d891b756ba Define kernel dependency in Makefile.kern.inc. 2015-09-03 06:09:46 +00:00
uebayasi
d01cbd6db6 Rename ${COMPILE.c} to ${KCOMPILE.c} to avoid potential conflicts with those
in sys.mk.  Define .go/.po suffix rules.
2015-09-03 04:17:55 +00:00
uebayasi
10a39df2f6 Refactor. 2015-09-03 03:47:25 +00:00
uebayasi
1d638ab7bf Simplify. Wrap long lines. 2015-09-03 01:40:06 +00:00
uebayasi
1587c3fa3a Stop ordering objects alphabetically now that I am sure I can fix fallouts. 2015-09-03 01:30:18 +00:00
uebayasi
185d99e39a Build conf/param.c normally. 2015-09-03 01:09:38 +00:00
uebayasi
4c17ec775b Fix link of kernels whose name don't start with "netbsd*". 2015-09-02 23:03:41 +00:00
uebayasi
350968d06a Build param.c under conf/ using suffix rules in `-S' mode. 2015-09-02 15:35:52 +00:00
uebayasi
4af08e031f Clean up `swap<kernel>.o' handling. 2015-09-02 15:29:23 +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
054cd04942 Add swap<kernel>.o to common ${SYSTEM_LD} as it is always linked. 2015-09-02 12:38:48 +00:00
uebayasi
d9bb176d5f Clean up some rules and make them less error prone. 2015-09-02 03:22:41 +00:00
uebayasi
1b2a74aeec Define suffix rules at the end to override system definitions. Provide them
only if ___USE_SUFFIX_RULES___ is defined (config -S).
2015-09-01 23:04:35 +00:00
uebayasi
e16ec3ea57 Experimental suffix-rules build (disabled by default). 2015-09-01 16:04:04 +00:00
uebayasi
1effbb59ae Fix "Define compile rules in sys/conf/Makefile.kern.inc ...".
Use `.if !commands(xxx)' to check if `xxx' has a defined, overriden rule,
instead of `.if !targets(xxx)'.  The latter evaluates as true even when `xxx'
has an empty rule to define a dependency.
2015-08-30 21:16:10 +00:00
uebayasi
ce0411ffa7 A makeoptions `DEFWARNINGS', forcibly disabling all ${CC} warnings, is only
used by hpcmips's NULLCONF, which doesn't even build for other causes.

If some source doen't build and needs a workaround, that should be deal with
by modifying per-file ${CC} options (e.g. COPTS.foo.c+=-fno-xxx).  Let's not
use DEFWARNINGS any longer.
2015-08-30 14:06:17 +00:00
uebayasi
8e50ed8849 Move splash logic, keep Makefile.kern.inc clean. 2015-08-30 07:33:53 +00:00
uebayasi
5e3f7c3b6d Put back MEMORY_DISK_IMAGE logic, but use generated opt_memory_root_image.h
and don't polute Makefile.kern.inc.
2015-08-30 05:24:03 +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
c692eec272 Use makeoptions_COPY_SYMTAB via opt_copy_symtab.h in sources. Remove a hack
to set -DCOPY_SYMTAB from sys/conf/Makefile.kern.inc.  Remove unnecessary
dependencies too.
2015-08-30 01:46:02 +00:00
uebayasi
3f77c79895 Move less important part out of Makefile.kern.inc. 2015-08-29 16:27:07 +00:00
uebayasi
ac62c32d4d Define two suffix rules, .c -> .o and .S -> .o, using ${NORMAL_C} and
${NORMAL_S} respectively.  Use the .c rule to build devsw.c, ioconf.c, and
param.c.  Other .c/.S files have explicit rules in the generated `Makefile',
and unaffected.
2015-08-29 16:07:07 +00:00
uebayasi
43d2d6ab0b Now that MAXUSERS is in opt_param.h, param.o doesn't depend on Makefile. 2015-08-29 15:58:38 +00:00
uebayasi
eee4f24ac6 According to nxr.netbsd.org, nothing uses MEMORY_DISK_IMAGE. Retire it.
Premature design and its build rule bloats Makefile.kern.inc.  There are
other ways like MEMORY_DISK_DYNAMIC.

(When kernel will be built as relocatable, embedding binary data will be much
easier, and md(4), splash(4), and ksyms(4) will all benefit.)
2015-08-29 15:51:53 +00:00
uebayasi
c0c2ceb91f genassym.cf and machdep.c are _KERNEL_OPT'ed, don't depend on Makefile. 2015-08-29 15:37:18 +00:00
uebayasi
d9fd5c1975 conf.c doesn't exist.
autoconf.c exists, but it's just a C file, no need to depend on Makefile.
2015-08-29 15:06:35 +00:00
uebayasi
aaedd29630 I don't see how uipc_proto.c can change its content by Makefile, don't depend
on Makefile.  vfs_conf.c doesn't even exist, remove it too.
2015-08-29 14:43:38 +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
aeabb302e9 Comment. 2015-08-29 05:03:36 +00:00