diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-03-31 12:17:01 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-03-31 12:17:01 +0000 |
commit | 3cc388b38baa1753180bf4a02aade22a6e461638 (patch) | |
tree | 2fb531d216318b317c732d72869736eb4e2f5820 /Build/source/texk | |
parent | bb9fb0ff57117f1eef90f381c0b0b767e33058ff (diff) |
Makefile fragment for linked perl scripts
git-svn-id: svn://tug.org/texlive/trunk@21901 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/am/man1_links.am | 1 | ||||
-rw-r--r-- | Build/source/texk/am/script_links.am | 48 |
2 files changed, 48 insertions, 1 deletions
diff --git a/Build/source/texk/am/man1_links.am b/Build/source/texk/am/man1_links.am index db66bacc693..f34a3fa8e1e 100644 --- a/Build/source/texk/am/man1_links.am +++ b/Build/source/texk/am/man1_links.am @@ -23,4 +23,3 @@ uninstall-man1-links: rm -f $(DESTDIR)$(man1dir)/$$link.1; \ done - diff --git a/Build/source/texk/am/script_links.am b/Build/source/texk/am/script_links.am new file mode 100644 index 00000000000..92caa5f5cf4 --- /dev/null +++ b/Build/source/texk/am/script_links.am @@ -0,0 +1,48 @@ +## texk/am/perl_links.am: Makefile fragment for perl script links. +## +## Copyright (C) 2011 Peter Breitenlohner <tex-live@tug.org> +## You may freely use, modify and/or distribute this file. +## +## requires conditionals WIN32 and WIN32_WRAP +## requires $(scriptsdir): e.g., texmf/scripts/chktex +## requires $(perl_scripts): e.g., deweb +## appends to $(nodist_bin_SCRIPTS) +.PHONY: install-perl-links make-perl-links uninstall-perl-links + +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) +runscript = $(top_srcdir)/../../texk/texlive/w32_wrapper/runscript.exe +$(perl_wrappers): $(runscript) + $(LN_S) $(runscript) $@ +endif WIN32_WRAP +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 +endif !WIN32 + +make-perl-links: + @cd $(DESTDIR)$(bindir) && \ + for f in $(perl_scripts); do \ + rm -f $$f; \ + echo "creating link '$$f' -> '$(REL)/$(scriptsdir)/$$f.pl'"; \ + $(LN_S) $(REL)/$(scriptsdir)/$$f.pl $$f || exit 1; \ + done + +uninstall-perl-links: +if !WIN32 + @for f in $(perl_scripts); do \ + echo "rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done +endif !WIN32 + |