## texk/am/bin_links.am: Makefile fragment for bindir links. ## ## Copyright (C) 2011 Peter Breitenlohner ## 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