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.
This commit is contained in:
uebayasi 2014-12-15 10:10:24 +00:00
parent e415342202
commit 10b064f35c
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mkmakefile.c,v 1.34 2014/11/21 20:46:56 christos Exp $ */
/* $NetBSD: mkmakefile.c,v 1.35 2014/12/15 10:10:24 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@ -45,7 +45,7 @@
#endif
#include <sys/cdefs.h>
__RCSID("$NetBSD: mkmakefile.c,v 1.34 2014/11/21 20:46:56 christos Exp $");
__RCSID("$NetBSD: mkmakefile.c,v 1.35 2014/12/15 10:10:24 uebayasi Exp $");
#include <sys/param.h>
#include <ctype.h>
@ -581,6 +581,7 @@ emitload(FILE *fp)
fputs("\n\n", fp);
TAILQ_FOREACH(cf, &allcf, cf_next) {
fprintf(fp, "KERNELS+=%s\n", cf->cf_name);
fprintf(fp, "build_kernel:\n");
fprintf(fp, "%s: ${SYSTEM_DEP} swap%s.o vers.o build_kernel\n",
cf->cf_name, cf->cf_name);
fprintf(fp, "swap%s.o: swap%s.c\n"