]> andersk Git - moira.git/blob - util/makedepend/Imakefile
Fix for new type of make config
[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 SOURCES = \
17         ${SRCDIR}/util/makedepend/include.c \
18         ${SRCDIR}/util/makedepend/main.c \
19         ${SRCDIR}/util/makedepend/parse.c \
20         ${SRCDIR}/util/makedepend/pr.c \
21         ${SRCDIR}/util/makedepend/cppsetup.c \
22         ${SRCDIR}/util/makedepend/cpp.ed \
23         ${SRCDIR}/util/makedepend/Imakefile \
24         ${SRCDIR}/util/makedepend/Makefile
25 OBJS = include.o main.o parse.o pr.o cppsetup.o cpp.o cpy.o
26 DEFINES = -DCPP '-DINCLUDEDIR="/usr/include"'
27 CPPSRC = cpp_source_path
28
29 #else
30
31 #
32 # But if you don't have cpp source...
33 #
34 SRCS = include.c main.c parse.c pr.c cppsetup.c
35 SOURCES = \
36         ${SRCDIR}/util/makedepend/include.c \
37         ${SRCDIR}/util/makedepend/main.c \
38         ${SRCDIR}/util/makedepend/parse.c \
39         ${SRCDIR}/util/makedepend/pr.c \
40         ${SRCDIR}/util/makedepend/cppsetup.c \
41         ${SRCDIR}/util/makedepend/Imakefile \
42         ${SRCDIR}/util/makedepend/Makefile
43 OBJS = include.o main.o parse.o pr.o cppsetup.o
44 DEFINES = '-DINCLUDEDIR="/usr/include"'
45
46 #endif
47
48 CODE=$(SRCS) Imakefile
49
50 genutil(makedepend,$(OBJS),,)
51
52 cpy.c: cpy.y yylex.c
53         yacc cpy.y
54         sed -e '/^# *line/d' < y.tab.c > cpy.c
55         $(RM) y.tab.c
56
57 cpy.y: $(CPPSRC)/cpy.y
58         $(RM) $@
59         $(LN) $(CPPSRC)/cpy.y .
60
61 yylex.c: $(CPPSRC)/yylex.c
62         $(RM) $@
63         sed -e 's/#if pdp11 | vax | mc68000/& | ns16000 | ibm032/' \
64                 $(CPPSRC)/yylex.c > yylex.c
65
66 cpp.c: $(CPPSRC)/cpp.c cpp.ed
67         $(RM) cpp.c
68         /lib/cpp $(CPPSRC)/cpp.c \
69                 | cb \
70                 | sed -e '/^$$/d' -e '/^#/d' -e 's/     / /g' > cpp.c
71         sed -e '/^#/d' < cpp.ed | ed - cpp.c
72
73 cpp.o: cpp.c
74 cpy.o: cpy.c
75
76 clean::
77         $(RM) cpp.c cpy.? yylex.c
78
79 config: $(SOURCES)
80         -mkdir $(DESTDIR)/util
81         -mkdir $(DESTDIR)/util/makedepend
82         for i in $(SOURCES); do \
83                 $(RM) ${DESTDIR}/util/makedepend/`basename $$i`; \
84                 $(CP) $$i ${DESTDIR}/util/makedepend/`basename $$i`; done
85
This page took 0.052384 seconds and 5 git commands to generate.