1 ## Makefile.am for the TeX Live subdirectory texk/texlive/tl_scripts/
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.
10 @echo "tl_scripts='" >$@
11 @for f in $(dist_texmf_SCRIPTS); do echo "$$f"; done >>$@
13 cmp -s $(srcdir)/scripts.lst $@ || cp -f $@ $(srcdir)/scripts.lst
16 all-local: scripts-list
19 endif !MAINTAINER_MODE
21 DISTCLEANFILES = scripts-list
23 EXTRA_DIST = scripts.lst
25 # These first variable definitions are what scripts_links.am requires.
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
81 include $(top_srcdir)/../../am/bin_links.am
88 texconfig:texconfig-sys \
91 include $(top_srcdir)/../../am/man1_links.am
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
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/$@
120 ## This target is invoked by the top-level make,
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
136 PATH="$(DESTDIR)$(bindir):$(PATH)"; export PATH; $(run_texlinks)
139 $(DESTDIR)$(bindir)/texlinks: $(DESTDIR)$(web2cdir)/fmtutil.cnf
140 $(DESTDIR)$(web2cdir)/fmtutil.cnf:
141 $(MAKE) $(AM_MAKEFLAGS) install
144 ## This target is invoked by check-wrapper-consistency (run from cron).
145 .PHONY: echo-shell-scripts