summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/synctexdir/am/synctex.am
blob: d8fc6eb9e4c60d31855ee6f0fa427aba46487ae0 (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
## texk/web2c/synctexdir/am/synctex.am: Makefile fragment for SyncTeX.
##
## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.

## The SyncTeX tool

bin_PROGRAMS += synctex

synctex_SOURCES = \
	synctexdir/synctex_main.c \
	synctexdir/synctex_parser.c \
	synctexdir/synctex_parser.h \
	synctexdir/synctex_parser_local.h \
	synctexdir/synctex_parser_utils.h \
	synctexdir/synctex_parser_utils.c

synctex_CPPFLAGS = -I$(srcdir)/synctexdir $(ZLIB_INCLUDES) -DSYNCTEX_USE_LOCAL_HEADER

synctex_LDADD = $(ZLIB_LIBS)

synctex_DEPENDENCIES = $(ZLIB_DEPEND)

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

EXTRA_DIST += \
	synctexdir/ChangeLog \
	synctexdir/INSTALL \
	synctexdir/Makefile \
	synctexdir/Makefile.in \
	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-convert.sh \
	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_ch_synctex = \
	synctexdir/synctex-mem.ch0 \
	synctexdir/synctex-mem.ch1 \
	synctexdir/synctex-mem.ch2 \
	synctexdir/synctex-rec.ch0 \
	synctexdir/synctex-rec.ch1 \
	synctexdir/synctex-rec.ch2

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

nodist_tex_SOURCES += \
	synctex.c

synctex_convert_tex = && $(SHELL) $(srcdir)/synctexdir/synctex-convert.sh tex

else !TEX_SYNCTEX

synctex_convert_tex = && echo "warning: SyncTeX for TeX is NOT enabled"

endif !TEX_SYNCTEX

synctex.c: texd.h synctexdir/synctex.c $(dist_tex_SOURCES)
	sed s/TEX-OR-MF-OR-MP/tex/ $(srcdir)/synctexdir/synctex.c >$@

EXTRA_DIST += \
	synctexdir/synctex-mem.ch0 \
	synctexdir/synctex-mem.ch1 \
	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_ch_synctex = \
	synctexdir/synctex-mem.ch0 \
	synctexdir/synctex-mem.ch1 \
	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-e-rec.ch1

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

nodist_etex_SOURCES += \
	synctex-e.c

synctex_convert_etex = && $(SHELL) $(srcdir)/synctexdir/synctex-convert.sh etex

else !ETEX_SYNCTEX

synctex_convert_etex = && echo "warning: SyncTeX for e-TeX is NOT enabled"

endif !ETEX_SYNCTEX

synctex-e.c: etexd.h synctexdir/synctex.c $(dist_etex_SOURCES)
	sed s/TEX-OR-MF-OR-MP/etex/ $(srcdir)/synctexdir/synctex.c >$@

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

## SyncTeX infrastructure: pdfTeX

if PDFTEX_SYNCTEX

pdftex_CPPFLAGS += -I$(srcdir)/synctexdir

pdftex_ch_synctex = \
	synctexdir/synctex-mem.ch0 \
	synctexdir/synctex-mem.ch1 \
	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-e-rec.ch1 \
	synctexdir/synctex-pdf-rec.ch2

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

nodist_pdftex_SOURCES += \
	synctex-pdf.c

synctex_convert_pdftex = && $(SHELL) $(srcdir)/synctexdir/synctex-convert.sh pdftex

else !PDFTEX_SYNCTEX

synctex_convert_pdftex = && echo "warning: SyncTeX for pdfTeX is NOT enabled"

endif !PDFTEX_SYNCTEX

synctex-pdf.c: pdftexd.h synctexdir/synctex.c $(dist_pdftex_SOURCES)
	sed s/TEX-OR-MF-OR-MP/pdftex/ $(srcdir)/synctexdir/synctex.c >$@

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

## SyncTeX infrastructure: XeTeX

if XETEX_SYNCTEX

xetex_CPPFLAGS += -I$(srcdir)/synctexdir

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

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

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

nodist_xetex_SOURCES += \
	synctex-xe.c

synctex_convert_xetex = && $(SHELL) $(srcdir)/synctexdir/synctex-convert.sh xetex

else !XETEX_SYNCTEX

synctex_convert_xetex = && echo "warning: SyncTeX for e-TeX is NOT enabled"

endif !XETEX_SYNCTEX

synctex-xe.c: xetexd.h synctexdir/synctex.c $(dist_xetex_SOURCES)
	sed s/TEX-OR-MF-OR-MP/xetex/ $(srcdir)/synctexdir/synctex.c >$@

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