aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Makefile.am10
-rw-r--r--Makefile.in10
3 files changed, 21 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 7010c4a0..15657099 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-04-30 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am: Take --program-prefix into account when
+ installing/uninstalling the symlinks, especially 'awk'.
+ Thanks to Steffen Nurpmeso <sdaoden@yandex.com> for
+ the report.
+
2015-04-29 Arnold D. Robbins <arnold@skeeve.com>
* 4.1.2: Release tar ball made.
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
diff --git a/Makefile.in b/Makefile.in
index 79a5a2a4..183d71cd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1172,17 +1172,21 @@ uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS
# 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