5 # Copyright 1987 by the Massachusetts Institute of Technology.
7 # For copying and distribution information,
8 # please see the file <mit-copyright.h>.
10 # Utility to build makefile header dependancies from C source.
12 # If you have source for cpp...
14 #ifdef cpp_source_path
15 SRCS = include.c main.c parse.c pr.c cppsetup.c cpp.c cpy.y
16 OBJS = include.o main.o parse.o pr.o cppsetup.o cpp.o cpy.o
17 DEFINES = -DCPP '-DINCLUDEDIR="/usr/include"'
18 CPPSRC = cpp_source_path
23 # But if you don't have cpp source...
25 SRCS = include.c main.c parse.c pr.c cppsetup.c
26 OBJS = include.o main.o parse.o pr.o cppsetup.o
27 DEFINES = '-DINCLUDEDIR="/usr/include"'
31 CODE=$(SRCS) Imakefile
33 genutil(makedepend,$(OBJS),,)
37 sed -e '/^# *line/d' < y.tab.c > cpy.c
40 cpy.y: $(CPPSRC)/cpy.y
42 $(LN) $(CPPSRC)/cpy.y .
44 yylex.c: $(CPPSRC)/yylex.c
46 sed -e 's/#if pdp11 | vax | mc68000/& | ns16000 | ibm032/' \
47 $(CPPSRC)/yylex.c > yylex.c
49 cpp.c: $(CPPSRC)/cpp.c cpp.ed
51 /lib/cpp $(CPPSRC)/cpp.c \
53 | sed -e '/^$$/d' -e '/^#/d' -e 's/ / /g' > cpp.c
54 sed -e '/^#/d' < cpp.ed | ed - cpp.c
60 $(RM) cpp.c cpy.? yylex.c