summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/synctexdir/am/synctex.am
blob: c4481ae1cadb17947b43a5d37fef37c4a8b98a06 (plain)
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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
## texk/web2c/synctexdir/am/synctex.am: Makefile fragment for SyncTeX.
##
## Copyright (C) 2009-2013 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.

## The SyncTeX tool

if SYNCTEX
bin_PROGRAMS += synctex
endif SYNCTEX
EXTRA_PROGRAMS += synctex

synctex_SOURCES = \
	synctexdir/synctex_main.c

synctex_CPPFLAGS = -I$(srcdir)/synctexdir

if SYSTEM_ZLIB
libsynctex = libsynctex.la
else !SYSTEM_ZLIB
libsynctex = libsynctex.a
endif !SYSTEM_ZLIB

synctex_LDADD =  $(libsynctex) $(ZLIB_LIBS)

$(synctex_OBJECTS): $(libsynctex)

## The (shared or nonshared) SyncTeX parser library

EXTRA_LTLIBRARIES = libsynctex.la
EXTRA_LIBRARIES += libsynctex.a

if SYNCTEX
if SYSTEM_ZLIB
lib_LTLIBRARIES = $(WANTEDLIBS)
else !SYSTEM_ZLIB
lib_LIBRARIES = libsynctex.a
endif !SYSTEM_ZLIB
endif SYNCTEX

libsynctex_la_CPPFLAGS = -I$(srcdir)/synctexdir $(ZLIB_INCLUDES) -DSYNCTEX_USE_LOCAL_HEADER
libsynctex_a_CPPFLAGS = $(libsynctex_la_CPPFLAGS)

libsynctex_la_LDFLAGS = -rpath @libdir@ -bindir @bindir@ -no-undefined -version-info $(SYNCTEX_LT_VERSINFO)

libsynctex_la_LIBADD = $(ZLIB_LIBS)

libsynctex_la_SOURCES = \
	synctexdir/synctex_parser.c \
	synctexdir/synctex_parser_local.h \
	synctexdir/synctex_parser_utils.c
nodist_libsynctex_a_SOURCES = $(libsynctex_la_SOURCES)

$(libsynctex_la_OBJECTS): $(ZLIB_DEPEND)
$(libsynctex_a_OBJECTS): $(ZLIB_DEPEND)

syncincludedir = ${includedir}/synctex

pkgconfigdir = ${libdir}/pkgconfig

if SYNCTEX
syncinclude_HEADERS = \
	synctexdir/synctex_parser.h \
	synctexdir/synctex_parser_utils.h

pkgconfig_DATA = synctexdir/synctex.pc
endif SYNCTEX

dist_man_MANS += synctexdir/man1/synctex.1 synctexdir/man5/synctex.5

EXTRA_DIST += \
	synctexdir/ChangeLog \
	synctexdir/README.txt \
	synctexdir/synctex_parser_readme.txt \
	synctexdir/synctex_parser_version.txt \
	synctexdir/tests

## SyncTeX infrastructure: common for all engines

EXTRA_DIST += \
	synctexdir/synctex-common.h \
	synctexdir/synctex.c \
	synctexdir/synctex.defines \
	synctexdir/synctex.h

## SyncTeX infrastructure: TeX

if TEX_SYNCTEX

tex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)

tex_LDADD += $(ZLIB_LIBS)
tex_prereq += $(ZLIB_DEPEND)

tex_ch_synctex = \
	synctexdir/synctex-def.ch0 \
	synctexdir/synctex-mem.ch0 \
	synctexdir/synctex-mem.ch2 \
	synctexdir/synctex-rec.ch0 \
	synctexdir/synctex-rec.ch1 \
	synctexdir/synctex-rec.ch2

dist_tex_SOURCES += \
	synctexdir/synctex.c \
	synctexdir/synctex.h \
	synctexdir/synctex-common.h \
	synctexdir/synctex-tex.h

tex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-tex.h\"

endif TEX_SYNCTEX

EXTRA_DIST += \
	synctexdir/synctex-def.ch0 \
	synctexdir/synctex-mem.ch0 \
	synctexdir/synctex-mem.ch2 \
	synctexdir/synctex-rec.ch0 \
	synctexdir/synctex-rec.ch1 \
	synctexdir/synctex-rec.ch2

## SyncTeX infrastructure: e-TeX

if ETEX_SYNCTEX

etex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)

etex_LDADD += $(ZLIB_LIBS)
etex_prereq += $(ZLIB_DEPEND)

etex_ch_synctex = \
	synctexdir/synctex-def.ch0 \
	synctexdir/synctex-mem.ch0 \
	synctexdir/synctex-e-mem.ch0 \
	synctexdir/synctex-e-mem.ch1 \
	synctexdir/synctex-rec.ch0 \
	synctexdir/synctex-rec.ch1 \
	synctexdir/synctex-e-rec.ch0

dist_etex_SOURCES += \
	synctexdir/synctex.c \
	synctexdir/synctex.h \
	synctexdir/synctex-common.h \
	synctexdir/synctex-etex.h

etex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-etex.h\"

endif ETEX_SYNCTEX

EXTRA_DIST += \
	synctexdir/synctex-e-mem.ch0 \
	synctexdir/synctex-e-mem.ch1 \
	synctexdir/synctex-e-rec.ch0

## SyncTeX infrastructure: pTeX

if PTEX_SYNCTEX

ptex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)

ptex_LDADD += $(ZLIB_LIBS)
ptex_prereq += $(ZLIB_DEPEND)

ptex_ch_synctex = \
	synctexdir/synctex-def.ch0 \
	synctexdir/synctex-p-mem.ch0 \
	synctexdir/synctex-mem.ch0 \
	synctexdir/synctex-p-mem.ch1 \
	synctexdir/synctex-p-rec.ch0 \
	synctexdir/synctex-rec.ch0 \
	synctexdir/synctex-rec.ch1 \
	synctexdir/synctex-rec.ch2 \
	synctexdir/synctex-p-rec.ch1

dist_ptex_SOURCES += \
	synctexdir/synctex.c \
	synctexdir/synctex.h \
	synctexdir/synctex-common.h \
	synctexdir/synctex-ptex.h

ptex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-ptex.h\"

endif PTEX_SYNCTEX

EXTRA_DIST += \
	synctexdir/synctex-p-mem.ch0 \
	synctexdir/synctex-p-mem.ch1 \
	synctexdir/synctex-p-rec.ch0 \
	synctexdir/synctex-p-rec.ch1

## SyncTeX infrastructure: upTeX

if UPTEX_SYNCTEX

uptex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)

uptex_LDADD += $(ZLIB_LIBS)
uptex_prereq += $(ZLIB_DEPEND)

uptex_ch_synctex = \
	synctexdir/synctex-def.ch0 \
	synctexdir/synctex-p-mem.ch0 \
	synctexdir/synctex-mem.ch0 \
	synctexdir/synctex-p-mem.ch1 \
	synctexdir/synctex-p-rec.ch0 \
	synctexdir/synctex-rec.ch0 \
	synctexdir/synctex-rec.ch1 \
	synctexdir/synctex-rec.ch2 \
	synctexdir/synctex-p-rec.ch1

dist_uptex_SOURCES += \
	synctexdir/synctex.c \
	synctexdir/synctex.h \
	synctexdir/synctex-common.h \
	synctexdir/synctex-uptex.h

uptex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-uptex.h\"

endif UPTEX_SYNCTEX

## SyncTeX infrastructure: e-pTeX

if EPTEX_SYNCTEX

eptex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)

eptex_LDADD += $(ZLIB_LIBS)
eptex_prereq += $(ZLIB_DEPEND)

eptex_ch_synctex = \
	synctexdir/synctex-def.ch0 \
	synctexdir/synctex-ep-mem.ch0 \
	synctexdir/synctex-mem.ch0 \
	synctexdir/synctex-e-mem.ch0 \
	synctexdir/synctex-ep-mem.ch1 \
	synctexdir/synctex-p-rec.ch0 \
	synctexdir/synctex-rec.ch0 \
	synctexdir/synctex-rec.ch1 \
	synctexdir/synctex-e-rec.ch0 \
	synctexdir/synctex-p-rec.ch1

dist_eptex_SOURCES += \
	synctexdir/synctex.c \
	synctexdir/synctex.h \
	synctexdir/synctex-common.h \
	synctexdir/synctex-eptex.h

eptex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-eptex.h\"

endif EPTEX_SYNCTEX

EXTRA_DIST += \
	synctexdir/synctex-ep-mem.ch0 \
	synctexdir/synctex-ep-mem.ch1

## SyncTeX infrastructure: e-upTeX

if EUPTEX_SYNCTEX

euptex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)

euptex_LDADD += $(ZLIB_LIBS)
euptex_prereq += $(ZLIB_DEPEND)

euptex_ch_synctex = \
	synctexdir/synctex-def.ch0 \
	synctexdir/synctex-ep-mem.ch0 \
	synctexdir/synctex-mem.ch0 \
	synctexdir/synctex-e-mem.ch0 \
	synctexdir/synctex-ep-mem.ch1 \
	synctexdir/synctex-p-rec.ch0 \
	synctexdir/synctex-rec.ch0 \
	synctexdir/synctex-rec.ch1 \
	synctexdir/synctex-e-rec.ch0 \
	synctexdir/synctex-p-rec.ch1

dist_euptex_SOURCES += \
	synctexdir/synctex.c \
	synctexdir/synctex.h \
	synctexdir/synctex-common.h \
	synctexdir/synctex-euptex.h

euptex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-euptex.h\"

endif EUPTEX_SYNCTEX

## SyncTeX infrastructure: pdfTeX

if PDFTEX_SYNCTEX

pdftex_CPPFLAGS += -I$(srcdir)/synctexdir

pdftex_ch_synctex = \
	synctexdir/synctex-def.ch0 \
	synctexdir/synctex-mem.ch0 \
	synctexdir/synctex-e-mem.ch0 \
	synctexdir/synctex-e-mem.ch1 \
	synctexdir/synctex-rec.ch0 \
	synctexdir/synctex-rec.ch1 \
	synctexdir/synctex-e-rec.ch0 \
	synctexdir/synctex-pdf-rec.ch2

dist_pdftex_SOURCES += \
	synctexdir/synctex.c \
	synctexdir/synctex.h \
	synctexdir/synctex-common.h \
	synctexdir/synctex-pdftex.h

pdftex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-pdftex.h\"

endif PDFTEX_SYNCTEX

EXTRA_DIST += \
	synctexdir/synctex-pdf-rec.ch2

## SyncTeX infrastructure: XeTeX

if XETEX_SYNCTEX

xetex_CPPFLAGS += -I$(srcdir)/synctexdir

xetex_ch_synctex = \
	synctexdir/synctex-xe-def.ch0 \
	synctexdir/synctex-mem.ch0 \
	synctexdir/synctex-e-mem.ch1 \
	synctexdir/synctex-rec.ch0 \
	synctexdir/synctex-xe-rec.ch0

xetex_post_ch_synctex = \
	synctexdir/synctex-xe-rec.ch3

dist_xetex_SOURCES += \
	synctexdir/synctex.c \
	synctexdir/synctex.h \
	synctexdir/synctex-common.h \
	synctexdir/synctex-xetex.h

xetex_CPPFLAGS += -D__SyncTeX__ -DSYNCTEX_ENGINE_H=\"synctex-xetex.h\"

endif XETEX_SYNCTEX

EXTRA_DIST += \
	synctexdir/synctex-xe-rec.ch3

# SyncTeX Tests
#
synctex_tests = synctexdir/synctex.test

EXTRA_DIST += $(synctex_tests)

if SYNCTEX
TESTS += $(synctex_tests)
endif SYNCTEX