beta-0.89.2
[luatex.git] / source / am / bin_links.am
blob3cb7406b603c283e1a1b6d1de353cb56f2a111e2
1 ## am/bin_links.am: Makefile fragment for bindir links.
2 ##
3 ## Copyright (C) 2011-2013 Peter Breitenlohner <tex-live@tug.org>
4 ## You may freely use, modify and/or distribute this file.
5 ##
6 ## requires conditional WIN32
7 ## requires $(bin_links)
8 ## Symlinks within $(bindir): FILE:LINK indicates LINK->FILE
9 ##  for binaries and scripts use, e.g.,
10 ##    binprog$(EXEEXT):foo
11 ##    script:bar
12 ##  respectively, such that the links created on cygwin are
13 ##    'foo->binprog.exe' and 'bar->script'.
14 .PHONY: install-bin-links uninstall-bin-links
16 install-bin-links:
17 if !WIN32
18         @cd $(DESTDIR)$(bindir) && \
19           for s in $(bin_links); do \
20             link=`echo $$s | sed 's,.*:,,'`; \
21             file=`echo $$s | sed 's,:.*,,'`; \
22             rm -f $$link; \
23             echo "creating link '$$link' -> '$$file'"; \
24             $(LN_S) $$file $$link || exit 1; \
25           done
26 endif !WIN32
28 uninstall-bin-links:
29 if !WIN32
30         @for s in $(bin_links); do \
31           link=`echo $$s | sed 's,.*:,,'`; \
32           rm -f $(DESTDIR)$(bindir)/$$link; \
33         done
34 endif !WIN32