# 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
-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
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}
#ifndef lint
-static char sccsid[] = "@(#)cpp.c 1.17 %G%";
+static char sccsid[] = "@(#)cpp.c 1.18 %G%";
#endif lint
#ifdef FLEXNAMES
#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
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);
}
}
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";