-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.in
284 lines (238 loc) · 8.47 KB
/
Makefile.in
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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
#*****************************************************************************
# DESCRIPTION: Dinotrace: Makefile pre-configure version
#
# This file is part of Dinotrace.
#
# Author: Wilson Snyder <[email protected]>
#
# Code available from: https://www.veripool.org/dinotrace
#
#*****************************************************************************
#
# This file is covered by the GNU public licence.
#
# Dinotrace is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# Dinotrace is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Dinotrace; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
#****************************************************************************/
#
# make all to compile and build Dinotrace.
# make install to install it.
# make TAGS to update tags tables.
#
# make clean or make mostlyclean
# Delete all files from the current directory that are normally
# created by building the program. Don't delete the files that
# record the configuration. Also preserve files that could be made
# by building, but normally aren't because the distribution comes
# with them.
#
# make distclean
# Delete all files from the current directory that are created by
# configuring or building the program. If you have unpacked the
# source and built the program without creating any other files,
# `make distclean' should leave only the files that were in the
# distribution.
#
# make maintainer-clean
# Delete everything from the current directory that can be
# reconstructed with this Makefile. This typically includes
# everything deleted by distclean, plus more: C source files
# produced by Bison, tags tables, info files, and so on.
#
# make extraclean
# Still more severe - delete backup and autosave files, too.
#### Start of system configuration section. ####
abs_srcdir = @abs_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
HOST = @HOST@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
RST2HTML = rst2html
PERL = @PERL@
#### Don't edit: You're much better using configure switches to set these
prefix = @prefix@
exec_prefix = @exec_prefix@
# Directory in which to install scripts.
bindir = @bindir@
# Directory in which to install library files.
datadir = @datadir@
# Directory in which to install documentation info files.
infodir = @infodir@
# Directory in which to install package specific files
# Note this gets coded into src/config.h also
pkgdatadir = @pkgdatadir@
#### End of system configuration section. ####
######################################################################
SHELL = /bin/sh
SUBDIRS = src lisp
INFOS = dinotrace.info dinotrace.txt dinotrace.pdf
CPPCHECK = cppcheck
CPPCHECK_FLAGS = --enable=all --suppress=variableScope --inline-suppr
# Files that can be generated, but should be up to date for a distribution.
DISTDEP = $(INFOS) Makefile src/dinodoc.pl src/dist_date.pl
# Files to distribute.
DISTBIN = $(wildcard bin/dinotrace-*)
DISTFILES = $(INFOS) COPYING Changes configure *.in *.ac \
config.sub \
install-sh mkinstalldirs *.texi *.com \
*.rst \
docs/*.rst \
docs/*.png \
docs/TODO.txt \
docs/html_texi_clean \
src/*.in src/*.h src/*.c src/*.pl src/*.com lisp/* traces/* \
$(DISTBIN)
all: dinotrace_exe info
test: dinotrace_exe
./dinotrace traces/ascii.tra
obj_dir:
-mkdir -p $@
obj_dbg:
-mkdir -p $@
bin:
-mkdir -p bin
.PHONY:dinotrace_exe
.PHONY:dinotrace_dbg
.PHONY:dinotrace
dinotrace_exe dinotrace: obj_dir bin
@echo making dinotrace in obj_dir
cd obj_dir && $(MAKE) -f $(abs_srcdir)/src/Makefile dinotrace
(cp obj_dir/dinotrace ./dinotrace >/dev/null 2>&1\
|| cp obj_dir/dinotrace.exe ./dinotrace.exe >/dev/null 2>&1)
(cp obj_dir/dinotrace bin/dinotrace-$(HOST) >/dev/null 2>&1\
|| cp obj_dir/dinotrace.exe bin/dinotrace-$(HOST).exe >/dev/null 2>&1)
dinotrace_dbg: obj_dbg
@echo making dinotrace in obj_dbg
cd obj_dbg && $(MAKE) DT_DEBUG=1 -f $(abs_srcdir)/src/Makefile dinotrace
(cp obj_dbg/dinotrace ./dinotrace_dbg >/dev/null 2>&1\
|| cp obj_dbg/dinotrace.exe ./dinotrace_dbg.exe >/dev/null 2>&1)
cppcheck: obj_dbg
cd obj_dbg && $(CPPCHECK) $(CPPCHECK_FLAGS) -DDEBUG -I$(srcdir) ..
info: $(INFOS)
# Use --no-split to avoid creating filenames > 14 chars.
dinotrace.info: dinotrace.texi
$(MAKEINFO) -I$(srcdir) $(srcdir)/dinotrace.texi --no-split --output=$@
dinotrace.txt: dinotrace.texi
$(MAKEINFO) -I$(srcdir) $(srcdir)/dinotrace.texi --output=$@ \
--no-headers --no-validate
README.html: README.rst
$(RST2HTML) $< $@
docs/FAQ.html: docs/FAQ.rst
$(RST2HTML) $< $@
%.html: %.texi
perl docs/html_texi_clean $*.texi >$*.tmp
texi2html -monolithic $*.tmp
mv $*.tmp.html $*.html
rm $*.tmp
%.pdf: %.texi
perl docs/html_texi_clean $*.texi >$*.tmp
texi2pdf $*.tmp
rm $*.tmp
dvi: dinotrace.dvi
dinotrace.dvi: dinotrace.texi
$(TEXI2DVI) $(srcdir)/dinotrace.texi
installdirs:
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(infodir)
install: all info installdirs install-info
for p in dinotrace; do \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
done
@echo ""
@echo "*** Lisp files not installed, you may want to"
@echo "*** cd lisp ; make install"
@echo ""
@echo "Type 'setenv DISPLAY :0.0' then 'dinotrace' to test."
# Don't cd, to avoid breaking install-sh references.
install-info: info installdirs
for i in *.info*; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i; \
done
uninstall:
cd $(DESTDIR)$(bindir) && rm -f dinotrace
cd $(DESTDIR)$(infodir) && rm -f dinotrace.info*
# autoheader might not change config.h.in, so touch a stamp file.
${srcdir}/config.h.in: stamp-h.in
${srcdir}/stamp-h.in: configure.ac Makefile.in ${srcdir}/Makefile.in ${srcdir}/config.h.in
cd ${srcdir} && autoheader
echo timestamp > ${srcdir}/stamp-h.in
config.h: stamp-h
stamp-h: config.h.in config.status
./config.status
Makefile: Makefile.in config.status
./config.status
src/Makefile: src/Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
configure: configure.ac
autoconf
maintainer-clean::
@echo "This command is intended for maintainers to use;"
@echo "rebuilding the deleted files requires makeinfo."
rm -f *.info* $(INFOS) FAQ.html FAQ.pdf dinotrace.html dinotrace.pdf configure bin/*
clean mostlyclean distclean maintainer-clean maintainer-copy::
for dir in $(SUBDIRS); do \
echo making $@ in $$dir ; \
(cd $$dir && $(MAKE) $@) ; \
done
clean mostlyclean distclean maintainer-clean::
rm -rf obj_*
rm -f $(SCRIPTS) *.tmp
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
rm -f *.ev *.evs *.ov *.ovs *.cv *.cvs *.ma *.mas
distclean maintainer-clean::
rm -f Makefile config.status config.cache config.log dinotrace dinotrace.exe TAGS
rm -rf autom4te.cache
TAGFILES=${srcdir}/src/*.c ${srcdir}/src/*.h ${srcdir}/src/[a-z]*.in \
${srcdir}/[a-z]*.in ${srcdir}/*.texi
TAGS: $(TAGFILES)
etags $(TAGFILES)
tag:
distname=`sed -e '/DTVERSION/!d' \
-e 's/[^0-9]*\([0-9.a-z]*\).*/dinotrace_\1/' \
-e 's/[^A-Za-z0-9]/_/g' \
-e q src/config.h.in`; \
svnorcvs tag $$distname
valgrind: dinotrace
valgrind --suppressions=$(HOME)/.valgrind.supp ./dinotrace
# Don't depend on DISTFILES because there's no rule for "standards.info*".
dist: $(DISTDEP) maintainer-copy
distname=`sed -e '/DTVERSION/!d' \
-e 's/[^0-9]*\([0-9.a-z]*\).*/dinotrace-\1/' -e q src/config.h.in`; \
rm -fr $$distname; \
mkdir $$distname $$distname/src $$distname/lisp $$distname/traces ; \
mkdir $$distname/bin $$distname/docs ; \
for file in $(DISTFILES); do \
ln $$file $$distname/$$file \
|| { echo copying $$file instead; cp -p $$file $$distname/$$file;}; \
done; \
chmod -R a+r $$distname; \
tar chf $$distname.tar $$distname; \
gzip --force --best $$distname.tar; \
rm -fr $$distname; \
maintainer-dist: dist tag
svnorcvs release *.gz
maintainer-diff:
distname=`sed -e '/DTVERSION/!d' \
-e 's/[^0-9]*\([0-9.a-z]*\).*/dinotrace_\1/' \
-e 's/[^A-Za-z0-9]/_/g' \
-e q src/config.h.in`; \
svnorcvs diff $$distname