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 reply to me directly, because I am not on this list.

Short summary:

patch-01-gcc-flags: Gcc warnings.

patch-02-libXcursor: Prerequisites for configure test.

patch-03-gettext-const:
Avoid gcc 'discards qualifiers' warnings with --disable-nls.

patch-04-distfiles-manpages
patch-07-distfiles-condmanpages
patch-08-distfiles-superfluous:
Do not distribute files generated by configure; due to a bug in Automake
10.1 and earlier, this can be really bad for manpages.

patch-05-distfiles-disable-nls:
patch-06-distfiles-VPATH:
Fix 'make dist' when configured with --disable-nls and/or built outside
the source tree.  This should allow for running 'make distcheck'.

Regards
Peter Breitenlohner <[email protected]>
        We (me) certainly do want implicit-int warnings!

        On the other hand there are zillions of type-punning warnings.
        Instead of suppressing these warnings it is probably safer to
        disable the strict aliasing optimizations (implied by '-O2').

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/configure.ac fvwm-2.5.28/configure.ac
--- fvwm-2.5.28.orig/configure.ac       2009-09-20 09:02:33.000000000 +0200
+++ fvwm-2.5.28/configure.ac    2009-10-20 20:38:28.000000000 +0200
@@ -211,7 +211,7 @@
 
 # added -Wall for gcc, what about for others?
 if test "x$GCC" = "xyes"; then
-  CFLAGS="-Wall -Wno-implicit-int $CFLAGS"
+  CFLAGS="-Wall -fno-strict-aliasing $CFLAGS"
 fi
 
 # Help finding POSIX functions on some systems
        'AC_CHECK_LIB(Xcursor, ...' may require additional libraries,
        same as for 'AC_CHECK_LIB(Xrender, ...'.

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/configure.ac fvwm-2.5.28/configure.ac
--- fvwm-2.5.28.orig/configure.ac       2009-10-20 20:38:28.000000000 +0200
+++ fvwm-2.5.28/configure.ac    2009-10-20 20:50:58.000000000 +0200
@@ -656,7 +656,8 @@
       ],[
          with_xcursor=no
          problem_xcursor=": Failed to detect libXcursor"
-      ],)
+      ],
+      [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS])
 fi
 AC_SUBST(Xcursor_CFLAGS)
 AC_SUBST(Xcursor_LIBS)
        With --disable-nls libs/FGettext.h specifies
                # define gettext(Msgid) ((const char *) (Msgid))
        With --enable-nls the gettext(3) manpage from GNU gettext 0.17 says:
                If a translation was found in one of the specified catalogs,
                it is converted to the locale's codeset and returned. The
                resulting string is statically allocated and must not be
                modified or freed. Otherwise msgid is returned.

        Thus, the declaration of gettext should almost be
                const char * gettext (const char * msgid);
        instead of
                char * gettext (const char * msgid);

        Conclusion:
                translated strings ought to be considered as 'const char *'
                in the sense that they must not be modified.

        This patch contains the modifications necessary in order to avoid
        'discards qualifier' warnings (for --disable-nls) and to avoid
        modifying the string returned by gettext(3):

        (1) change arg 2 'item' of AddToMenu (in fvwm/menus.c) from 'char *'
        to 'const char *'

        (2) when parsing 'item', instead of first modifying 'item' and the
        copying a portion, modify the copied portion.

        (3) add some 'const's in libs/FGettext.c

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/fvwm/menus.c fvwm-2.5.28/fvwm/menus.c
--- fvwm-2.5.28.orig/fvwm/menus.c       2008-03-18 12:29:45.000000000 +0100
+++ fvwm-2.5.28/fvwm/menus.c    2009-10-20 20:55:02.000000000 +0200
@@ -6588,12 +6588,12 @@
  *
  */
 void AddToMenu(
-       MenuRoot *mr, char *item, char *action, Bool fPixmapsOk, Bool fNoPlus,
+       MenuRoot *mr, const char *item, char *action, Bool fPixmapsOk, Bool 
fNoPlus,
        Bool is_continuation_item)
 {
        MenuItem *tmp;
-       char *start;
-       char *end;
+       const char *start;
+       const char *end;
        char *token = NULL;
        char *option = NULL;
        int i;
@@ -6710,30 +6710,28 @@
                /* Read label up to next tab. */
                if (*end)
                {
-                       if (i < MAX_MENU_ITEM_LABELS - 1)
+                       while (*end && (i == MAX_MENU_ITEM_LABELS - 1 || *end 
!= '\t'))
                        {
-                               while (*end && *end != '\t')
-                               {
-                                       /* seek next tab or end of string */
-                                       end++;
-                               }
+                               /* seek next tab (except for last label) or end 
of string */
+                               end++;
                        }
-                       else
+                       /* Copy the label. */
+                       MI_LABEL(tmp)[i] = safemalloc(end - start + 1);
+                       strncpy(MI_LABEL(tmp)[i], start, end - start);
+                       (MI_LABEL(tmp)[i])[end - start] = 0;
+                       if (i == MAX_MENU_ITEM_LABELS - 1)
                        {
+                               char *cpyend = MI_LABEL(tmp)[i];
                                /* remove all tabs in last label */
-                               while (*end)
+                               while (*cpyend)
                                {
-                                       if (*end == '\t')
+                                       if (*cpyend == '\t')
                                        {
-                                               *end = ' ';
+                                               *cpyend = ' ';
                                        }
-                                       end++;
+                                       cpyend++;
                                }
                        }
-                       /* Copy the label. */
-                       MI_LABEL(tmp)[i] = safemalloc(end - start + 1);
-                       strncpy(MI_LABEL(tmp)[i], start, end - start);
-                       (MI_LABEL(tmp)[i])[end - start] = 0;
                        if (*end == '\t')
                        {
                                /* skip the tab */
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/fvwm/menus.h fvwm-2.5.28/fvwm/menus.h
--- fvwm-2.5.28.orig/fvwm/menus.h       2007-01-27 12:51:15.000000000 +0100
+++ fvwm-2.5.28/fvwm/menus.h    2009-10-20 20:55:02.000000000 +0200
@@ -33,7 +33,7 @@
 struct MenuRoot *FollowMenuContinuations(
        struct MenuRoot *mr, struct MenuRoot **pmrPrior);
 struct MenuRoot *NewMenuRoot(char *name);
-void AddToMenu(struct MenuRoot *, char *, char *, Bool, Bool, Bool);
+void AddToMenu(struct MenuRoot *, const char *, char *, Bool, Bool, Bool);
 void menu_enter_tear_off_menu(const exec_context_t *exc);
 void menu_close_tear_off_menu(FvwmWindow *fw);
 Bool menu_redraw_transparent_tear_off_menu(FvwmWindow *fw, Bool pr_only);
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/libs/FGettext.c 
fvwm-2.5.28/libs/FGettext.c
--- fvwm-2.5.28.orig/libs/FGettext.c    2007-08-07 22:17:43.000000000 +0200
+++ fvwm-2.5.28/libs/FGettext.c 2009-10-20 20:55:02.000000000 +0200
@@ -126,7 +126,7 @@
 
 void FGettextInit(const char *domain, const char *dir, const char *module)
 {
-       char *btd, *td;
+       const char *btd, *td;
 
        if (!HaveNLSSupport)
        {
        Please don't distribute generated manpages!

        First of all this is superfluous. Moreover, and more serious,
        automake versions <= 1.10.1 install the distributed manpages
        in preference to generated ones -- certainly not what we want.

        While at it, I have changed 'config_DATA' into 'dist_config_DATA'
        and removed these files from 'EXTRA_DIST' (less duplication).

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/bin/Makefile.am 
fvwm-2.5.28/bin/Makefile.am
--- fvwm-2.5.28.orig/bin/Makefile.am    2009-03-22 14:14:56.000000000 +0100
+++ fvwm-2.5.28/bin/Makefile.am 2009-10-20 20:58:46.000000000 +0200
@@ -12,11 +12,16 @@
        fvwm-menu-desktop fvwm-menu-headlines
 
 man_MANS = \
-       fvwm-root.1 fvwm-config.1 fvwm-bug.1 fvwm-perllib.1 \
+       fvwm-bug.1 fvwm-config.1 \
        fvwm-convert-2.4.1 fvwm-convert-2.6.1 \
+       fvwm-menu-desktop.1 fvwm-root.1 
+noinst_MANS = \
+       fvwm-convert-2.2.1
+dist_man_MANS = \
+       fvwm-perllib.1 \
        fvwm-menu-xlock.1 fvwm-menu-directory.1 \
-       fvwm-menu-desktop.1 fvwm-menu-headlines.1
-EXTRA_DIST = fvwm-convert-2.2 fvwm-convert-2.2.1 $(man_MANS)
+       fvwm-menu-headlines.1
+EXTRA_DIST = fvwm-convert-2.2
 
 LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm $(xpm_LIBS) $(Xcursor_LIBS) \
        $(X_PRE_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) $(Xrender_LIBS) \
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/modules/FvwmAnimate/Makefile.am 
fvwm-2.5.28/modules/FvwmAnimate/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmAnimate/Makefile.am    2007-07-15 
14:39:39.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmAnimate/Makefile.am 2009-10-20 20:58:46.000000000 
+0200
@@ -3,7 +3,6 @@
 moduledir = @FVWM_MODULEDIR@
 module_PROGRAMS = FvwmAnimate
 man_MANS = FvwmAnimate.1
-EXTRA_DIST = $(man_MANS)
 
 FvwmAnimate_SOURCES = FvwmAnimate.c FvwmAnimate.h
 FvwmAnimate_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
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/modules/FvwmAuto/Makefile.am 
fvwm-2.5.28/modules/FvwmAuto/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmAuto/Makefile.am       2002-04-05 
11:24:30.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmAuto/Makefile.am    2009-10-20 20:58:46.000000000 
+0200
@@ -3,7 +3,6 @@
 moduledir = @FVWM_MODULEDIR@
 module_PROGRAMS = FvwmAuto
 man_MANS = FvwmAuto.1
-EXTRA_DIST = $(man_MANS)
 
 FvwmAuto_SOURCES = FvwmAuto.c
 FvwmAuto_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
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/modules/FvwmBacker/Makefile.am 
fvwm-2.5.28/modules/FvwmBacker/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmBacker/Makefile.am     2007-01-28 
16:29:26.000000000 +0100
+++ fvwm-2.5.28/modules/FvwmBacker/Makefile.am  2009-10-20 20:58:46.000000000 
+0200
@@ -5,9 +5,8 @@
 
 module_PROGRAMS = FvwmBacker
 man_MANS = FvwmBacker.1
-EXTRA_DIST = $(man_MANS) ConfigFvwmBacker
 
-config_DATA = \
+dist_config_DATA = \
   ConfigFvwmBacker
 
 FvwmBacker_SOURCES = FvwmBacker.c FvwmBacker.h root_bits.c
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/modules/FvwmBanner/Makefile.am 
fvwm-2.5.28/modules/FvwmBanner/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmBanner/Makefile.am     2007-07-15 
14:39:39.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmBanner/Makefile.am  2009-10-20 20:58:46.000000000 
+0200
@@ -5,7 +5,7 @@
 module_PROGRAMS = FvwmBanner
 
 man_MANS = FvwmBanner.1
-EXTRA_DIST = $(man_MANS) fvwm-logo-current.xpm fvwm-logo-current.xbm
+EXTRA_DIST = fvwm-logo-current.xpm fvwm-logo-current.xbm
 
 FvwmBanner_SOURCES = FvwmBanner.c
 FvwmBanner_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a fvwm-logo-current.xpm
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/modules/FvwmButtons/Makefile.am 
fvwm-2.5.28/modules/FvwmButtons/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmButtons/Makefile.am    2007-07-15 
14:39:39.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmButtons/Makefile.am 2009-10-20 20:58:46.000000000 
+0200
@@ -5,9 +5,9 @@
 
 module_PROGRAMS = FvwmButtons
 man_MANS = FvwmButtons.1
-EXTRA_DIST = $(man_MANS) CHANGES samplebuttonrc BUGS ConfigFvwmButtons
+EXTRA_DIST = CHANGES samplebuttonrc BUGS
 
-config_DATA = ConfigFvwmButtons
+dist_config_DATA = ConfigFvwmButtons
 
 FvwmButtons_SOURCES = \
        FvwmButtons.c FvwmButtons.h button.c button.h draw.c draw.h \
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/modules/FvwmCommand/Makefile.am 
fvwm-2.5.28/modules/FvwmCommand/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmCommand/Makefile.am    2007-08-07 
22:17:43.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmCommand/Makefile.am 2009-10-20 20:58:46.000000000 
+0200
@@ -31,7 +31,7 @@
 
 man_MANS = FvwmCommand.1
 
-EXTRA_DIST = $(man_MANS) findcmd.pl
+EXTRA_DIST = findcmd.pl
 
 LDADD = -L$(top_builddir)/libs -lfvwm
 
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/modules/FvwmConsole/Makefile.am 
fvwm-2.5.28/modules/FvwmConsole/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmConsole/Makefile.am    1999-09-04 
18:53:05.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmConsole/Makefile.am 2009-10-20 20:58:46.000000000 
+0200
@@ -13,7 +13,7 @@
 FvwmConsoleC_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
 
 man_MANS = FvwmConsole.1 FvwmConsoleC.pl.1
-EXTRA_DIST = FvwmConsoleC.pl.in $(man_MANS) Changes .fvwm2rc.sample
+EXTRA_DIST = Changes .fvwm2rc.sample
 
 # Use X_EXTRA_LIBS to get socket(), etc.
 LDADD = -L$(top_builddir)/libs -lfvwm $(readline_LIBS) $(X_EXTRA_LIBS)
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/modules/FvwmCpp/Makefile.am 
fvwm-2.5.28/modules/FvwmCpp/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmCpp/Makefile.am        2002-04-05 
11:24:31.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmCpp/Makefile.am     2009-10-20 20:58:46.000000000 
+0200
@@ -3,7 +3,6 @@
 moduledir = @FVWM_MODULEDIR@
 module_PROGRAMS = FvwmCpp
 man_MANS = FvwmCpp.1
-EXTRA_DIST = $(man_MANS)
 
 FvwmCpp_SOURCES = FvwmCpp.c FvwmCpp.h
 FvwmCpp_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
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/modules/FvwmDragWell/Makefile.am 
fvwm-2.5.28/modules/FvwmDragWell/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmDragWell/Makefile.am   2007-01-28 
16:29:26.000000000 +0100
+++ fvwm-2.5.28/modules/FvwmDragWell/Makefile.am        2009-10-20 
20:58:46.000000000 +0200
@@ -9,7 +9,6 @@
 FvwmDragWell_SOURCES = fvwmDragWell.c xdndDragSource.c cursorStuff.c \
        commonStuff.h cursorStuff.h dragSource.h fvwmDragWell.h
 FvwmDragWell_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
-EXTRA_DIST = $(man_MANS)
 
 
 LDADD = -L$(top_builddir)/libs -lfvwm \
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/modules/FvwmEvent/Makefile.am 
fvwm-2.5.28/modules/FvwmEvent/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmEvent/Makefile.am      2002-04-05 
11:24:31.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmEvent/Makefile.am   2009-10-20 20:58:46.000000000 
+0200
@@ -3,7 +3,6 @@
 moduleexecdir = @FVWM_MODULEDIR@
 moduleexec_PROGRAMS = FvwmEvent
 man_MANS = FvwmEvent.1
-EXTRA_DIST = $(man_MANS)
 
 FvwmEvent_SOURCES = FvwmEvent.c
 FvwmEvent_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
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/modules/FvwmForm/Makefile.am 
fvwm-2.5.28/modules/FvwmForm/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmForm/Makefile.am       2007-01-28 
16:29:26.000000000 +0100
+++ fvwm-2.5.28/modules/FvwmForm/Makefile.am    2009-10-20 20:58:46.000000000 
+0200
@@ -16,22 +16,16 @@
 
 ## NB: Neither _MANS nor _DATA are included by default in
 ## distributions!
-EXTRA_DIST = $(man_MANS) Changes \
-  FvwmForm-Setup.in   \
-  FvwmForm-Form       \
-  FvwmForm-Capture    \
-  FvwmForm-QuitVerify \
-  FvwmForm-Rlogin     \
-  FvwmForm-RootCursor \
-  FvwmForm-Talk       \
-  FvwmForm-TalkHelp
+EXTRA_DIST = Changes \
+  FvwmForm-Setup.in
 
 FvwmForm_SOURCES = FvwmForm.c FvwmForm.h ReadXServer.c ParseCommand.c
 
 FvwmForm_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
 
 config_DATA =        \
-  FvwmForm-Setup      \
+  FvwmForm-Setup
+dist_config_DATA =    \
   FvwmForm-Form       \
   FvwmForm-Capture    \
   FvwmForm-QuitVerify \
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/modules/FvwmGtk/Makefile.am 
fvwm-2.5.28/modules/FvwmGtk/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmGtk/Makefile.am        2004-07-09 
17:46:44.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmGtk/Makefile.am     2009-10-20 20:58:46.000000000 
+0200
@@ -11,7 +11,6 @@
 #man_MANS = @MANFVWMGTK@
 man_onedir = $(mandir)/man1
 man_one_DATA = @MANFVWMGTK@
-EXTRA_DIST = FvwmGtk.1
 
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
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/modules/FvwmIconBox/Makefile.am 
fvwm-2.5.28/modules/FvwmIconBox/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmIconBox/Makefile.am    2007-07-15 
14:39:39.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmIconBox/Makefile.am 2009-10-20 20:58:46.000000000 
+0200
@@ -5,9 +5,9 @@
 
 module_PROGRAMS = FvwmIconBox
 man_MANS = FvwmIconBox.1
-EXTRA_DIST = $(man_MANS) CHANGES COPYRIGHT TO-DO ConfigFvwmIconBox
+EXTRA_DIST = CHANGES COPYRIGHT TO-DO
 
-config_DATA = \
+dist_config_DATA = \
   ConfigFvwmIconBox
 
 FvwmIconBox_SOURCES = FvwmIconBox.c FvwmIconBox.h icons.c
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/modules/FvwmIconMan/Makefile.am 
fvwm-2.5.28/modules/FvwmIconMan/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmIconMan/Makefile.am    2007-01-28 
16:29:26.000000000 +0100
+++ fvwm-2.5.28/modules/FvwmIconMan/Makefile.am 2009-10-20 20:58:46.000000000 
+0200
@@ -5,9 +5,8 @@
 
 module_PROGRAMS = FvwmIconMan
 man_MANS = FvwmIconMan.1
-EXTRA_DIST = $(man_MANS) ConfigFvwmIconMan
 
-config_DATA = \
+dist_config_DATA = \
   ConfigFvwmIconMan
 
 FvwmIconMan_SOURCES = FvwmIconMan.c FvwmIconMan.h debug.c debug.h \
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/modules/FvwmIdent/Makefile.am 
fvwm-2.5.28/modules/FvwmIdent/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmIdent/Makefile.am      2007-01-28 
16:29:26.000000000 +0100
+++ fvwm-2.5.28/modules/FvwmIdent/Makefile.am   2009-10-20 20:58:46.000000000 
+0200
@@ -5,9 +5,8 @@
 
 module_PROGRAMS = FvwmIdent
 man_MANS = FvwmIdent.1
-EXTRA_DIST = $(man_MANS) ConfigFvwmIdent
 
-config_DATA = \
+dist_config_DATA = \
   ConfigFvwmIdent
 
 FvwmIdent_SOURCES = FvwmIdent.c FvwmIdent.h
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/modules/FvwmM4/Makefile.am 
fvwm-2.5.28/modules/FvwmM4/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmM4/Makefile.am 2002-04-05 11:24:32.000000000 
+0200
+++ fvwm-2.5.28/modules/FvwmM4/Makefile.am      2009-10-20 20:58:46.000000000 
+0200
@@ -3,7 +3,6 @@
 moduledir = @FVWM_MODULEDIR@
 module_PROGRAMS = FvwmM4
 man_MANS = FvwmM4.1
-EXTRA_DIST = $(man_MANS)
 
 FvwmM4_SOURCES = FvwmM4.c FvwmM4.h
 FvwmM4_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
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/modules/FvwmPager/Makefile.am 
fvwm-2.5.28/modules/FvwmPager/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmPager/Makefile.am      2007-07-15 
14:39:39.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmPager/Makefile.am   2009-10-20 20:58:46.000000000 
+0200
@@ -5,9 +5,8 @@
 
 module_PROGRAMS = FvwmPager
 man_MANS = FvwmPager.1
-EXTRA_DIST = $(man_MANS) ConfigFvwmPager
 
-config_DATA = \
+dist_config_DATA = \
   ConfigFvwmPager
 
 FvwmPager_SOURCES = FvwmPager.c FvwmPager.h x_pager.c
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/modules/FvwmProxy/Makefile.am 
fvwm-2.5.28/modules/FvwmProxy/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmProxy/Makefile.am      2007-07-15 
14:39:39.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmProxy/Makefile.am   2009-10-20 20:58:46.000000000 
+0200
@@ -5,9 +5,8 @@
 
 module_PROGRAMS = FvwmProxy
 man_MANS = FvwmProxy.1
-EXTRA_DIST = $(man_MANS) ConfigFvwmProxyDefaults
 
-config_DATA = \
+dist_config_DATA = \
        ConfigFvwmProxyDefaults
 
 FvwmProxy_SOURCES = FvwmProxy.c FvwmProxy.h
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/modules/FvwmRearrange/Makefile.am 
fvwm-2.5.28/modules/FvwmRearrange/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmRearrange/Makefile.am  2002-10-13 
17:50:01.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmRearrange/Makefile.am       2009-10-20 
20:58:46.000000000 +0200
@@ -20,7 +20,6 @@
        echo 'shift;shift;shift;shift;shift' >> $@
        echo exec ${moduledir}'/FvwmRearrange $$modargs -tile $$@' >> $@
 
-EXTRA_DIST = $(man_MANS)
 man_MANS = FvwmRearrange.1
 CLEANFILES = $(module_SCRIPTS)
 
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/modules/FvwmSave/Makefile.am 
fvwm-2.5.28/modules/FvwmSave/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmSave/Makefile.am       2002-05-29 
21:11:18.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmSave/Makefile.am    2009-10-20 20:58:46.000000000 
+0200
@@ -3,7 +3,6 @@
 moduledir = @FVWM_MODULEDIR@
 module_PROGRAMS = FvwmSave
 man_MANS = FvwmSave.1
-EXTRA_DIST = $(man_MANS)
 
 FvwmSave_SOURCES = FvwmSave.c FvwmSave.h
 FvwmSave_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
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/modules/FvwmSaveDesk/Makefile.am 
fvwm-2.5.28/modules/FvwmSaveDesk/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmSaveDesk/Makefile.am   2002-05-29 
21:11:18.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmSaveDesk/Makefile.am        2009-10-20 
20:58:46.000000000 +0200
@@ -3,7 +3,7 @@
 moduledir = @FVWM_MODULEDIR@
 module_PROGRAMS = FvwmSaveDesk
 man_MANS = FvwmSaveDesk.1
-EXTRA_DIST = $(man_MANS) example/fvwm2rc example/xinitrc
+EXTRA_DIST = example/fvwm2rc example/xinitrc
 
 FvwmSaveDesk_SOURCES = FvwmSaveDesk.c FvwmSaveDesk.h
 FvwmSaveDesk_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
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/modules/FvwmScript/Makefile.am 
fvwm-2.5.28/modules/FvwmScript/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmScript/Makefile.am     2009-02-22 
22:24:48.000000000 +0100
+++ fvwm-2.5.28/modules/FvwmScript/Makefile.am  2009-10-20 20:58:46.000000000 
+0200
@@ -14,7 +14,7 @@
 YFLAGS = -d
 
 man_MANS = FvwmScript.1
-EXTRA_DIST = $(man_MANS) scanner.l script.y TODO
+EXTRA_DIST = scanner.l script.y TODO
 
 LDADD = Widgets/libWidgets.a -L$(top_builddir)/libs -lfvwm $(Xft_LIBS) \
        $(X_LIBS) $(xpm_LIBS) $(Xinerama_LIBS) $(X_PRE_LIBS) -lXext -lX11 \
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/modules/FvwmScroll/Makefile.am 
fvwm-2.5.28/modules/FvwmScroll/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmScroll/Makefile.am     2007-01-28 
16:29:26.000000000 +0100
+++ fvwm-2.5.28/modules/FvwmScroll/Makefile.am  2009-10-20 20:58:46.000000000 
+0200
@@ -5,9 +5,8 @@
 
 module_PROGRAMS = FvwmScroll
 man_MANS = FvwmScroll.1
-EXTRA_DIST = $(man_MANS) ConfigFvwmScroll
 
-config_DATA = \
+dist_config_DATA = \
   ConfigFvwmScroll
 
 FvwmScroll_SOURCES = FvwmScroll.c FvwmScroll.h GrabWindow.c
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/modules/FvwmTaskBar/Makefile.am 
fvwm-2.5.28/modules/FvwmTaskBar/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmTaskBar/Makefile.am    2007-07-15 
14:39:39.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmTaskBar/Makefile.am 2009-10-20 20:58:46.000000000 
+0200
@@ -12,9 +12,9 @@
 FvwmTaskBar_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
 
 man_MANS = FvwmTaskBar.1
-EXTRA_DIST = $(man_MANS) minimail.xbm ConfigFvwmTaskBar
+EXTRA_DIST = minimail.xbm
 
-config_DATA = \
+dist_config_DATA = \
   ConfigFvwmTaskBar
 
 LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm -lm $(xpm_LIBS) $(png_LIBS) \
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/modules/FvwmTheme/Makefile.am 
fvwm-2.5.28/modules/FvwmTheme/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmTheme/Makefile.am      2002-04-22 
10:06:17.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmTheme/Makefile.am   2009-10-20 20:58:46.000000000 
+0200
@@ -3,7 +3,6 @@
 moduledir = @FVWM_MODULEDIR@
 module_PROGRAMS = FvwmTheme
 man_MANS = FvwmTheme.1
-EXTRA_DIST = $(man_MANS)
 
 FvwmTheme_SOURCES = FvwmTheme.c
 FvwmTheme_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
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/modules/FvwmWharf/Makefile.am 
fvwm-2.5.28/modules/FvwmWharf/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmWharf/Makefile.am      2007-07-15 
14:39:39.000000000 +0200
+++ fvwm-2.5.28/modules/FvwmWharf/Makefile.am   2009-10-20 20:58:46.000000000 
+0200
@@ -9,7 +9,7 @@
 FvwmWharf_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
 
 man_MANS = FvwmWharf.1
-EXTRA_DIST = $(man_MANS) sample.style \
+EXTRA_DIST = sample.style \
           ASSound/ASSound.c \
           OffiX/DragAndDrop.h OffiX/DragAndDropTypes.h
 
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/modules/FvwmWinList/Makefile.am 
fvwm-2.5.28/modules/FvwmWinList/Makefile.am
--- fvwm-2.5.28.orig/modules/FvwmWinList/Makefile.am    2007-01-28 
16:29:26.000000000 +0100
+++ fvwm-2.5.28/modules/FvwmWinList/Makefile.am 2009-10-20 20:58:46.000000000 
+0200
@@ -5,9 +5,9 @@
 
 module_PROGRAMS = FvwmWinList
 man_MANS = FvwmWinList.1
-EXTRA_DIST = $(man_MANS) config.sample ConfigFvwmWinList
+EXTRA_DIST = config.sample
 
-config_DATA = \
+dist_config_DATA = \
   ConfigFvwmWinList
 
 FvwmWinList_SOURCES = ButtonArray.c ButtonArray.h \
        Make sure that files in po/ get distributed,
        even when configured with --disable-nls.

        Same for perllib/.

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/Makefile.am fvwm-2.5.28/Makefile.am
--- fvwm-2.5.28.orig/Makefile.am        2007-08-05 13:05:31.000000000 +0200
+++ fvwm-2.5.28/Makefile.am     2009-10-20 21:05:28.000000000 +0200
@@ -19,6 +19,21 @@
        $(POSUB) \
        tests
 
+DIST_SUBDIRS = \
+       libs \
+       fvwm \
+       modules \
+       bin \
+       utils \
+       perllib \
+       doc \
+       docs \
+       rpm \
+       debian \
+       sample.fvwmrc \
+       po \
+       tests
+
 EXTRA_DIST = \
        INSTALL.fvwm \
        vms/README \
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/configure.ac fvwm-2.5.28/configure.ac
--- fvwm-2.5.28.orig/configure.ac       2009-10-20 20:50:58.000000000 +0200
+++ fvwm-2.5.28/configure.ac    2009-10-20 21:05:28.000000000 +0200
@@ -1287,6 +1287,7 @@
 AH_TEMPLATE([HAVE_NLS],
   [Define to 1 if translation of program messages to the user's native
   language is requested.])
+AM_PO_SUBDIRS[]dnl required unconditionally for 'make dist'
 if test ! x"$with_gettext" = xno; then
   AM_GNU_FGETTEXT
   if test x"$USE_NLS" = "xyes"; then
        Make sure 'make dist' in a VPATH build (i.e., "$srcdir" != ".")
        distributes the doc/fvwm/*.xml files.

        Unconditionally define DOC_SECTIONS_XML

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/configure.ac fvwm-2.5.28/configure.ac
--- fvwm-2.5.28.orig/configure.ac       2009-10-20 21:05:28.000000000 +0200
+++ fvwm-2.5.28/configure.ac    2009-10-20 21:13:18.000000000 +0200
@@ -308,7 +308,7 @@
                        p
                        n
                        bfindcmd
-       ' < fvwm/functable.c`
+       ' < $srcdir/fvwm/functable.c`
        DOC_COMMANDS=`echo $DOC_COMMANDS`
        # with .xml suffix
        DOC_COMMANDS_XML=`for i in $DOC_COMMANDS; do echo ${i}.xml; done`
@@ -324,9 +324,9 @@
        DOC_COMMANDS_HTML=`for i in $DOC_COMMANDS; do echo ${i}.html; done`
        DOC_COMMANDS_HTML=`echo $DOC_COMMANDS_HTML`
        # extract module names
-       DOC_MODULES=""
        DOC_MODULES=`
-               for i in modules/*; do echo "$i"; done |
+               for i in $srcdir/modules/*; do echo "$i"; done |
+               sed "s,^$srcdir/,," |
                sed -n '
                        :search
                        /^modules.Fvwm/bfound
@@ -343,13 +343,6 @@
        DOC_MODULES=`echo $DOC_MODULES`
        DOC_MODULES_HTML=`for i in $DOC_MODULES; do echo ${i}.html; done`
        DOC_MODULES_HTML=`echo $DOC_MODULES_HTML`
-       # extract man page section names
-       DOC_SECTIONS=`cat doc/fvwm/sections`
-       DOC_SECTIONS=`echo $DOC_SECTIONS`
-       DOC_SECTIONS_XML=`for i in $DOC_SECTIONS; do echo ${i}.xml; done`
-       DOC_SECTIONS_XML=`echo $DOC_SECTIONS_XML`
-       DOC_SECTIONS_XML_PATH=`for i in $DOC_SECTIONS; do echo ${i}.xml; done`
-       DOC_SECTIONS_XML_PATH=`echo $DOC_SECTIONS_XML`
 else
        DOC_COMMANDS=""
        DOC_COMMANDS_XML=""
@@ -357,10 +350,14 @@
        DOC_COMMANDS_HTML=""
        DOC_MODULES=""
        DOC_MODULES_HTML=""
-       DOC_SECTIONS=""
-       DOC_SECTIONS_XML=""
-       DOC_SECTIONS_XML_PATH=""
 fi
+# extract man page section names
+DOC_SECTIONS=`cat $srcdir/doc/fvwm/sections`
+DOC_SECTIONS=`echo $DOC_SECTIONS`
+DOC_SECTIONS_XML=`for i in $DOC_SECTIONS; do echo ${i}.xml; done`
+DOC_SECTIONS_XML=`echo $DOC_SECTIONS_XML`
+DOC_SECTIONS_XML_PATH=`for i in $DOC_SECTIONS; do echo ${i}.xml; done`
+DOC_SECTIONS_XML_PATH=`echo $DOC_SECTIONS_XML`
 AC_SUBST(DOC_COMMANDS)
 AC_SUBST(DOC_COMMANDS_XML)
 AC_SUBST(DOC_COMMANDS_XML_PATH)
        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
        Don't distribute files generated by configure.

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/docs/Makefile.am 
fvwm-2.5.28/docs/Makefile.am
--- fvwm-2.5.28.orig/docs/Makefile.am   2003-07-06 21:14:06.000000000 +0200
+++ fvwm-2.5.28/docs/Makefile.am        2009-10-20 21:17:01.000000000 +0200
@@ -2,5 +2,4 @@
 ## Process this file with automake to create Makefile.in
 
 EXTRA_DIST = \
-       ANNOUNCE COMMANDS BUGS CONVENTIONS DEVELOPERS FAQ TODO error_codes\
-       fvwm.lsm
+       ANNOUNCE COMMANDS BUGS CONVENTIONS DEVELOPERS FAQ TODO error_codes

Reply via email to