summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/synctexdir/INSTALL
blob: f7456ac1b02292f28b42ada14e0c3cb1eb52a027 (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
# Copyright (c) 2008 jerome DOT laurens AT u-bourgogne DOT fr
#
# This file is part of the SyncTeX package.
#
# License:
# --------
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE
#
# Except as contained in this notice, the name of the copyright holder  
# shall not be used in advertising or otherwise to promote the sale,  
# use or other dealings in this Software without prior written  
# authorization from the copyright holder.
#

How to INSTALL synctex support in web2c.

First you need a recent convert tool (as of march 2008)

Modify your .mk file to mimic what was done for pdftex

In synctex.mk
-------------
### SyncTeX support in pdftex
# list of change files
synctex-pdftex_ch_srcs_mem_only = \
  $(synctex_dir)/synctex-mem.ch0 \
  $(synctex_dir)/synctex-mem.ch1 \
  $(synctex_dir)/synctex-e-mem.ch0 \
  $(synctex_dir)/synctex-e-mem.ch1
synctex-pdftex_ch_srcs_on = \
  $(synctex-pdftex_ch_srcs_mem_only) \
  $(synctex_dir)/synctex-rec.ch0 \
  $(synctex_dir)/synctex-rec.ch1 \
  $(synctex_dir)/synctex-e-rec.ch0 \
  $(synctex_dir)/synctex-e-rec.ch1 \
  $(synctex_dir)/synctex-pdf-rec.ch2
synctex-pdftex_ch_srcs_off =
# The C sources and headers
synctex-pdftex_o = synctex-pdf.o
synctex-pdf.h: $(synctex_dir)/synctex.h
	cat $(synctex_dir)/synctex.h >$@
synctex-pdftex.h: $(synctex_dir)/$@
	cat $(synctex_dir)/$@ >$@
synctex-pdf.c: pdftexd.h $(synctex_dir)/synctex.c synctex-pdftex.h
	sed s/TEX-OR-MF-OR-MP/pdftex/ $(synctex_dir)/synctex.c >$@
synctex_pdftexd_on = \
	if test -z "`grep __SyncTeX__ pdftexd.h`";\
	then\
		$(synctex_all_texd);\
		sed -f synctex_sed_command.txt pdftexd.h > synctex_pdftexd.h;\
		mv synctex_pdftexd.h pdftexd.h;\
		rm -f synctex_sed_command.txt;\
	fi
synctex_pdftexd_off =
# switchers: _on to enable full synctex support, _off to completely disable synctex, _mem_only to only implement memory management.
synctex-pdftex_ch_srcs = $(synctex-pdftex_ch_srcs_on)
# _on to enable -synctex command line option, _off to disable
synctex_pdftexd = $(synctex_pdftexd_on)

In pdftex.mk
------------
# The C sources.
pdftex_c = pdftexini.c pdftex0.c pdftex1.c pdftex2.c pdftex3.c
pdftex_o = pdftexini.o pdftex0.o pdftex1.o pdftex2.o pdftex3.o pdftexextra.o loadpdftexpool.o $(synctex-pdftex_o)

# C file dependencies.
$(pdftex_c) pdftexcoerce.h pdftexd.h: pdftex.p $(web2c_texmf) $(srcdir)/$(pdftexdir)/pdftex.defines $(srcdir)/$(pdftexdir)/pdftex.h
	$(web2c) pdftex
	$(synctex_pdftexd)

#   Sources for pdftex.ch:
pdftex_ch_srcs = $(srcdir)/$(pdftexdir)/pdftex.web \
  $(srcdir)/$(pdftexdir)/tex.ch0 \
  $(srcdir)/tex.ch \
  $(synctex-pdftex_ch_srcs) \
  $(srcdir)/$(pdftexdir)/pdftex.ch