From be1d53ac569e84ec62c05ab1a1a17681fb20938b Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 11 Feb 2011 06:35:53 +0000 Subject: [PATCH] Generate MACHINE= and MACHINE_ARCH= lines based on the machine directive. Once this is MFC'd, we can move these out of the template files where they are (incosnsitently) defined. MFC after: 1 week --- usr.sbin/config/configvers.h | 2 +- usr.sbin/config/mkmakefile.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/config/configvers.h b/usr.sbin/config/configvers.h index 322e648eb20..6e044b89a73 100644 --- a/usr.sbin/config/configvers.h +++ b/usr.sbin/config/configvers.h @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600011 +#define CONFIGVERS 600012 #define MAJOR_VERS(x) ((x) / 100000) diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 08e1b634ddb..dd7aaa95242 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -140,6 +140,8 @@ makefile(void) if (ofp == 0) err(1, "%s", path("Makefile.new")); fprintf(ofp, "KERN_IDENT=%s\n", ident); + fprintf(ofp, "MACHINE=%s\n", machinename); + fprintf(ofp, "MACHINE_ARCH=%s\n", machinearch); SLIST_FOREACH_SAFE(op, &mkopt, op_next, t) { fprintf(ofp, "%s=%s", op->op_name, op->op_value); while ((op = SLIST_NEXT(op, op_append)) != NULL)