diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-05-02 11:54:33 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-05-02 11:54:33 +0000 |
commit | 3885a302c73852a157575006fad0303e61b0aa34 (patch) | |
tree | e3c411bbefcc984aff07bca0789a83b505530cb7 /Build/source/texk/am | |
parent | 2cd4ca41b3ae588951d08764c80468e2f8332b0e (diff) |
Reorganize texk/am/script_links.am and add support for .lua scripts
git-svn-id: svn://tug.org/texlive/trunk@22274 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/am')
-rw-r--r-- | Build/source/texk/am/script_links.am | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/Build/source/texk/am/script_links.am b/Build/source/texk/am/script_links.am index 459c36b7f8b..a73f397ecc3 100644 --- a/Build/source/texk/am/script_links.am +++ b/Build/source/texk/am/script_links.am @@ -3,15 +3,24 @@ ## Copyright (C) 2011 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## +## Install/uninstall 'linked scripts' or win32 wrappers +## to use it, add prerequisite uninstall-links to uninstall-hook and +## one ore more of install-{lua,perl,shell}-scripts to install-data-hook +## ## 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 \ - install-shell-links make-shell-links uninstall-links +# +## install-lua-scripts requires $(lua_scripts), e.g., musixflx +## install-perl-scripts requires $(perl_scripts), e.g., deweb +## install-shell-scripts requires $(shell_scripts), e.g. htlatex +## +## shell_scripts are somewhat special because win32 needs +## additional .bat scripts or similar +.PHONY: install-lua-links install-perl-links install-shell-links \ + install-links make-links uninstall-links -all_scripts = $(perl_scripts) $(shell_scripts) +all_scripts = $(lua_scripts) $(perl_scripts) $(shell_scripts) if WIN32 if WIN32_WRAP @@ -24,43 +33,38 @@ $(wrappers): $(runscript) endif WIN32_WRAP endif WIN32 -# We support both multiplatform and non-multiplatform builds. +install-lua-links: +if !WIN32 + $(MAKE) $(AM_MAKEFLAGS) TYPE=lua EXT=lua install-links +endif !WIN32 + install-perl-links: if !WIN32 - case "$(bindir)" in \ - */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. make-perl-links;; \ - */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. make-perl-links;; \ - *) echo "strange directory '$(bindir)' for linked scripts" >&2; \ - exit 1;; \ - esac + $(MAKE) $(AM_MAKEFLAGS) TYPE=perl EXT=pl install-links endif !WIN32 install-shell-links: if !WIN32 + $(MAKE) $(AM_MAKEFLAGS) TYPE=shell EXT=sh install-links +endif !WIN32 + +# We support both multiplatform and non-multiplatform builds. +install-links: 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; \ + */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. TYPE=$(TYPE) EXT=$(EXT) make-links;; \ + */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. TYPE=$(TYPE) EXT=$(EXT) make-links;; \ + *) echo "strange directory '$(bindir)' for linked $(TYPE) scripts" >&2; \ exit 1;; \ esac -endif !WIN32 -make-perl-links: +make-links: @cd $(DESTDIR)$(bindir) && \ - for f in $(perl_scripts); do \ + for f in $($(TYPE)_scripts); do \ rm -f $$f; \ - echo "creating link '$$f' -> '$(REL)/$(scriptsdir)/$$f.pl'"; \ - $(LN_S) $(REL)/$(scriptsdir)/$$f.pl $$f || exit 1; \ + echo "creating link '$$f' -> '$(REL)/$(scriptsdir)/$$f.$(EXT)'"; \ + $(LN_S) $(REL)/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \ done -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 $(all_scripts); do \ |