On Wed, 21 Oct 2009, Thomas Adam wrote:

On Wed, Oct 21, 2009 at 02:37:54PM +0200, Peter Breitenlohner wrote:
Hi,

I'd like to propose the attached eight patches for fvwm-2.5.28, mostly
concerned with the build system but not exclusively so.  Each patch starts
with a comment explaining the purpose, a summay is given below.

Please resend all of these as separate emails threads in their own right.

Work around a bug in Automake <= 10.1 that installs a distributed manpage in
preference to a generated one.

Regards
Peter Breitenlohner <[email protected]>
        The doc/fvwm/fvwm.1 manpage is rebuilt only conditionally
        and thus must be distributed.

        Unfortunately, when a distributed manpage is present in $(srcdir)/
        and a generated, possibly different one in ./, automake versions
        <= 1.10.1 install the distributed one (automake PR 516).

        To avoid this problem, the manpage is declared as dist_manpage_DATA
        (and manpagedir defined). Not quite the right thing since man1_MANS
        is subject to --program-transform-name and similar, whereas
        manpage_DATA is not. That should be acceptable since
        install-data-local also doesn't respect --program-transform-name.

        A correct solution would require to distribute and possibly
        regenerated the manpage as, e.g., fvwm.1.dist and create the
        installable manpage fvwm.1 as symlink by a rule
                fvwm.1: fvwm.1.dist
                        rm -f $@
                        $(LN_S) $< $@

====================

        Some analogous changes might be required for all other manpages
        that are rebuilt conditionally!

diff -ur -x Makefile.in -x aclocal.m4 -x config.h.in -x 'config.h.in~' -x 
configure -x autom4te.cache -x INSTALL -x config.guess -x config.sub -x depcomp 
-x install-sh -x missing fvwm-2.5.28.orig/doc/fvwm/Makefile.am 
fvwm-2.5.28/doc/fvwm/Makefile.am
--- fvwm-2.5.28.orig/doc/fvwm/Makefile.am       2007-11-17 12:47:56.000000000 
+0100
+++ fvwm-2.5.28/doc/fvwm/Makefile.am    2009-10-20 21:15:00.000000000 +0200
@@ -9,8 +9,15 @@
 
 HTML_FILES = fvwm.man.html
 XML_FILES = @DOC_SECTIONS_XML_PATH@
-EXTRA_DIST = @DOC_SECTIONS_XML@ $(man_MANS) sections
-man_MANS = fvwm.1
+EXTRA_DIST = @DOC_SECTIONS_XML@ sections
+# If a distributed manpage exists in $(srcdir)/ and another possibly different
+# generated one in ./, automake versions <= 1.10.1 erroneously install the
+# distributed one (automake PR 516).  And yet, the manpage must be distributed
+# since it is rebuilt only conditionally, if FVWM_BUILD_MANDOC is true.
+# To avoid this problem we declare the manpage as dist_manpage_DATA and
+# define manpagedir.
+dist_manpage_DATA = fvwm.1
+manpagedir = $(mandir)/man1
 
 if FVWM_BUILD_HTMLDOC
 doc_DATA = $(HTML_FILES)
@@ -20,7 +27,7 @@
 endif
 
 if FVWM_BUILD_MANDOC
-BUILD_MANS = $(man_MANS)
+BUILD_MANS = $(dist_manpage_DATA)
 else
 BUILD_MANS =
 endif

Reply via email to