File: Makefile.in

package info (click to toggle)
cxref 1.6d-6
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,680 kB
  • sloc: ansic: 16,542; yacc: 2,091; sh: 917; lex: 462; perl: 452; makefile: 425; lisp: 256; cpp: 188; python: 80
file content (212 lines) | stat: -rw-r--r-- 6,585 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
#
# C Cross Referencing & Documentation tool. Version 1.6d.
#
# Program Makefile.
#
# Written by Andrew M. Bishop
#
# This file Copyright 1995-2011 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

srcdir=@srcdir@
VPATH=@srcdir@

# The installation locations

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=$(DESTDIR)@bindir@

# The installation program.

INSTALL=@INSTALL@

# The C compiler and linker

CC=@CC@
LD=@CC@

CFLAGS=@CFLAGS@
CPPFLAGS=@CPPFLAGS@
LDFLAGS=@LDFLAGS@

# The Yacc program

YACC=@YACC@

YACCFLAGS=-d
BISONFLAGS=-d

# The Lex Program

LEX=@LEX@

LEXFLAGS=
FLEXFLAGS=-p -B -F -8 -s

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

PAGE=@PAGE@

########

INCLUDE=-I. -I$(srcdir)
LIBRARY=@LIBS@

########

programs : cxref cxref-inst

all : programs

########

install : programs
	[ -d $(bindir) ] || $(INSTALL) -d $(bindir)
	$(INSTALL) -m 755 cxref-inst $(bindir)/cxref
	$(INSTALL) -m 755 $(srcdir)/cxref-cc $(bindir)

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

########

clean :
	-rm -f cxref cxref-inst core *.o *~ \
	lex.*.c y.tab.* latex-style.c html-style.c \
	parse-yacc.c parse-yacc.h parse-lex.c

####

distclean : clean
	-rm -f Makefile autoconfig.h

########

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 html-style.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)

########

parse-yacc.c parse-yacc.h : parse.y
	[ ! "$(YACC)" = "bison" ] || $(YACC) $(BISONFLAGS) $(srcdir)/parse.y
	[   "$(YACC)" = "bison" ] || $(YACC) $(YACCFLAGS)  $(srcdir)/parse.y
	-@if cmp -s parse-yacc.c y.tab.c ; then \
	   rm y.tab.c ; \
	else \
	   mv y.tab.c parse-yacc.c ; \
	   echo Created parse-yacc.c ; \
	fi
	-@if cmp -s parse-yacc.h y.tab.h ; then \
	   rm y.tab.h ; \
	else \
	   mv y.tab.h parse-yacc.h ; \
	   echo Created parse-yacc.h ; \
	fi

####

parse-lex.c : parse.l
	[ ! "$(LEX)" = "flex" ] || $(LEX) $(FLEXFLAGS) $(srcdir)/parse.l
	[   "$(LEX)" = "flex" ] || $(LEX) $(LEXFLAGS)  $(srcdir)/parse.l
	-@mv lex.yy.c parse-lex.c
	@echo Created parse-lex.c

####

latex-style.c : $(srcdir)/fonts.sty.in $(srcdir)/page.sty.in $(srcdir)/cxref.sty.in
	@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 -e 's/\\/\\\\/g' -e 's/"/\\"/g' $(srcdir)/fonts.sty.in \
	|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 -e 's/\\/\\\\/g' -e 's/"/\\"/g' $(srcdir)/page.sty.in \
	|sed 's/	CONFIG-ONLY PAGE=$(PAGE)//g' \
	|grep -v 'CONFIG-ONLY' \
	|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 -e 's/\\/\\\\/g' -e 's/"/\\"/g' $(srcdir)/cxref.sty.in \
	|awk '{print "\"" $$0 "\\n\""}'                   >> latex-style.c
	@echo ';'                                         >> latex-style.c
	@echo Created latex-style.c

####

html-style.c : $(srcdir)/cxref.css.in
	@echo '/** The Cascading Style Sheet for HTML. **/' > html-style.c
	@echo ''                                           >> html-style.c
	@echo '/*+ The cxref CSS file as a string. +*/'    >> html-style.c
	@echo 'char *html_cxref_style='                    >> html-style.c
	@sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' $(srcdir)/cxref.css.in \
	|awk '{print "\"" $$0 "\\n\""}'                    >> html-style.c
	@echo ';'                                          >> html-style.c
	@echo Created html-style.c

####

cpp_dir=@abs_top_builddir@/cpp

.SUFFIXES:
.SUFFIXES: .c .o

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

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

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

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            version.h
latex-style.o: latex-style.c
html.o       : html.c       cxref.h datatype.h memory.h            version.h
html-style.o : html-style.c
rtf.o        : rtf.c        cxref.h datatype.h memory.h            version.h
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ -DPAGE=\"$(PAGE)\" $(INCLUDE)
sgml.o       : sgml.c       cxref.h datatype.h memory.h            version.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

########