file system reorg
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Thu, 11 May 1989 11:58:43 +0000 (03:58 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Thu, 11 May 1989 11:58:43 +0000 (03:58 -0800)
SCCS-vsn: old/cpp/Makefile 1.7
SCCS-vsn: old/cpp/cpp.c 1.18

usr/src/old/cpp/Makefile
usr/src/old/cpp/cpp.c

index f4ab9fb..720d2c5 100644 (file)
@@ -3,11 +3,11 @@
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
-#      @(#)Makefile    1.6     (Berkeley)      %G%
+#      @(#)Makefile    1.7     (Berkeley)      %G%
 #
 CFLAGS=        -O -Dunix=1 -DFLEXNAMES
 LIBC=  /lib/libc.a
 #
 CFLAGS=        -O -Dunix=1 -DFLEXNAMES
 LIBC=  /lib/libc.a
-YYFIX= ../pcc/pcc.${MACHINE}/:yyfix
+YYFIX= ../../libexec/pcc/pcc.${MACHINE}/:yyfix
 SRCS=  cpp.c cpy.c rodata.c
 OBJS=  cpp.o cpy.o rodata.o
 
 SRCS=  cpp.c cpy.c rodata.c
 OBJS=  cpp.o cpy.o rodata.o
 
@@ -36,7 +36,7 @@ depend: ${SRCS}
        mkdep ${CFLAGS} ${SRCS}
 
 install: ${MAN}
        mkdep ${CFLAGS} ${SRCS}
 
 install: ${MAN}
-       install -s -o bin -g bin -m 755 cpp ${DESTDIR}/lib/cpp
+       install -s -o bin -g bin -m 755 cpp ${DESTDIR}/usr/bin
 
 lint: ${SRCS}
        lint ${CFLAGS} ${SRCS}
 
 lint: ${SRCS}
        lint ${CFLAGS} ${SRCS}
index 5564bac..9c1e6f2 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)cpp.c      1.17 %G%";
+static char sccsid[] = "@(#)cpp.c      1.18 %G%";
 #endif lint
 
 #ifdef FLEXNAMES
 #endif lint
 
 #ifdef FLEXNAMES
@@ -8,9 +8,11 @@ static char sccsid[] = "@(#)cpp.c      1.17 %G%";
 #define        NCPS    8
 #endif
 
 #define        NCPS    8
 #endif
 
-# include "sys/param.h"
-# include "stdio.h"
-# include "ctype.h"
+#include <sys/param.h>
+#include <stdio.h>
+#include <ctype.h>
+#include "pathnames.h"
+
 /* C command
 /* written by John F. Reiser
 /* July/August 1978
 /* C command
 /* written by John F. Reiser
 /* July/August 1978
@@ -1204,8 +1206,8 @@ main(argc,argv)
                if (tf!=(char *)0)
                        infile = tf + 1;
                mout=fout;
                if (tf!=(char *)0)
                        infile = tf + 1;
                mout=fout;
-               if (NULL==(fout=fopen("/dev/null", "w"))) {
-                       pperror("Can't open /dev/null");
+               if (NULL==(fout=fopen(_PATH_DEVNULL, "w"))) {
+                       fprintf(stderr, "cpp: can't open %s\n", _PATH_DEVNULL);
                        exit(8);
                }
        }
                        exit(8);
                }
        }
@@ -1213,7 +1215,7 @@ main(argc,argv)
        exfail = 0;
                /* after user -I files here are the standard include libraries */
 # if unix
        exfail = 0;
                /* after user -I files here are the standard include libraries */
 # if unix
-       dirs[nd++] = "/usr/include";
+       dirs[nd++] = _PATH_INCLUDES;
 # endif
 # if gcos
        dirs[nd++] = "cc/include";
 # endif
 # if gcos
        dirs[nd++] = "cc/include";