Make this build on Solaris (make -f Makefile.boot)
This commit is contained in:
parent
770f65cee6
commit
5a4e7b6de7
|
@ -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 @@ CC=gcc -O
|
|||
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 @@ LEX=flex -l
|
|||
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 @@ lex.yy.c : scan.l
|
|||
${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 $<
|
||||
|
|
|
@ -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 '#'
|
||||
|
||||
|
|
|
@ -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 @@ void defopt __P((struct hashtab *ht, const char *fname,
|
|||
|
||||
int badfilename __P((const char *fname));
|
||||
|
||||
#ifdef MAKE_BOOTSTRAP
|
||||
char *__progname;
|
||||
#endif
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
|
@ -104,6 +108,10 @@ main(argc, argv)
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue