Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/config config(1): Rename internal flag to enable mod...



details:   https://anonhg.NetBSD.org/src/rev/a378b9ea741e
branches:  trunk
changeset: 803650:a378b9ea741e
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Thu Nov 06 11:40:32 2014 +0000

description:
config(1): Rename internal flag to enable modular build

diffstat:

 usr.bin/config/defs.h       |  4 ++--
 usr.bin/config/main.c       |  7 ++++---
 usr.bin/config/mkmakefile.c |  9 +++------
 3 files changed, 9 insertions(+), 11 deletions(-)

diffs (97 lines):

diff -r ee302944ce07 -r a378b9ea741e usr.bin/config/defs.h
--- a/usr.bin/config/defs.h     Thu Nov 06 08:46:04 2014 +0000
+++ b/usr.bin/config/defs.h     Thu Nov 06 11:40:32 2014 +0000
@@ -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_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    mkioconf(void);
 
 /* mkmakefile.c */
-extern int usekobjs;
 int    mkmakefile(void);
 
 /* mkswap.c */
diff -r ee302944ce07 -r a378b9ea741e usr.bin/config/main.c
--- a/usr.bin/config/main.c     Thu Nov 06 08:46:04 2014 +0000
+++ b/usr.bin/config/main.c     Thu Nov 06 11:40:32 2014 +0000
@@ -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 @@
 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 @@
                        break;
 
                case 'M':
-                       usekobjs = 1;
+                       Mflag = 1;
                        break;
 
                case 'L':
diff -r ee302944ce07 -r a378b9ea741e usr.bin/config/mkmakefile.c
--- a/usr.bin/config/mkmakefile.c       Thu Nov 06 08:46:04 2014 +0000
+++ b/usr.bin/config/mkmakefile.c       Thu Nov 06 11:40:32 2014 +0000
@@ -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 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 @@
                        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)



Home | Main Index | Thread Index | Old Index