1## Makefile.am for the TeX Live subdirectory utils/xindy/
2##
3## Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
4## You may freely use, modify and/or distribute this file.
5##
6EXTRA_DIST = README-clisp
7
8## We use the original xindy source tree.
9##
10SUBDIRS = . $(XINDY_TREE)
11DIST_SUBDIRS = $(SUBDIRS)
12
13## Patches applied to the original source tree
14##
15EXTRA_DIST += $(XINDY_TREE)-PATCHES
16
17## We must explicitly distribute some top-level files.
18##
19EXTRA_DIST += \
20	$(XINDY_TREE)/Makefile.am \
21	$(XINDY_TREE)/VERSION \
22	$(XINDY_TREE)/configure.ac \
23	$(XINDY_TREE)/m4
24
25# Files not to be distributed
26include $(srcdir)/../../am/dist_hook.am
27
28all-local: config.force
29
30config.force:
31	echo timestamp >config.force
32	$(SHELL) ./config.status --recheck
33
34DISTCLEANFILES = config.force
35
36perl_scripts = texindy xindy
37scriptsdir = texmf-dist/scripts/xindy
38nodist_bin_SCRIPTS =
39
40include $(srcdir)/../../am/script_links.am
41
42install-data-hook: install-perl-links
43
44install-exec-hook:
45if CLISP_RUNTIME
46	$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) "$(LISP_RUN)" "$(DESTDIR)$(bindir)/$(XINDY_RUN)"
47endif CLISP_RUNTIME
48
49uninstall-hook: uninstall-links
50if CLISP_RUNTIME
51	rm -f "$(DESTDIR)$(bindir)/$(XINDY_RUN)"
52endif CLISP_RUNTIME
53
54texmfdir = $(datarootdir)/$(scriptsdir)
55nodist_texmf_SCRIPTS = $(perl_scripts:=.pl)
56
57%.pl: $(XINDY_TREE)/user-commands/%.in
58	$(AM_V_GEN)sed -e 's:@is_TL\@:yes:' $< >$@
59	$(AM_V_at)chmod +x $@
60
61CLEANFILES = $(nodist_bin_SCRIPTS) $(nodist_texmf_SCRIPTS)
62
63