When I try to use the Gnulib relocatable-prog module with a program that has an uninstall-hook, Automake gives a warning like this:
po/automake.mk:97: warning: uninstall-hook was already defined in condition RELOCATABLE_VIA_WRAPPER, which is included in condition TRUE ... Makefile.am:84: 'po/automake.mk' included from here gl/automake.mk:2187: ... 'uninstall-hook' previously defined here Makefile.am:83: 'gl/automake.mk' included from here Makefile.am:105: warning: uninstall-hook was already defined in condition RELOCATABLE_VIA_WRAPPER, which is included in condition TRUE ... gl/automake.mk:2187: ... 'uninstall-hook' previously defined here Makefile.am:83: 'gl/automake.mk' included from here It appears that applying a patch similar to the following in Gnulib will fix the problem. I am not confident about it and could use advice or assistance. diff --git a/modules/relocatable-prog b/modules/relocatable-prog index 8e22b20dd0..bb4bc7ce9f 100644 --- a/modules/relocatable-prog +++ b/modules/relocatable-prog @@ -38,8 +38,8 @@ if GL_COND_OBJ_PROGRELOC lib_SOURCES += progreloc.c endif DEFS += -DEXEEXT=\"@EXEEXT@\" -if RELOCATABLE_VIA_WRAPPER uninstall-hook: uninstall-relocwrapper +if RELOCATABLE_VIA_WRAPPER uninstall-relocwrapper: if test $(RELOCATABLE) = yes; then \ case '$(EXEEXT)' in \ @@ -50,8 +50,10 @@ uninstall-relocwrapper: uninstall ;; \ esac; \ fi +else +uninstall-relocwrapper: + @# Nothing to do. endif -## Automake warns about conditionally added dependencies to unconditionally defined targets. .PHONY: uninstall-relocwrapper Include: Include: Thanks, Ben.