bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* relocatable-prog: avoid warnings from Automake
@ 2019-01-23 21:48 Akim Demaille
  2019-01-23 22:03 ` Ben Pfaff
  2019-01-24  1:08 ` Bruno Haible
  0 siblings, 2 replies; 4+ messages in thread
From: Akim Demaille @ 2019-01-23 21:48 UTC (permalink / raw)
  To: Gnulib bugs; +Cc: Ben Pfaff

Hi Ben,

This is what I get currently:

 cd bison && /bin/sh build-aux/missing automake-1.16 --gnu Makefile
lib/gnulib.mk:1677: warning: .PHONY was already defined in condition TRUE, which includes condition RELOCATABLE_VIA_WRAPPER ...
Makefile.am:71:   'lib/local.mk' included from here
lib/local.mk:16:   'lib/gnulib.mk' included from here
doc/local.mk:168: ... '.PHONY' previously defined here
Makefile.am:68:   'doc/local.mk' included from here

this is because relocatable-prog's Makefile snippet uses .PHONY in a conditional.  AFAICT the only difference is that when not enabled, "make uninstall-relocwrapper" will do nothing instead of being an error.  The rigorous alternative would be to define a variable in the conditional and use it in .PHONY.  Would you prefer that?

commit e460bdd044600c46cea452b66d419ce01fff30d8
Author: Akim Demaille <akim.demaille@gmail.com>
Date:   Wed Jan 23 22:42:04 2019 +0100

    relocatable-prog: avoid warnings from Automake
    
    * modules/relocatable-prog: Don't declare PHONY dependencies in
    Automake conditionals.

diff --git a/ChangeLog b/ChangeLog
index b9e15a10a..e9a745ee9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-01-23  Akim Demaille  <akim@lrde.epita.fr>
+
+	relocatable-prog: avoid warnings from Automake
+	* modules/relocatable-prog: Don't declare PHONY dependencies in
+	Automake conditionals.
+
 2019-01-23  Akim Demaille  <akim@lrde.epita.fr>
 
 	array-list: Pacify warnings about unused arguments (-Wunused-parameter).
diff --git a/modules/relocatable-prog b/modules/relocatable-prog
index ee6fcf5e7..60ebb239a 100644
--- a/modules/relocatable-prog
+++ b/modules/relocatable-prog
@@ -45,8 +45,8 @@ uninstall-relocwrapper:
 		       uninstall ;; \
 	  esac; \
 	fi
-.PHONY: uninstall-relocwrapper
 endif
+.PHONY: uninstall-relocwrapper
 
 Include:
 "relocatable.h"



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-24  6:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23 21:48 relocatable-prog: avoid warnings from Automake Akim Demaille
2019-01-23 22:03 ` Ben Pfaff
2019-01-24  1:08 ` Bruno Haible
2019-01-24  6:38   ` Akim Demaille

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).