diff options
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index 2d8357d5..c646fc34 100644 --- a/Makefile.am +++ b/Makefile.am @@ -154,17 +154,21 @@ RM = rm -f # For GNU systems where gawk is awk, add a link to awk. # (This is done universally, which may not always be right, but # there's no easy way to distinguish GNU from non-GNU systems.) +# +# Use the transform, in case --program-prefix=XXX install-exec-hook: (cd $(DESTDIR)$(bindir); \ - $(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ + name=`echo gawk | sed '$(transform)'` ; \ + $(LN) $${name}$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ if [ ! -f awk$(EXEEXT) ]; \ - then $(LN_S) gawk$(EXEEXT) awk$(EXEEXT); \ + then $(LN_S) $${name}$(EXEEXT) awk$(EXEEXT); \ fi; exit 0) # Undo the above when uninstalling uninstall-links: (cd $(DESTDIR)$(bindir); \ - if [ -f awk$(EXEEXT) ] && cmp awk$(EXEEXT) gawk$(EXEEXT) > /dev/null; then rm -f awk$(EXEEXT); fi ; \ + name=`echo gawk | sed '$(transform)'` ; \ + if [ -f awk$(EXEEXT) ] && cmp awk$(EXEEXT) $${name}$(EXEEXT) > /dev/null; then rm -f awk$(EXEEXT); fi ; \ rm -f gawk-$(VERSION)$(EXEEXT); exit 0) uninstall-recursive: uninstall-links |