beta-0.89.2
[luatex.git] / source / texk / texlive / tl_scripts / Makefile.am
blobfe4a63279cc8d310a32a9a0cc6229985f60ac357
1 ## Makefile.am for the TeX Live subdirectory texk/texlive/tl_scripts/
2 ##
3 ## Copyright 2013-2015 Karl Berry <tex-live@tug.org>
4 ## You may freely use, modify and/or distribute this file.
6 ## Build lists of scripts.
7 ##
8 scripts-list: Makefile
9         @echo "Create $@"
10         @echo "tl_scripts='" >$@
11         @for f in $(dist_texmf_SCRIPTS); do echo "$$f"; done >>$@
12         @echo "'" >>$@
13         cmp -s $(srcdir)/scripts.lst $@ || cp -f $@ $(srcdir)/scripts.lst
15 if MAINTAINER_MODE
16 all-local: scripts-list
17 else !MAINTAINER_MODE
18 all-local:
19 endif !MAINTAINER_MODE
21 DISTCLEANFILES = scripts-list
23 EXTRA_DIST = scripts.lst
25 # These first variable definitions are what scripts_links.am requires.
26 perl_scripts = e2pall
27 sh_scripts = \
28         allcm \
29         allneeded \
30         dvi2fax \
31         dvired \
32         fontinst \
33         kpsetool \
34         kpsewhere \
35         ps2frag \
36         pslatex \
37         rubibtex \
38         rumakeindex \
39         texconfig-dialog \
40         texconfig-sys \
41         texconfig \
42         texlinks
43 nodist_bin_SCRIPTS =
44 scriptsdir = texmf-dist/scripts/texlive
46 include $(top_srcdir)/../../am/script_links.am
48 texmfdir = $(datarootdir)/$(scriptsdir)
49 dist_texmf_SCRIPTS = $(perl_scripts:=.pl) $(sh_scripts:=.sh)
51 install-data-hook: install-bin-links install-man1-links install-perl-links install-sh-links
52 uninstall-hook: uninstall-bin-links uninstall-man1-links uninstall-links
54 dist_man_MANS = \
55         allcm.1 \
56         allec.1 \
57         allneeded.1 \
58         dvi2fax.1 \
59         dvired.1 \
60         e2pall.1 \
61         fmtutil.1 \
62         fmtutil.cnf.5 \
63         fontinst.1 \
64         kpsetool.1 \
65         kpsewhere.1 \
66         ps2frag.1 \
67         pslatex.1 \
68         rubibtex.1 \
69         rumakeindex.1 \
70         texconfig.1 \
71         texlinks.1 \
72         updmap.1 \
73         updmap.cfg.5
75 bin_links = \
76         allcm:allec \
77         fmtutil:mktexfmt \
78         kpsetool:kpsexpand \
79         kpsetool:kpsepath
81 include $(top_srcdir)/../../am/bin_links.am
83 man1_links = \
84         fmtutil:fmtutil-sys \
85         kpsetool:kpsexpand \
86         kpsetool:kpsepath \
87         fmtutil:mktexfmt \
88         texconfig:texconfig-sys \
89         updmap:updmap-sys
91 include $(top_srcdir)/../../am/man1_links.am
93 ## Support files
94 texconfigdir = $(datarootdir)/texmf-dist/texconfig
95 dist_texconfig_SCRIPTS = tcfmgr
96 dist_texconfig_DATA = tcfmgr.map
98 web2cdir = $(datarootdir)/texmf-dist/web2c
99 dist_web2c_DATA = fmtutil.cnf
101 ## Generate the updmap/fmtutil man page using help2man plus a bit of
102 ## handwritten material.  But don't actually update updmap/fmtutil.1,
103 ## we don't want to require help2man for an install.  Leave that to be
104 ## done by hand.
105 EXTRA_DIST += updmap.help2man fmtutil.help2man
106 .PHONY: xmans xupdmap.1 xfmtutil.1
107 xmans: xupdmap.1 xfmtutil.1
108 linked_scripts_dir = $(top_srcdir)/linked_scripts/texlive
110 xupdmap.1: updmap.help2man $(linked_scripts_dir)/updmap.pl
111         help2man --include=$< --source="TeX Live" --no-info \
112           $(linked_scripts_dir)/updmap.pl >/tmp/$@
114 xfmtutil.1: fmtutil.help2man $(linked_scripts_dir)/fmtutil.pl
115         help2man --include=$< --source="TeX Live" --no-info \
116           $(linked_scripts_dir)/fmtutil.pl >/tmp/$@
119 ## \f
120 ## This target is invoked by the top-level make,
121 .PHONY: run-texlinks
122 ## to create the per-format engine symlinks in $(bindir),
123 ## after everything else is installed.  We explicitly specify the
124 ## fmtutil.cnf file to use for the sake of distro builds.
125 ## We pass along the executable extension for the sake of cygwin, so we
126 ## don't create dangling symlinks there (even though they work).
128 texlinks_prog = $(DESTDIR)$(bindir)/texlinks
130 run_texlinks = $(texlinks_prog) -v \
131         -f $(DESTDIR)$(web2cdir)/fmtutil.cnf \
132         -e "$(EXEEXT)" $(DESTDIR)$(bindir)
134 run-texlinks: $(DESTDIR)$(bindir)/texlinks
135 if !WIN32
136         PATH="$(DESTDIR)$(bindir):$(PATH)"; export PATH; $(run_texlinks)
137 endif !WIN32
139 $(DESTDIR)$(bindir)/texlinks: $(DESTDIR)$(web2cdir)/fmtutil.cnf
140 $(DESTDIR)$(web2cdir)/fmtutil.cnf:
141         $(MAKE) $(AM_MAKEFLAGS) install
143 ## \f
144 ## This target is invoked by check-wrapper-consistency (run from cron).
145 .PHONY: echo-shell-scripts
146 echo-shell-scripts:
147         @echo $(sh_scripts)