]> andersk Git - moira.git/blob - util/makedepend/Imakefile
*** empty log message ***
[moira.git] / util / makedepend / Imakefile
1 # $Source$
2 # $Author$
3 # $Header$
4 #
5 # Copyright 1987 by the Massachusetts Institute of Technology.
6 #
7 # For copying and distribution information,
8 # please see the file <mit-copyright.h>.
9 #
10 # Utility to build makefile header dependancies from C source.
11 #
12 # If you have source for cpp...
13 #
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
19
20 #else
21
22 #
23 # But if you don't have cpp source...
24 #
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"'
28
29 #endif
30
31 CODE=$(SRCS) Imakefile
32
33 genutil(makedepend,$(OBJS),,)
34
35 cpy.c: cpy.y yylex.c
36         yacc cpy.y
37         sed -e '/^# *line/d' < y.tab.c > cpy.c
38         $(RM) y.tab.c
39
40 cpy.y: $(CPPSRC)/cpy.y
41         $(RM) $@
42         $(LN) $(CPPSRC)/cpy.y .
43
44 yylex.c: $(CPPSRC)/yylex.c
45         $(RM) $@
46         sed -e 's/#if pdp11 | vax | mc68000/& | ns16000 | ibm032/' \
47                 $(CPPSRC)/yylex.c > yylex.c
48
49 cpp.c: $(CPPSRC)/cpp.c cpp.ed
50         $(RM) cpp.c
51         /lib/cpp $(CPPSRC)/cpp.c \
52                 | cb \
53                 | sed -e '/^$$/d' -e '/^#/d' -e 's/     / /g' > cpp.c
54         sed -e '/^#/d' < cpp.ed | ed - cpp.c
55
56 cpp.o: cpp.c
57 cpy.o: cpy.c
58
59 clean::
60         $(RM) cpp.c cpy.? yylex.c
61
This page took 0.041791 seconds and 5 git commands to generate.