diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-04-01 06:37:08 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-04-01 06:37:08 +0000 |
commit | 130e660fb979d78b0d5fe49e2fb1d01d3f01b7a9 (patch) | |
tree | e75fceb0cd099a4f70dd7a57968bc6fd516a57c0 /Build/source/texk/am | |
parent | 02550d8b7a9abf4b5d9efbb7968f5995133f6e61 (diff) |
utils/xindy and texk/tex4htk: Use Makefile fragment for linked scripts
git-svn-id: svn://tug.org/texlive/trunk@21911 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/am')
-rw-r--r-- | Build/source/texk/am/script_links.am | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/Build/source/texk/am/script_links.am b/Build/source/texk/am/script_links.am index 92caa5f5cf4..459c36b7f8b 100644 --- a/Build/source/texk/am/script_links.am +++ b/Build/source/texk/am/script_links.am @@ -6,20 +6,25 @@ ## requires conditionals WIN32 and WIN32_WRAP ## requires $(scriptsdir): e.g., texmf/scripts/chktex ## requires $(perl_scripts): e.g., deweb +## optional $(shell_scripts): e.g. htlatex ## appends to $(nodist_bin_SCRIPTS) -.PHONY: install-perl-links make-perl-links uninstall-perl-links +.PHONY: install-perl-links make-perl-links \ + install-shell-links make-shell-links uninstall-links + +all_scripts = $(perl_scripts) $(shell_scripts) if WIN32 if WIN32_WRAP ## We treat the WIN32 wrappers as SCRIPTS to avoid automatic build rules -perl_wrappers = $(perl_scripts:=.exe) -nodist_bin_SCRIPTS += $(perl_wrappers) +wrappers = $(all_scripts:=.exe) +nodist_bin_SCRIPTS += $(wrappers) runscript = $(top_srcdir)/../../texk/texlive/w32_wrapper/runscript.exe -$(perl_wrappers): $(runscript) +$(wrappers): $(runscript) $(LN_S) $(runscript) $@ endif WIN32_WRAP endif WIN32 +# We support both multiplatform and non-multiplatform builds. install-perl-links: if !WIN32 case "$(bindir)" in \ @@ -30,6 +35,16 @@ if !WIN32 esac endif !WIN32 +install-shell-links: +if !WIN32 + case "$(bindir)" in \ + */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. make-shell-links;; \ + */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. make-shell-links;; \ + *) echo "strange directory '$(bindir)' for linked scripts" >&2; \ + exit 1;; \ + esac +endif !WIN32 + make-perl-links: @cd $(DESTDIR)$(bindir) && \ for f in $(perl_scripts); do \ @@ -38,9 +53,17 @@ make-perl-links: $(LN_S) $(REL)/$(scriptsdir)/$$f.pl $$f || exit 1; \ done -uninstall-perl-links: +make-shell-links: + @cd $(DESTDIR)$(bindir) && \ + for f in $(shell_scripts); do \ + rm -f $$f; \ + echo "creating link '$$f' -> '$(REL)/$(scriptsdir)/$$f.sh'"; \ + $(LN_S) $(REL)/$(scriptsdir)/$$f.sh $$f || exit 1; \ + done + +uninstall-links: if !WIN32 - @for f in $(perl_scripts); do \ + @for f in $(all_scripts); do \ echo "rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done |