Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/config Make this build on Solaris (make -f Makefile...



details:   https://anonhg.NetBSD.org/src/rev/6240b3acd683
branches:  trunk
changeset: 471479:6240b3acd683
user:      gwr <gwr%NetBSD.org@localhost>
date:      Fri Apr 02 06:36:30 1999 +0000

description:
Make this build on Solaris (make -f Makefile.boot)

diffstat:

 usr.sbin/config/Makefile.boot |  18 ++++++++++--------
 usr.sbin/config/config.h      |  10 +++++++++-
 usr.sbin/config/main.c        |  10 +++++++++-
 3 files changed, 28 insertions(+), 10 deletions(-)

diffs (108 lines):

diff -r 788a86c5a948 -r 6240b3acd683 usr.sbin/config/Makefile.boot
--- a/usr.sbin/config/Makefile.boot     Fri Apr 02 03:50:54 1999 +0000
+++ b/usr.sbin/config/Makefile.boot     Fri Apr 02 06:36:30 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.boot,v 1.1 1996/11/07 22:59:39 gwr Exp $
+#      $NetBSD: Makefile.boot,v 1.2 1999/04/02 06:36:30 gwr Exp $
 #      from: @(#)Makefile      8.2 (Berkeley) 4/19/94
 #
 # a very simple makefile...
@@ -9,7 +9,7 @@
 CFLAGS= -I. -DMAKE_BOOTSTRAP
 
 # Uncomment this if your system does not have strtoul (i.e. SunOS)
-STRTOUL= -Dstrtoul=strtol
+# STRTOUL= -Dstrtoul=strtol
 
 # Note: The scanner here uses features specific to "flex" so
 # do not bother even trying to make lex build the scanner.
@@ -20,18 +20,20 @@
 YACC=yacc
 
 OBJS=  files.o hash.o main.o mkheaders.o mkioconf.o mkmakefile.o \
-       mkswap.o pack.o sem.o util.o y.tab.o lex.yy.o strerror.o
+       mkswap.o pack.o sem.o util.o gram.o lex.yy.o strerror.o
 
 config: ${OBJS}
        ${CC} -o $@ ${OBJS}
 
-y.tab.o : y.tab.c
-       ${CC} ${CFLAGS} -c y.tab.c
+gram.o : gram.c
+       ${CC} ${CFLAGS} -c gram.c
 
-y.tab.c y.tab.h : gram.y
+gram.c gram.h : gram.y
        ${YACC} -d gram.y
+       -mv -f y.tab.c gram.c
+       -mv -f y.tab.h gram.h
 
-lex.yy.o : lex.yy.c
+lex.yy.o : lex.yy.c gram.h
        ${CC} ${CFLAGS} ${STRTOUL} -c lex.yy.c
 
 lex.yy.c : scan.l
@@ -40,7 +42,7 @@
 ${OBJS} : config.h
 
 y.tab.o mkmakefile.o mkswap.o sem.o : sem.h
-lex.yy.o : y.tab.h
+lex.yy.o : gram.h
 
 .c.o:
        ${CC} ${CFLAGS} -c $<
diff -r 788a86c5a948 -r 6240b3acd683 usr.sbin/config/config.h
--- a/usr.sbin/config/config.h  Fri Apr 02 03:50:54 1999 +0000
+++ b/usr.sbin/config/config.h  Fri Apr 02 06:36:30 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: config.h,v 1.41 1999/01/21 13:10:08 pk Exp $   */
+/*     $NetBSD: config.h,v 1.42 1999/04/02 06:36:30 gwr Exp $  */
 
 /*
  * Copyright (c) 1992, 1993
@@ -75,6 +75,14 @@
 #define _PATH_DEVNULL "/dev/null"
 #endif
 
+#ifdef MAKE_BOOTSTRAP
+#undef major
+#undef minor
+#undef makedev
+#define        major(x)        ((int)(((u_int)(x) >> 8) & 0xff))
+#define        minor(x)        ((int)((x) & 0xff))
+#define        makedev(x,y)    ((int)(((x) << 8) | (y)))
+#endif /* MAKE_BOOTSTRAP */
 
 #define ARRCHR '#'
 
diff -r 788a86c5a948 -r 6240b3acd683 usr.sbin/config/main.c
--- a/usr.sbin/config/main.c    Fri Apr 02 03:50:54 1999 +0000
+++ b/usr.sbin/config/main.c    Fri Apr 02 06:36:30 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.38 1999/02/08 22:32:58 mjl Exp $    */
+/*     $NetBSD: main.c,v 1.39 1999/04/02 06:36:30 gwr Exp $    */
 
 /*
  * Copyright (c) 1992, 1993
@@ -95,6 +95,10 @@
 
 int badfilename __P((const char *fname));
 
+#ifdef MAKE_BOOTSTRAP
+char *__progname;
+#endif
+
 int
 main(argc, argv)
        int argc;
@@ -104,6 +108,10 @@
        const char *last_component;
        int pflag, ch;
 
+#ifdef MAKE_BOOTSTRAP
+       __progname = argv[0];
+#endif
+
        pflag = 0;
        while ((ch = getopt(argc, argv, "Dgpvb:s:")) != -1) {
                switch (ch) {



Home | Main Index | Thread Index | Old Index