File: Makefile.in

package info (click to toggle)
cxref 1.5c-9
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,504 kB
  • ctags: 1,359
  • sloc: ansic: 16,721; yacc: 1,930; sh: 722; lex: 416; makefile: 345; lisp: 256; python: 80; perl: 78
file content (242 lines) | stat: -rw-r--r-- 6,999 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# $Header: /home/amb/cxref/RCS/Makefile.in 1.9 2001/03/18 10:29:25 amb Exp $
#
# C Cross Referencing & Documentation tool. Version 1.5c.
#
# Program Makefile.
#
# Written by Andrew M. Bishop
#
# This file Copyright 1995,96,97,98,99,2001 Andrew M. Bishop
# It may be distributed under the GNU Public License, version 2, or
# any higher version.  See section COPYING of the GNU Public license
# for conditions under which this file may be redistributed.
#

# autoconf things

objdir=@objdir@
srcdir=@srcdir@
VPATH=@srcdir@

# The installation locations

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
mandir=@mandir@

# The installation program.

INSTALL=@INSTALL@

# The C compiler and linker

CC=@CC@
LD=@CC@

CFLAGS=@CFLAGS@
LDFLAGS=@LDFLAGS@

# The Yacc program

YACC=@YACC@

# The Lex Program

LEX=@LEX@

# The Perl program

PERL=@PERL@

# The LaTeX and dvips programs

LATEX=@LATEX@
DVIPS=@DVIPS@

# The page size (for LaTeX and RTF).
# (A4 or US only.)

PAGE=@PAGE@

########

INCLUDE=
LIBRARY=@LIBS@

########

programs : cxref-cpp cxref cxref-inst cxref-query

docs : readme faq-html
	cd doc && $(MAKE)

all : programs docs

########

OBJ_FILES=func.o type.o var.o preproc.o comment.o file.o \
          slist.o memory.o \
          xref.o \
          warn-raw.o latex.o latex-style.o html.o rtf.o sgml.o \
          parse-lex.o parse-yacc.o

cxref : cxref.o $(OBJ_FILES)
	$(LD) $(LDFLAGS) cxref.o $(OBJ_FILES) -o $@ $(LIBRARY)

cxref-inst : cxref-inst.o $(OBJ_FILES)
	$(LD) $(LDFLAGS) cxref-inst.o $(OBJ_FILES) -o $@ $(LIBRARY)

####

cxref-cpp :
	cd cpp && $(MAKE) programs

####

cxref-query :
	cd query && $(MAKE) programs

########

faq-html : FAQ FAQ-html.pl
	[ "x$(PERL)" = "x" ] || $(PERL) $(srcdir)/FAQ-html.pl < $(srcdir)/FAQ > FAQ.html

####

readme : programs README.c
	cd $(srcdir) && $(objdir)/cxref -O$(objdir)/doc -NREADME -xref README.c
	cd $(srcdir) && $(objdir)/cxref -O$(objdir)/doc -NREADME -xref README.c -latex2e -html32-src -rtf -sgml
	cp doc/README.c.tex      README_c.tex
	cp doc/README.c.html     README.c.html
	cp doc/README.c.src.html README.c.src.html
	cp doc/README.c.rtf      README.c.rtf
	cp doc/README.c.sgml     README.c.sgml
	[ "x$(LATEX)" = "x" ] || $(LATEX) README.tex > /dev/null 2>&1
	[ "x$(LATEX)" = "x" ] || $(LATEX) README.tex
	[ "x$(DVIPS)" = "x" ] || $(DVIPS) README.dvi -o README.ps
	@rm -f README.aux README.log README.toc doc/README.*

########

install : programs
	[ -d $(bindir) ] || $(INSTALL) -d $(bindir)
	$(INSTALL) -m 755 cxref-inst $(bindir)/cxref
	$(INSTALL) -m 755 $(srcdir)/cxref-cc $(bindir)
	[ -d $(mandir)/man1 ] || $(INSTALL) -d $(mandir)/man1
	$(INSTALL) -m 644 $(srcdir)/README.man $(mandir)/man1/cxref.1
	cd cpp && $(MAKE) install
	cd query && $(MAKE) install

install-win32 : programs
	[ -d $(bindir) ] || $(INSTALL) -d $(bindir)
	$(INSTALL) -m 755 cxref-inst.exe $(bindir)/cxref.exe
	$(INSTALL) -m 755 cxref-cc $(bindir)
	cd cpp && $(MAKE) install-win32
	cd query && $(MAKE) install-win32

########

clean :
	-rm -f cxref cxref-inst core *.o *~ \
	lex.*.c y.tab.* latex-style.c \
	parse-yacc.c parse-yacc.h parse-lex.c \
	README.dvi README.ps
	cd cpp && $(MAKE) clean
	cd doc && $(MAKE) clean
	cd query && $(MAKE) clean

####

distclean : clean
	-rm -f Makefile autoconfig.h \
	config.log config.status config.cache
	cd cpp && $(MAKE) distclean
	cd doc && $(MAKE) distclean
	cd query && $(MAKE) distclean

########

parse-yacc.c : parse.y
	$(YACC) -d $<
	-@mv y.tab.c  parse-yacc.c
	@echo Created parse-yacc.c

parse-yacc.h : parse-yacc.c
	-@if cmp -s parse-yacc.h y.tab.h ; then : ; else \
	   if [ -f y.tab.h ] ; then \
	      cp y.tab.h parse-yacc.h ; \
	      echo Created parse-yacc.h ; \
	   fi \
	fi

####

parse-lex.c : parse.l
	$(LEX) $<
	-@mv lex.yy.c parse-lex.c
	@echo Created parse-lex.c

####

latex-style.c : $(srcdir)/doc/fonts.style $(srcdir)/doc/page.style $(srcdir)/doc/cxref.style
	@echo '/** The style files needed for LaTeX. **/' >  latex-style.c
	@echo ''                                          >> latex-style.c
	@echo '/*+ The fonts style file as a string. +*/' >> latex-style.c
	@echo 'char *latex_fonts_style='                  >> latex-style.c
	@sed 's/\\/\\\\/g' $(srcdir)/doc/fonts.style \
	|awk '{print "\"" $$0 "\\n\""}'                   >> latex-style.c
	@echo ';'                                         >> latex-style.c
	@echo ''                                          >> latex-style.c
	@echo '/*+ The page style file as a string. +*/'  >> latex-style.c
	@echo 'char *latex_page_style='                   >> latex-style.c
	@sed 's/	CONFIG-ONLY PAGE=$(PAGE)//g' $(srcdir)/doc/page.style \
	|grep -v 'CONFIG-ONLY' \
	|sed 's/\\/\\\\/g' \
	|awk '{print "\"" $$0 "\\n\""}'                   >> latex-style.c
	@echo ';'                                         >> latex-style.c
	@echo ''                                          >> latex-style.c
	@echo '/*+ The cxref style file as a string. +*/' >> latex-style.c
	@echo 'char *latex_cxref_style='                  >> latex-style.c
	@sed 's/\\/\\\\/g' $(srcdir)/doc/cxref.style \
	|awk '{print "\"" $$0 "\\n\""}'                   >> latex-style.c
	@echo ';'                                         >> latex-style.c
	@echo Created latex-style.c

####

%.o:%.c
	$(CC) -c $(CFLAGS) $< -o $@ $(INCLUDE) -I.

cxref.o      : cxref.c      cxref.h datatype.h memory.h parse-yy.h
	[ ! -f cpp/cxref-cpp ] || $(CC) -c $(CFLAGS) $(srcdir)/cxref.c -o $@ $(INCLUDE) "-DCXREF_CPP=\"$$PWD/cpp/cxref-cpp -C -dD -dI\""
	[   -f cpp/cxref-cpp ] || $(CC) -c $(CFLAGS) $(srcdir)/cxref.c -o $@ $(INCLUDE) "-DCXREF_CPP=\"$(CC) -E -C -dD -dI\""

cxref-inst.o : cxref.c      cxref.h datatype.h memory.h parse-yy.h
	[ ! -f cpp/cxref-cpp ] || $(CC) -c $(CFLAGS) $(srcdir)/cxref.c -o $@ $(INCLUDE) '-DCXREF_CPP="cxref-cpp -C -dD -dI"'
	[   -f cpp/cxref-cpp ] || $(CC) -c $(CFLAGS) $(srcdir)/cxref.c -o $@ $(INCLUDE) "-DCXREF_CPP=\"$(CC) -E -C -dD -dI\""

func.o       : func.c       cxref.h datatype.h memory.h parse-yy.h
type.o       : type.c       cxref.h datatype.h memory.h parse-yy.h
var.o        : var.c        cxref.h datatype.h memory.h parse-yy.h
comment.o    : comment.c    cxref.h datatype.h memory.h
file.o       : file.c       cxref.h datatype.h memory.h
preproc.o    : preproc.c    cxref.h datatype.h memory.h parse-yy.h

slist.o      : slist.c      cxref.h datatype.h memory.h
memory.o     : memory.c                        memory.h

xref.o       : xref.c       cxref.h datatype.h memory.h

warn-raw.o   : warn-raw.c   cxref.h datatype.h memory.h
latex.o      : latex.c      cxref.h datatype.h memory.h
latex-style.o: latex-style.c
html.o       : html.c       cxref.h datatype.h memory.h
rtf.o        : rtf.c        cxref.h datatype.h memory.h
	$(CC) -c $(CFLAGS) $(srcdir)/rtf.c -o $@ -DPAGE=\"$(PAGE)\" $(INCLUDE)
sgml.o       : sgml.c       cxref.h datatype.h memory.h

parse-yacc.o : parse-yacc.c cxref.h datatype.h memory.h parse-yy.h parse-yacc.h
parse-lex.o  : parse-lex.c  cxref.h datatype.h memory.h parse-yy.h parse-yacc.h

########