summaryrefslogtreecommitdiff
path: root/Build/source/texk/texlive/linked_scripts/Makefile.am
blob: 7ae19d440e5db1b0549ffe28487d54b5e7472d51 (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
##
## TeX Live's extra scripts.

## Make sure $(bindir) exists
##
bin_SCRIPTS =

## Copies of these scripts exist here for the sake of avoiding
## dangling symlinks produced by `make install'.
## The instances in texmf* or are the masters (except when it is CTAN).

scriptxdir = ${prefix}/texmf/scripts
nobase_dist_scriptx_SCRIPTS = \
	a2ping/a2ping.pl \
	epstopdf/epstopdf.pl \
	pkfix/pkfix.pl \
	ps2eps/ps2eps.pl \
	simpdftex/simpdftex \
	tetex/e2pall.pl \
	tetex/texdoctk.pl \
	texdoc/texdoc.tlu \
	texlive/getnonfreefonts.pl \
	texlive/rungs.tlu \
	texlive/tlmgr.pl

scriptdir = ${prefix}/texmf-dist/scripts
nobase_dist_script_SCRIPTS = \
	bengali/ebong.py \
	context/lua/luatools.lua \
	context/lua/mtxrun.lua \
	context/ruby/texmfstart.rb \
	context/stubs/unix/context \
	context/stubs/unix/ctxtools \
	context/stubs/unix/exatools \
	context/stubs/unix/makempy \
	context/stubs/unix/mpstools \
	context/stubs/unix/mptopdf \
	context/stubs/unix/mtxtools \
	context/stubs/unix/pdftools \
	context/stubs/unix/pdftrimwhite \
	context/stubs/unix/pstopdf \
	context/stubs/unix/rlxtools \
	context/stubs/unix/runtools \
	context/stubs/unix/texexec \
	context/stubs/unix/texfind \
	context/stubs/unix/texfont \
	context/stubs/unix/texshow \
	context/stubs/unix/textools \
	context/stubs/unix/texutil \
	context/stubs/unix/tmftools \
	context/stubs/unix/xmltools \
	dviasm/dviasm.py \
	epspdf/epspdf \
	epspdf/epspdftk \
	fragmaster/fragmaster.pl \
	glossaries/makeglossaries \
	latex2man/latex2man \
	latexmk/latexmk.pl \
	mkjobtexmf/mkjobtexmf.pl \
	oberdiek/pdfatfi.pl \
	pax/pdfannotextractor.pl \
	pdfcrop/pdfcrop.pl \
	perltex/perltex \
	pkfix-helper/pkfix-helper \
	ppower4/pdfthumb.texlua \
	ppower4/ppower4.texlua \
	pst-pdf/ps4pdf \
	pst2pdf/pst2pdf.pl \
	purifyeps/purifyeps \
	splitindex/perl/splitindex.pl \
	svn-multi/svn-multi.pl \
	texcount/TeXcount.pl \
	texloganalyser/texloganalyser \
	thumbpdf/thumbpdf.pl \
	vpe/vpe.pl

## The idea is to install the scripts themselves in texmf*/scripts, and
## have bin/arch/foo be a symlink to, say,
## ../../texmf/scripts/foo/foo.pl.  That way we save a bit of disk space,
## but more importantly omit duplication, and most importantly make it
## possible to invoke the same Perl script on Windows (via
## tl-w32-wrapper.texlua).
##
## The installation into texmf*/scripts is ideally done with ctan2tl.
## The copy of the texlua wrapper for Windows is also done by hand, but
## could/should also be done by ctan2tl.  The check-wrapper-consistency
## script at least checks after the fact for problems.
##
## We also keep a copy of all the scripts here and install into the runtime. 
## This is purely for other distro builders, so symlinks are not dangling in
## the inst/bin dir (it is meaningless in native TL).  We have not yet
## written the auto-update to ensure linked_scripts is actually up to date
## with the masters in Master/texmf*/scripts, but it will happen.
##
## We support both multiplatform and non-multiplatform builds.
install-data-hook:
	case "$(bindir)" in \
	  */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. install-links;; \
	  */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. install-links;; \
	  *) echo "strange directory '$(bindir)' for linked scripts" >&2; \
	     exit 1;; \
	esac

## Link to the basename, removing any extension,
## downcase for the sake of TeXcount.pl -> texcount.
.PHONY: install-links
install-links:
	@cd $(DESTDIR)$(bindir) && \
	  for s in $(nobase_dist_scriptx_SCRIPTS); do \
	    target=`basename $$s | sed 's,\.[^/]*$$,,' | tr '[A-Z]' '[a-z]'`; \
	    target=$$target; \
	    rm -f $$target; \
	    echo "creating link '$$target' -> '$(REL)/texmf/scripts/$$s'"; \
	    $(LN_S) $(REL)/texmf/scripts/$$s $$target; \
	  done; \
	  for s in $(nobase_dist_script_SCRIPTS); do \
	    target=`basename $$s | sed 's,\.[^/]*$$,,' | tr '[A-Z]' '[a-z]'`; \
	    target=$$target; \
	    rm -f $$target; \
	    echo "creating link '$$target' -> '$(REL)/texmf-dist/scripts/$$s'"; \
	    $(LN_S) $(REL)/texmf-dist/scripts/$$s $$target; \
	  done; \
	  rm -rf getnonfreefonts-sys; \
	  echo "creating link 'getnonfreefonts-sys' -> 'getnonfreefonts'"; \
	  $(LN_S) getnonfreefonts getnonfreefonts-sys; \
## man dir link for those mans which can use it.
	  rm -f man; \
	  echo "creating link 'man' -> '$(REL)/texmf/doc/man'"; \
	  ln -s $(REL)/texmf/doc/man man || :

uninstall-hook:
	@for s in $(nobase_dist_scriptx_SCRIPTS) $(nobase_dist_script_SCRIPTS); do \
	  target=`basename $$s | sed 's,\.[^/]*$$,,' | tr '[A-Z]' '[a-z]'`; \
	  target=$$target; \
	  rm -f $(DESTDIR)$(bindir)/$$target; \
	done
	rm -f $(DESTDIR)$(bindir)/getnonfreefonts-sys $(DESTDIR)$(bindir)/man