Module Name: src
Committed By: uebayasi
Date: Thu Nov 6 11:40:32 UTC 2014
Modified Files:
src/usr.bin/config: defs.h main.c mkmakefile.c
Log Message:
config(1): Rename internal flag to enable modular build
To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/usr.bin/config/defs.h
cvs rdiff -u -r1.72 -r1.73 src/usr.bin/config/main.c
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/config/mkmakefile.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/config/defs.h
diff -u src/usr.bin/config/defs.h:1.61 src/usr.bin/config/defs.h:1.62
--- src/usr.bin/config/defs.h:1.61 Sat Nov 1 14:24:45 2014
+++ src/usr.bin/config/defs.h Thu Nov 6 11:40:32 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.61 2014/11/01 14:24:45 uebayasi Exp $ */
+/* $NetBSD: defs.h,v 1.62 2014/11/06 11:40:32 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -587,6 +587,7 @@ void emit_options(void);
void emit_params(void);
/* main.c */
+extern int Mflag;
void addoption(const char *, const char *);
void addfsoption(const char *);
void addmkoption(const char *, const char *);
@@ -629,7 +630,6 @@ int emitioconfh(void);
int mkioconf(void);
/* mkmakefile.c */
-extern int usekobjs;
int mkmakefile(void);
/* mkswap.c */
Index: src/usr.bin/config/main.c
diff -u src/usr.bin/config/main.c:1.72 src/usr.bin/config/main.c:1.73
--- src/usr.bin/config/main.c:1.72 Tue Nov 4 23:00:35 2014
+++ src/usr.bin/config/main.c Thu Nov 6 11:40:32 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.72 2014/11/04 23:00:35 joerg Exp $ */
+/* $NetBSD: main.c,v 1.73 2014/11/06 11:40:32 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: main.c,v 1.72 2014/11/04 23:00:35 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.73 2014/11/06 11:40:32 uebayasi Exp $");
#ifndef MAKE_BOOTSTRAP
#include <sys/cdefs.h>
@@ -89,6 +89,7 @@ COPYRIGHT("@(#) Copyright (c) 1992, 1993
int vflag; /* verbose output */
int Pflag; /* pack locators */
int Lflag; /* lint config generation */
+int Mflag; /* modular build */
int handling_cmdlineopts; /* currently processing -D/-U options */
int yyparse(void);
@@ -176,7 +177,7 @@ main(int argc, char **argv)
break;
case 'M':
- usekobjs = 1;
+ Mflag = 1;
break;
case 'L':
Index: src/usr.bin/config/mkmakefile.c
diff -u src/usr.bin/config/mkmakefile.c:1.25 src/usr.bin/config/mkmakefile.c:1.26
--- src/usr.bin/config/mkmakefile.c:1.25 Wed Oct 29 17:14:50 2014
+++ src/usr.bin/config/mkmakefile.c Thu Nov 6 11:40:32 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: mkmakefile.c,v 1.25 2014/10/29 17:14:50 christos Exp $ */
+/* $NetBSD: mkmakefile.c,v 1.26 2014/11/06 11:40:32 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: mkmakefile.c,v 1.25 2014/10/29 17:14:50 christos Exp $");
+__RCSID("$NetBSD: mkmakefile.c,v 1.26 2014/11/06 11:40:32 uebayasi Exp $");
#include <sys/param.h>
#include <ctype.h>
@@ -85,9 +85,6 @@ static void emitappmkoptions(FILE *);
static void emitsubs(FILE *, const char *, const char *, int);
static int selectopt(const char *, void *);
-/* Generate Makefile to build things per-attribute *.ko (a.k.a modular build). */
-int usekobjs = 0;
-
int
mkmakefile(void)
{
@@ -132,7 +129,7 @@ mkmakefile(void)
continue;
}
if (strcmp(line, "%OBJS\n") == 0)
- fn = usekobjs ? emitkobjs : emitobjs;
+ fn = Mflag ? emitkobjs : emitobjs;
else if (strcmp(line, "%CFILES\n") == 0)
fn = emitcfiles;
else if (strcmp(line, "%SFILES\n") == 0)