summaryrefslogtreecommitdiff
path: root/Build/source/am/bin_links.am
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-07-06 09:40:06 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-07-06 09:40:06 +0000
commit832b5ce3848de5ca76c493570fc066f450ec8011 (patch)
tree52b629b6cd51b3769658ae55dc1f511c0bcac222 /Build/source/am/bin_links.am
parent7d7828afcc587d0e0889fb0a62cdfe25c53cb9d2 (diff)
build system: Move Makefile fragments from libs/am/ and texk/am/ to top-level/am.
git-svn-id: svn://tug.org/texlive/trunk@31117 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/am/bin_links.am')
-rw-r--r--Build/source/am/bin_links.am35
1 files changed, 35 insertions, 0 deletions
diff --git a/Build/source/am/bin_links.am b/Build/source/am/bin_links.am
new file mode 100644
index 00000000000..3cb7406b603
--- /dev/null
+++ b/Build/source/am/bin_links.am
@@ -0,0 +1,35 @@
+## am/bin_links.am: Makefile fragment for bindir links.
+##
+## Copyright (C) 2011-2013 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
+##
+## requires conditional WIN32
+## requires $(bin_links)
+## Symlinks within $(bindir): FILE:LINK indicates LINK->FILE
+## for binaries and scripts use, e.g.,
+## binprog$(EXEEXT):foo
+## script:bar
+## respectively, such that the links created on cygwin are
+## 'foo->binprog.exe' and 'bar->script'.
+.PHONY: install-bin-links uninstall-bin-links
+
+install-bin-links:
+if !WIN32
+ @cd $(DESTDIR)$(bindir) && \
+ for s in $(bin_links); do \
+ link=`echo $$s | sed 's,.*:,,'`; \
+ file=`echo $$s | sed 's,:.*,,'`; \
+ rm -f $$link; \
+ echo "creating link '$$link' -> '$$file'"; \
+ $(LN_S) $$file $$link || exit 1; \
+ done
+endif !WIN32
+
+uninstall-bin-links:
+if !WIN32
+ @for s in $(bin_links); do \
+ link=`echo $$s | sed 's,.*:,,'`; \
+ rm -f $(DESTDIR)$(bindir)/$$link; \
+ done
+endif !WIN32
+