[nautilus-actions/file-manager-actions] Deprecate gnome-autogen.sh



commit 959780f569a793a2981a9d7a1704f6a0c0477219
Author: Pierre Wieser <pwieser trychlos org>
Date:   Thu Sep 10 15:44:15 2015 +0200

    Deprecate gnome-autogen.sh
    
    See https://wiki.gnome.org/Projects/GnomeCommon/Migration
    - configure.ac: add AX_IS_RELEASE, AX_CODE_COVERAGE macros
    - configure.ac: remove GNOME_COMMON_INIT macro
    - m4/.gitignore: updated accordingly
    - m4/fma-maintainer.m4: replace GNOME_MAINTAINER_MODE_DEFINES with AM_MAINTAINER_MODE
    - maintainer/run-autogen.sh: explicitely run aclocal, autoreconf
    - src/core/Makefile.am,
    - src/io-desktop/Makefile.am,
    - src/io-xml/Makefile.am,
    - src/plugin-menu/Makefile.am
    - src/plugin-tracker/Makefile.am,
    - src/ui/Makefile.am: use coverage rules.

 configure.ac                   |   16 +++++++++-------
 m4/.gitignore                  |    5 +++++
 m4/fma-maintainer.m4           |    2 +-
 maintainer/run-autogen.sh      |   22 +++++++++++++---------
 src/core/Makefile.am           |    5 +++++
 src/io-desktop/Makefile.am     |    5 +++++
 src/io-xml/Makefile.am         |    5 +++++
 src/plugin-menu/Makefile.am    |    5 +++++
 src/plugin-tracker/Makefile.am |    5 +++++
 src/ui/Makefile.am             |    8 ++++++++
 10 files changed, 61 insertions(+), 17 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b32cd1e..7d6e454 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,14 +28,17 @@
 AC_PREREQ([2.53])
 
 AC_INIT([FileManager-Actions],[3.4],[maintainer nautilus-actions org],,[http://www.nautilus-actions.org])
+AX_IS_RELEASE([git-directory])
 
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE
 
+# Code coverage
+AX_CODE_COVERAGE()
+
 AC_CONFIG_SRCDIR([src/ui/main.c])
 AC_CONFIG_HEADERS([src/config.h])
-
 AC_CONFIG_MACRO_DIR([m4])
 
 # check for compiler characteristics and options
@@ -53,8 +56,7 @@ AC_SUBST([AM_CFLAGS],["${AM_CFLAGS} ${WARN_CFLAGS}"])
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 
-# Gnome stuff
-GNOME_COMMON_INIT
+# Maintainer mode
 FMA_MAINTAINER_CHECK_MODE
 
 # libtool
@@ -70,11 +72,11 @@ fi
 source ${0%/*}/fma_required_versions
 
 # localization
-IT_PROG_INTLTOOL([${intltool_required}])
 GETTEXT_PACKAGE=${PACKAGE}
 AC_SUBST([GETTEXT_PACKAGE])
 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["${GETTEXT_PACKAGE}"],[gettext package])
 AM_GLIB_GNU_GETTEXT
+IT_PROG_INTLTOOL([${intltool_required}])
 
 # a counter of fatal warnings emitted
 let fma_fatal_count=0
@@ -105,15 +107,15 @@ FMA_CHECK_MODULE([UUID],    [uuid])
 FMA_CHECK_MODULE([SM],      [sm], [1.0])
 FMA_CHECK_MODULE([ICE],     [ice])
 
-# target a file manager (nautilus, nemo, ...)
-FMA_TARGET_FILE_MANAGER
-
 AC_SUBST([NAUTILUS_ACTIONS_CFLAGS])
 AC_SUBST([NAUTILUS_ACTIONS_LIBS])
 
 # print the debug output be printed to the console
 AC_DEFINE([NAUTILUS_ACTIONS_DEBUG],["NAUTILUS_ACTIONS_DEBUG"],[Debug environment variable])
 
+# target a file manager (nautilus, nemo, ...)
+FMA_TARGET_FILE_MANAGER
+
 # add --with-default-io-provider option
 FMA_SET_DEFAULT_IO_PROVIDER([io-desktop])
 
diff --git a/m4/.gitignore b/m4/.gitignore
index bae0334..7c481b0 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -1,3 +1,6 @@
+ax_code_coverage.m4
+ax_is_release.m4
+glib-gettext.m4
 gnome-doc-utils.m4
 gtk-doc.m4
 intltool.m4
@@ -6,3 +9,5 @@ ltoptions.m4
 ltsugar.m4
 ltversion.m4
 lt~obsolete.m4
+nls.m4
+pkg.m4
diff --git a/m4/fma-maintainer.m4 b/m4/fma-maintainer.m4
index aa23578..54bf29a 100644
--- a/m4/fma-maintainer.m4
+++ b/m4/fma-maintainer.m4
@@ -36,7 +36,7 @@ dnl but gnome-autogen.sh forces its usage and gnome_common_init requires it
 dnl is nonetheless explicitely required by gnome_maintainer_mode_defines macro
 
 AC_DEFUN([FMA_MAINTAINER_CHECK_MODE],[
-       AC_REQUIRE([GNOME_MAINTAINER_MODE_DEFINES])
+       AM_MAINTAINER_MODE
 
        msg_maintainer_mode="disabled"
        AC_MSG_CHECKING([whether to enable maintainer mode])
diff --git a/maintainer/run-autogen.sh b/maintainer/run-autogen.sh
index 50f8bfb..97c4d84 100755
--- a/maintainer/run-autogen.sh
+++ b/maintainer/run-autogen.sh
@@ -53,6 +53,10 @@
 # pwi 2013- 9-26
 # Get rid of 'target' environment variable, as doc generation is a
 # configure option.
+#
+# pwi 2015- 9-10
+# gnome-common is deprecated
+# see: https://wiki.gnome.org/Projects/GnomeCommon/Migration
 
 if [ ! -f configure.ac ]; then
        echo "> This script is only meant to be run from the top source directory." 1>&2
@@ -62,12 +66,13 @@ fi
 maintainer_dir=$(cd ${0%/*}; pwd)
 top_srcdir="${maintainer_dir%/*}"
 
-PKG_NAME="filemanager-actions"
+PkgName=`autoconf --trace 'AC_INIT:$1' configure.ac`
+pkgname=$(echo $PkgName | tr '[[:upper:]]' '[[:lower:]]')
 
 # a filemanager-actions-x.y may remain after an aborted make distcheck
 # such a directory breaks gnome-autogen.sh generation
 # so clean it here
-for d in $(find ${top_srcdir} -maxdepth 2 -type d -name 'filemanager-actions-*'); do
+for d in $(find ${top_srcdir} -maxdepth 2 -type d -name "${pkgname}-\*"); do
        echo "> Removing $d"
        chmod -R u+w $d
        rm -fr $d
@@ -76,17 +81,16 @@ done
 # tools required version
 source ${top_srcdir}/fma_required_versions
 
+echo "> Running aclocal"
+aclocal --install || exit 1
+
 # requires gtk-doc package
 # used for Developer Reference Manual generation (devhelp)
+echo "> Running gtkdocize"
 gtkdocize || exit 1
 
-which gnome-autogen.sh 1>/dev/null 2>&1 || {
-       echo "> You need to install gnome-common package" 1>&2
-       exit 1
-}
-
-echo "> Running gnome-autogen.sh"
-NOCONFIGURE=1 USE_GNOME2_MACROS=1 . gnome-autogen.sh
+echo "> Running autoreconf"
+autoreconf --verbose --force --install -Wno-portability || exit 1
 
 # pwi 2012-10-12
 # starting with FileManager-Actions 3.2.3, we let the GNOME-DOC-PREPARE do
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index 0aa23f2..cc2cb0a 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -48,6 +48,7 @@ AM_CPPFLAGS += \
        -DPKGIMPORTMODEDIR=\"$(importmode_datadir)\"            \
        -DPKGIMPORTERASKDIR=\"$(importerask_datadir)\"          \
        $(NAUTILUS_ACTIONS_CFLAGS)                                                      \
+       $(CODE_COVERAGE_CFLAGS)                                                         \
        $(NULL)
 
 libfma_core_la_SOURCES = \
@@ -133,6 +134,7 @@ libfma_core_la_LDFLAGS = \
        -no-undefined                                                                           \
        -avoid-version                                                                          \
        -fPIC                                                                                           \
+       $(CODE_COVERAGE_LDFLAGS)                                                        \
        $(NULL)
 
 importerask_data_DATA = \
@@ -158,3 +160,6 @@ EXTRA_DIST = \
        $(exportformat_data_DATA)                                                       \
        $(importmode_data_DATA)                                                         \
        $(NULL)
+
+# Code coverage
+ CODE_COVERAGE_RULES@
diff --git a/src/io-desktop/Makefile.am b/src/io-desktop/Makefile.am
index 49afd8c..e935a70 100644
--- a/src/io-desktop/Makefile.am
+++ b/src/io-desktop/Makefile.am
@@ -38,6 +38,7 @@ AM_CPPFLAGS += \
        -DG_LOG_DOMAIN=\"FMA\"                                                          \
        -DPROVIDER_ID=\"$(provider_id)\"                                        \
        -DPROVIDER_DATADIR=\"$(provider_datadir)\"                      \
+       $(CODE_COVERAGE_CFLAGS)                                                         \
        $(NULL)
 
 libfma_io_desktop_la_SOURCES = \
@@ -71,6 +72,7 @@ libfma_io_desktop_la_LDFLAGS = \
        -module                                                                                         \
        -no-undefined                                                                           \
        -avoid-version                                                                          \
+       $(CODE_COVERAGE_LDFLAGS)                                                        \
        $(NULL)
 
 images_files = \
@@ -84,3 +86,6 @@ provider_data_DATA = \
 EXTRA_DIST = \
        $(provider_data_DATA)                                                           \
        $(NULL)
+
+# Code coverage
+ CODE_COVERAGE_RULES@
diff --git a/src/io-xml/Makefile.am b/src/io-xml/Makefile.am
index 0884215..3195ec5 100644
--- a/src/io-xml/Makefile.am
+++ b/src/io-xml/Makefile.am
@@ -38,6 +38,7 @@ AM_CPPFLAGS += \
        -DG_LOG_DOMAIN=\"FMA\"                                                          \
        -DPROVIDER_ID=\"$(provider_id)\"                                        \
        -DPROVIDER_DATADIR=\"$(provider_datadir)\"                      \
+       $(CODE_COVERAGE_CFLAGS)                                                         \
        $(NULL)
 
 libfma_io_xml_la_SOURCES = \
@@ -63,6 +64,7 @@ libfma_io_xml_la_LDFLAGS = \
        -module                                                                                         \
        -no-undefined                                                                           \
        -avoid-version                                                                          \
+       $(CODE_COVERAGE_LDFLAGS)                                                        \
        $(NULL)
 
 images_files = \
@@ -78,3 +80,6 @@ provider_data_DATA = \
 EXTRA_DIST = \
        $(provider_data_DATA)                                                           \
        $(NULL)
+
+# Code coverage
+ CODE_COVERAGE_RULES@
diff --git a/src/plugin-menu/Makefile.am b/src/plugin-menu/Makefile.am
index 65cec50..7e27bef 100644
--- a/src/plugin-menu/Makefile.am
+++ b/src/plugin-menu/Makefile.am
@@ -30,6 +30,7 @@ AM_CPPFLAGS += \
        -I $(top_srcdir)/src                                                            \
        -DG_LOG_DOMAIN=\"FMA\"                                                          \
        $(NAUTILUS_ACTIONS_CFLAGS)                                                      \
+       $(CODE_COVERAGE_CFLAGS)                                                         \
        $(NULL)
 
 lib_sources = \
@@ -47,6 +48,7 @@ lib_ldflags = \
        -module                                                                                         \
        -no-undefined                                                                           \
        -avoid-version                                                                          \
+       $(CODE_COVERAGE_LDFLAGS)                                                        \
        $(NULL)
 
 if HAVE_NAUTILUS
@@ -72,3 +74,6 @@ libfma_nemo_menu_la_CPPFLAGS = $(AM_CPPFLAGS)                         \
        -DFMA_TARGET_LABEL=\"$(NEMO_LABEL)\"                            \
        $(NULL)
 endif
+
+# Code coverage
+ CODE_COVERAGE_RULES@
diff --git a/src/plugin-tracker/Makefile.am b/src/plugin-tracker/Makefile.am
index 6392050..f17ff5a 100644
--- a/src/plugin-tracker/Makefile.am
+++ b/src/plugin-tracker/Makefile.am
@@ -30,6 +30,7 @@ AM_CPPFLAGS += \
        -I $(top_srcdir)/src                                                            \
        -DG_LOG_DOMAIN=\"FMA\"                                                          \
        $(NAUTILUS_ACTIONS_CFLAGS)                                                      \
+       $(CODE_COVERAGE_CFLAGS)                                                         \
        $(NULL)
 
 BUILT_SOURCES =
@@ -70,6 +71,7 @@ libfma_ldflags = \
        -module                                                                                         \
        -no-undefined                                                                           \
        -avoid-version                                                                          \
+       $(CODE_COVERAGE_LDFLAGS)                                                        \
        $(NULL)
 
 if HAVE_NAUTILUS
@@ -105,3 +107,6 @@ EXTRA_DIST = \
 CLEANFILES = \
        $(BUILT_SOURCES)                                                                        \
        $(NULL)
+
+# Code coverage
+ CODE_COVERAGE_RULES@
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index 68b7448..33446c1 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -41,6 +41,7 @@ AM_CPPFLAGS += \
        -DPKGUIDIR=\"$(ui_datadir)\"                                            \
        $(egg_platform_defines)                                                         \
        $(NAUTILUS_ACTIONS_CFLAGS)                                                      \
+       $(CODE_COVERAGE_CFLAGS)                                                         \
        $(NULL)
 
 BUILT_SOURCES = \
@@ -148,6 +149,10 @@ fma_config_tool_LDADD = \
        $(NAUTILUS_ACTIONS_LIBS)                                                        \
        $(NULL)
 
+fma_config_tool_LDFLAGS = \
+       $(CODE_COVERAGE_LDFLAGS)                                                        \
+       $(NULL)
+
 actions_files = \
        fma-ui.actions                                                                          \
        $(NULL)
@@ -198,3 +203,6 @@ EXTRA_DIST = \
        $(applications_in_files)                                                        \
        $(ui_data_DATA)                                                                         \
        $(NULL)
+
+# Code coverage
+ CODE_COVERAGE_RULES@


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