bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adapting relocatable-prog to non-recursive make


From: Ben Pfaff
Subject: Re: adapting relocatable-prog to non-recursive make
Date: Sun, 13 Mar 2022 16:15:07 -0700

On Sun, Mar 13, 2022 at 3:44 PM Bruno Haible <bruno@clisp.org> wrote:
>
> Hi Ben,
>
> > 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
>
> What do these two Makefiles look like:
> 1) po/automake.mk around line 97 ?
> 2) gl/automake.mk around line 2187 ?

This is GNU PSPP, tip of master. If you download a configured source
snapshot from
https://benpfaff.org/~blp/pspp-master/20220313140713/source/pspp-1.5.3-g75c0ae.tar.gz
and then run "automake", you can see the messages (line numbers have
changed a little
because I've been doing work):

po/automake.mk:97: warning: uninstall-hook was already defined in
condition RELOCATABLE_
VIA_WRAPPER, which is included in condition TRUE ...
Makefile.am:82:   'po/automake.mk' included from here
gl/automake.mk:2187: ... 'uninstall-hook' previously defined here
Makefile.am:81:   'gl/automake.mk' included from here
Makefile.am:103: warning: uninstall-hook was already defined in
condition RELOCATABLE_VI
A_WRAPPER, which is included in condition TRUE ...
gl/automake.mk:2187: ... 'uninstall-hook' previously defined here
Makefile.am:81:   'gl/automake.mk' included from here

and then po/automake.mk starting from line 97 is:

uninstall-hook: uninstall-gmofiles
uninstall-gmofiles:
       for f in $(GMOFILES); do \
         lang=`echo $$f | $(SED) -e 's%po/\(.*\)\.gmo%\1%' ` ; \
         rm -f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo
; \
       done
.PHONY: uninstall-gmofiles

and the relevant part of gl/automake.mk is:

if RELOCATABLE_VIA_WRAPPER
uninstall-hook: uninstall-relocwrapper
uninstall-relocwrapper:
       if test $(RELOCATABLE) = yes; then \
         case '$(EXEEXT)' in \
           .bin*) ;; \
           *) cd $(top_builddir) && \
              $(MAKE) $(AM_MAKEFLAGS) EXEEXT=.bin$(EXEEXT) \
                      AM_MAKEFLAGS='$(AM_MAKEFLAGS) EXEEXT=.bin$(EXEEXT)' \
                      uninstall ;; \
         esac; \
       fi
endif
## Automake warns about conditionally added dependencies to
unconditionally defined targ
ets.
.PHONY: uninstall-relocwrapper

Oh, also Makefile.am at line 103 is:

uninstall-hook: $(UNINSTALL_DATA_HOOKS)

Thanks,

Ben.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]