Debian Codegraph @

Makefile

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 CC?=gcc
2 TAR?=gnutar
3 RM?=rm -f
4 MKDIR?=mkdir -p
5 RMDIR?=rm -rf
6 PKGMANDIR?=man
7
8 #reasonable flags for developing
9 #CFLAGS = -g -D_FORTIFY_SOURCE=2 -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Wformat=2
10
11 PLATFORM?=-DUNIX # Mac OS X, Linux, BSD
12 #PLATFORM?=-DMSDOS # Windows/DOS
13 #PLATFORM?=-DOS2 # OS/2 (does anyone still use this?)
14 #PLATFORM?=-DMSDOS -DNOSTDERR # Windows/DOS without stderr
15
16 #Uncomment for some windows machines (neither needed for djgpp nor for MinGW)
17 #EXE_SUFFIX=.exe
18
19 #Base directory - adapt as needed
20 # Unix:
21 PREFIX?=/usr/local
22 #Uncomment next 2 lines for Windows
23 #DESTDIR_DRIVE=C:
24 #PREFIX?=$(DESTDIR_DRIVE)/PROGRA~1/latex2rtf
25
26 #Name of executable binary --- beware of 8.3 restriction under DOS
27 BINARY_NAME=latex2rtf$(EXE_SUFFIX)
28
29 # Location of binary, man, info, and support files - adapt as needed
30 BINDIR=$(PREFIX)/bin
31 MANDIR=$(PREFIX)/share/$(PKGMANDIR)/man1
32 INFODIR=$(PREFIX)/share/info
33 SUPPORTDIR=$(PREFIX)/share/latex2rtf
34 CFGDIR=$(PREFIX)/share/latex2rtf/cfg
35
36 #Uncomment next 5 lines for Windows
37 #BINDIR=
38 #MANDIR=
39 #INFODIR=
40 #SUPPORTDIR=
41 #CFGDIR=/cfg
42
43 # Nothing to change below this line - except:
44 # for Windows, change "all : checkdir latex2rtf" to "all : latex2rtf"
45
46 CFLAGS:=$(CFLAGS) $(PLATFORM)
47
48 LIBS= -lm
49
50 L2R_VERSION:="latex2rtf-`grep 'Version' version.h | sed 's/[^"]*"\([^" ]*\).*/\1/'`"
51
52 SRCS=commands.c chars.c direct.c encodings.c fonts.c funct1.c tables.c ignore.c \
53 main.c stack.c cfg.c utils.c parser.c lengths.c counters.c letterformat.c \
54 preamble.c equations.c convert.c xrefs.c definitions.c graphics.c \
55 mygetopt.c styles.c preparse.c vertical.c fields.c \
56 labels.c biblio.c acronyms.c auxfile.c
57
58 HDRS=commands.h chars.h direct.h encodings.h fonts.h funct1.h tables.h ignore.h \
59 main.h stack.h cfg.h utils.h parser.h lengths.h counters.h letterformat.h \
60 preamble.h equations.h convert.h xrefs.h definitions.h graphics.h encoding_tables.h \
61 version.h mygetopt.h styles.h preparse.h vertical.h fields.h labels.h biblio.h acronyms.h \
62 auxfile.h
63
64 CFGS=cfg/fonts.cfg cfg/direct.cfg cfg/ignore.cfg cfg/style.cfg \
65 cfg/afrikaans.cfg cfg/bahasa.cfg cfg/basque.cfg cfg/brazil.cfg cfg/breton.cfg \
66 cfg/catalan.cfg cfg/croatian.cfg cfg/czech.cfg cfg/danish.cfg cfg/dutch.cfg \
67 cfg/english.cfg cfg/esperanto.cfg cfg/estonian.cfg cfg/finnish.cfg cfg/french.cfg \
68 cfg/galician.cfg cfg/german.cfg cfg/icelandic.cfg cfg/irish.cfg cfg/italian.cfg \
69 cfg/latin.cfg cfg/lsorbian.cfg cfg/magyar.cfg cfg/norsk.cfg cfg/nynorsk.cfg \
70 cfg/polish.cfg cfg/portuges.cfg cfg/romanian.cfg cfg/samin.cfg cfg/scottish.cfg \
71 cfg/serbian.cfg cfg/slovak.cfg cfg/slovene.cfg cfg/spanish.cfg cfg/swedish.cfg \
72 cfg/turkish.cfg cfg/usorbian.cfg cfg/welsh.cfg cfg/russian.cfg \
73 cfg/ukrainian.cfg cfg/frenchb.cfg cfg/greek.cfg cfg/british.cfg
74
75 DOCS= doc/latex2rtf.1 doc/latex2png.1 doc/latex2rtf.texi doc/latex2rtf.pdf \
76 doc/latex2rtf.txt doc/latex2rtf.info doc/latex2rtf.html doc/credits \
77 doc/copying.txt doc/Makefile doc/latex2pn.txt doc/latex2rt.txt
78
79 README= README README.DOS README.Mac README.OS2 README.Solaris README.VMS README.OSX \
80 Copyright ChangeLog
81
82 SCRIPTS= scripts/latex2png scripts/latex2png_1 scripts/latex2png_2 \
83 scripts/pdf2pnga scripts/README \
84 scripts/Makefile scripts/test1.tex scripts/test2.tex scripts/test3.tex \
85 scripts/test3a.tex scripts/test4.tex scripts/test1fig.eps
86
87 TEST= \
88 test/Makefile test/enc_cp852.tex test/fig_testd.pdf \
89 test/accentchars.tex test/enc_cp855.tex test/fig_testd.ps \
90 test/align.tex test/enc_cp865.tex test/fig_teste.pdf \
91 test/array.tex test/enc_cp866.tex test/fig_testf.png \
92 test/babel_czech.tex test/enc_decmulti.tex test/fig_tex.eps \
93 test/babel_french.tex test/enc_koi8-r.tex test/fonts.tex \
94 test/babel_frenchb.tex test/enc_koi8-u.tex test/fontsize.tex \
95 test/babel_german.tex test/enc_latin1.tex test/fonttest.tex \
96 test/babel_russian.tex test/enc_latin2.tex test/frac.tex \
97 test/babel_spanish.tex test/enc_latin3.tex test/geometry.tex \
98 test/bib_apacite.tex test/enc_latin4.tex test/geotest.tex \
99 test/bib_apacite_dblsp.tex test/enc_latin5.tex test/german.tex \
100 test/bib_apalike.tex test/enc_latin9.tex test/head_article.tex \
101 test/bib_apalike2.tex test/enc_maccyr.tex test/head_book.tex \
102 test/bib_apanat.tex test/head_report.tex \
103 test/bib_authordate.tex test/enc_next.tex test/hndout.sty \
104 test/bib_harvard.bib test/enc_utf8x.tex test/ifclause.tex \
105 test/bib_harvard.tex test/endnote.tex test/include.tex \
106 test/bib_natbib1.tex test/eqnnumber.tex test/include1.tex \
107 test/bib_natbib2.tex test/eqnnumber2.tex test/include2.tex \
108 test/bib_natbib3.tex test/eqns-koi8.tex test/include3.tex \
109 test/bib_simple.bib test/eqns.tex test/linux.tex \
110 test/bib_simple.tex test/eqns2.tex test/list.tex \
111 test/bib_super.tex test/essential.tex test/logo.tex \
112 test/bibentry_apalike.bib test/excalibur.tex test/misc1.tex \
113 test/bibentry_apalike.tex test/fancy.tex test/misc2.tex \
114 test/bibentry_plain.bib test/fig_endfloat.tex test/misc3.tex \
115 test/bibentry_plain.tex test/fig_oval.eps test/misc4.tex \
116 test/box.tex test/fig_oval.pict test/oddchars.tex \
117 test/bracecheck test/fig_oval.png test/overstrike.tex \
118 test/ch.tex test/fig_size.tex test/percent.tex \
119 test/chem.tex test/fig_test.eps test/picture.tex \
120 test/color.tex test/fig_test.tex test/qualisex.tex \
121 test/dblspace.tex test/fig_test2.tex test/report.tex \
122 test/defs.tex test/fig_test3.tex test/spago1.tex \
123 test/enc_applemac.tex test/fig_test4.tex test/subsup.tex \
124 test/enc_cp1250.tex test/fig_testa.eps test/tabbing.tex \
125 test/enc_cp1251.tex test/fig_testb.pdf test/tabular.tex \
126 test/enc_cp1252.tex test/fig_testb.ps test/theorem.tex \
127 test/enc_cp437.tex test/fig_testc.pdf test/ttgfsr7.tex \
128 test/enc_cp850.tex test/fig_testc.ps test/ucsymbols.tex \
129 test/bib_apa.tex test/bib_apa.bib test/bib_apacite2.tex \
130 test/bib_apacite2.bib test/fig_subfig.tex test/include4.tex \
131 test/include5.tex test/hyperref.tex test/bib_super.bib \
132 test/longstack.tex test/table_array1.tex test/table_array2.tex \
133 test/bib_apacite3.tex test/bib_apacite3.bib test/color2.tex \
134 test/fig_png.tex test/fig_10x15.png test/psfig.sty \
135 test/cyrillic.tex test/greek.tex test/direct.tex \
136 test/acronym.tex test/acronym.bib test/style.tex \
137 test/enc_moroz_koi8.tex test/enc_moroz_ot2.tex test/enc_moroz_utf8.tex\
138 test/enc_ot2.tex test/keywords.tex test/bib_natbib4.tex \
139 test/graphicspath.tex test/bib_style.tex test/tikz.tex \
140 test/tikz2.tex
141
142 OBJS=fonts.o direct.o encodings.o commands.o stack.o funct1.o tables.o \
143 chars.o ignore.o cfg.o main.o utils.o parser.o lengths.o counters.o \
144 preamble.o letterformat.o equations.o convert.o xrefs.o definitions.o graphics.o \
145 mygetopt.o styles.o preparse.o vertical.o fields.o \
146 labels.o biblio.o auxfile.o acronyms.o
147
148 all : checkdir latex2rtf # Windows: remove "checkdir"
149
150 latex2rtf: $(OBJS) $(HDRS)
151 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(BINARY_NAME)
152
153 cfg.o: Makefile cfg.c
154 $(CC) $(CFLAGS) -DCFGDIR=\"$(CFGDIR)\" $(PLATFORM) -c $*.c
155
156 main.o: Makefile main.c
157 $(CC) $(CFLAGS) -DCFGDIR=\"$(CFGDIR)\" $(PLATFORM) -c $*.c
158
159 %.o: Makefile %.c
160 $(CC) $(CFLAGS) $(PLATFORM) -c $*.c
161
162 check test: latex2rtf
163 cd test && $(MAKE) clean
164 cd test && $(MAKE)
165 cd test && $(MAKE) check
166
167 fullcheck: latex2rtf
168 cd scripts && $(MAKE)
169 cd test && $(MAKE) clean
170 cd test && $(MAKE) all
171 cd test && $(MAKE) check
172
173 checkdir: $(README) $(SRCS) $(HDRS) $(CFGS) $(SCRIPTS) $(TEST) doc/latex2rtf.texi Makefile vms_make.com
174
175 clean: checkdir
176 -$(RM) $(OBJS) core $(BINARY_NAME)
177 -$(RMDIR) tmp
178
179 depend: $(SRCS)
180 $(CC) -MM $(SRCS) >makefile.depend
181 @echo "***** Append makefile.depend to Makefile manually ******"
182
183 dist: checkdir releasedate latex2rtf doc $(SRCS) $(HDRS) $(CFGS) $(README) Makefile vms_make.com $(SCRIPTS) $(DOCS) $(TEST)
184 $(MAKE) releasedate
185 $(RMDIR) $(L2R_VERSION)
186 $(MKDIR) $(L2R_VERSION)
187 $(MKDIR) $(L2R_VERSION)/cfg
188 $(MKDIR) $(L2R_VERSION)/doc
189 $(MKDIR) $(L2R_VERSION)/test
190 $(MKDIR) $(L2R_VERSION)/scripts
191 ln $(SRCS) $(L2R_VERSION)
192 ln $(HDRS) $(L2R_VERSION)
193 ln $(README) $(L2R_VERSION)
194 ln Makefile $(L2R_VERSION)
195 ln vms_make.com $(L2R_VERSION)
196 ln $(CFGS) $(L2R_VERSION)/cfg
197 ln $(DOCS) $(L2R_VERSION)/doc
198 ln $(SCRIPTS) $(L2R_VERSION)/scripts
199 ln $(TEST) $(L2R_VERSION)/test
200 $(TAR) cvfz $(L2R_VERSION).tar.gz $(L2R_VERSION)
201 $(RMDIR) $(L2R_VERSION)
202
203 uptodate:
204 perl -pi.bak -e '$$date=scalar localtime; s/\(.*/($$date)";/' version.h
205 $(RM) version.h.bak
206
207 releasedate:
208 perl -pi.bak -e '$$date=scalar localtime; s/\(.*/(released $$date)";/; s/d ..../d /;s/\d\d:\d\d:\d\d //;' version.h
209 $(RM) version.h.bak
210
211 doc: doc/latex2rtf.texi doc/Makefile
212 cd doc && $(MAKE) -k
213
214 install: latex2rtf doc/latex2rtf.1 $(CFGS) scripts/latex2png
215 cd doc && $(MAKE)
216 $(MKDIR) $(DESTDIR)$(BINDIR)
217 $(MKDIR) $(DESTDIR)$(MANDIR)
218 $(MKDIR) $(DESTDIR)$(CFGDIR)
219 cp -p scripts/latex2png $(DESTDIR)$(BINDIR)
220 cp -p doc/latex2rtf.1 $(DESTDIR)$(MANDIR)
221 cp -p doc/latex2png.1 $(DESTDIR)$(MANDIR)
222 cp -p $(CFGS) $(DESTDIR)$(CFGDIR)
223 cp -p doc/latex2rtf.html $(DESTDIR)$(SUPPORTDIR)
224 cp -p doc/latex2rtf.pdf $(DESTDIR)$(SUPPORTDIR)
225 cp -p doc/latex2rtf.txt $(DESTDIR)$(SUPPORTDIR)
226 cp -p $(BINARY_NAME) $(DESTDIR)$(BINDIR)
227 @echo "******************************************************************"
228 @echo "*** latex2rtf successfully installed as \"$(BINARY_NAME)\""
229 @echo "*** in directory \"$(BINDIR)\""
230 @echo "***"
231 @echo "*** \"make install-info\" will install TeXInfo files "
232 @echo "***"
233 @echo "*** latex2rtf was compiled to search for its configuration files in"
234 @echo "*** \"$(CFGDIR)\" "
235 @echo "***"
236 @echo "*** If the configuration files are moved then either"
237 @echo "*** 1) set the environment variable RTFPATH to this new location, or"
238 @echo "*** 2) use the command line option -P /path/to/cfg, or"
239 @echo "*** 3) edit the Makefile and recompile"
240 @echo "******************************************************************"
241
242 install-info: doc/latex2rtf.info
243 $(MKDIR) $(DESTDIR)$(INFODIR)
244 cp -p doc/latex2rtf.info $(DESTDIR)$(INFODIR)
245 install-info --info-dir=$(DESTDIR)$(INFODIR) doc/latex2rtf.info
246
247 realclean: checkdir clean
248 $(RM) makefile.depend $(L2R_VERSION).tar.gz
249 cd doc && $(MAKE) clean
250 cd test && $(MAKE) clean
251
252 appleclean:
253 sudo xattr -r -d com.apple.FinderInfo ../trunk
254 sudo xattr -r -d com.apple.TextEncoding ../trunk
255
256 splint:
257 splint -weak $(SRCS) $(HDRS)
258
259 .PHONY: all check checkdir clean depend dist doc install install_info realclean latex2rtf uptodate releasedate splint fullcheck
260
261 # created using "make depend"
262 commands.o: commands.c cfg.h main.h convert.h chars.h fonts.h preamble.h \
263 funct1.h tables.h equations.h letterformat.h commands.h parser.h \
264 xrefs.h ignore.h lengths.h definitions.h graphics.h vertical.h \
265 encodings.h labels.h acronyms.h biblio.h
266 chars.o: chars.c main.h commands.h fonts.h cfg.h ignore.h encodings.h \
267 parser.h chars.h funct1.h convert.h utils.h vertical.h fields.h
268 direct.o: direct.c main.h direct.h fonts.h cfg.h utils.h
269 encodings.o: encodings.c main.h encoding_tables.h encodings.h fonts.h \
270 chars.h parser.h vertical.h
271 fonts.o: fonts.c main.h convert.h fonts.h funct1.h commands.h cfg.h \
272 parser.h stack.h vertical.h
273 funct1.o: funct1.c main.h convert.h funct1.h commands.h stack.h fonts.h \
274 cfg.h ignore.h utils.h encodings.h parser.h counters.h lengths.h \
275 definitions.h preamble.h xrefs.h equations.h direct.h styles.h \
276 graphics.h vertical.h
277 tables.o: tables.c main.h convert.h fonts.h commands.h funct1.h tables.h \
278 stack.h cfg.h parser.h counters.h utils.h lengths.h preamble.h \
279 graphics.h vertical.h
280 ignore.o: ignore.c main.h direct.h fonts.h cfg.h ignore.h funct1.h \
281 commands.h parser.h convert.h utils.h vertical.h
282 main.o: main.c main.h mygetopt.h convert.h commands.h chars.h fonts.h \
283 stack.h direct.h ignore.h version.h funct1.h cfg.h encodings.h utils.h \
284 parser.h lengths.h counters.h preamble.h xrefs.h preparse.h vertical.h \
285 fields.h
286 stack.o: stack.c main.h stack.h fonts.h
287 cfg.o: cfg.c main.h convert.h funct1.h cfg.h utils.h
288 utils.o: utils.c cfg.h main.h utils.h parser.h
289 parser.o: parser.c main.h commands.h cfg.h stack.h utils.h parser.h \
290 fonts.h lengths.h definitions.h funct1.h
291 lengths.o: lengths.c main.h utils.h lengths.h parser.h
292 counters.o: counters.c main.h utils.h counters.h
293 letterformat.o: letterformat.c main.h parser.h letterformat.h cfg.h \
294 commands.h funct1.h convert.h vertical.h
295 preamble.o: preamble.c main.h convert.h utils.h preamble.h fonts.h cfg.h \
296 encodings.h parser.h funct1.h lengths.h ignore.h commands.h counters.h \
297 xrefs.h direct.h styles.h vertical.h auxfile.h acronyms.h
298 equations.o: equations.c main.h convert.h commands.h stack.h fonts.h \
299 cfg.h ignore.h parser.h equations.h counters.h funct1.h lengths.h \
300 utils.h graphics.h xrefs.h chars.h preamble.h vertical.h fields.h
301 convert.o: convert.c main.h convert.h commands.h chars.h funct1.h fonts.h \
302 stack.h tables.h equations.h direct.h ignore.h cfg.h encodings.h \
303 utils.h parser.h lengths.h counters.h preamble.h vertical.h fields.h
304 xrefs.o: xrefs.c main.h utils.h convert.h funct1.h commands.h cfg.h \
305 xrefs.h parser.h preamble.h lengths.h fonts.h styles.h definitions.h \
306 equations.h vertical.h fields.h counters.h auxfile.h labels.h \
307 acronyms.h biblio.h
308 definitions.o: definitions.c main.h convert.h definitions.h parser.h \
309 funct1.h utils.h cfg.h counters.h
310 graphics.o: graphics.c main.h cfg.h graphics.h parser.h utils.h \
311 commands.h convert.h funct1.h preamble.h counters.h vertical.h
312 mygetopt.o: mygetopt.c main.h mygetopt.h
313 styles.o: styles.c main.h direct.h fonts.h cfg.h utils.h parser.h \
314 styles.h vertical.h
315 preparse.o: preparse.c preparse.h cfg.h main.h utils.h definitions.h \
316 parser.h funct1.h
317 vertical.o: vertical.c main.h funct1.h cfg.h utils.h parser.h lengths.h \
318 vertical.h convert.h commands.h styles.h fonts.h stack.h xrefs.h \
319 counters.h fields.h acronyms.h
320 fields.o: fields.c main.h fields.h
321 labels.o: labels.c main.h parser.h utils.h auxfile.h labels.h
322 biblio.o: biblio.c main.h utils.h parser.h auxfile.h biblio.h
323 acronyms.o: acronyms.c main.h parser.h utils.h cfg.h convert.h commands.h \
324 lengths.h vertical.h auxfile.h acronyms.h biblio.h labels.h
325 auxfile.o: auxfile.c main.h utils.h parser.h convert.h