Skip to content

Commit f48e639

Browse files
committed
Migrate away from gnome-common deprecated vars and macros
gnome-common is deprecating some vars and macros, listed here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=829932 This change follows the gnome recommendations from: https://wiki.gnome.org/Projects/GnomeCommon/Migration
1 parent 447c297 commit f48e639

File tree

9 files changed

+50
-61
lines changed

9 files changed

+50
-61
lines changed

Makefile.am

-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ DISTCLEANFILES = \
3838

3939
DISTCHECK_CONFIGURE_FLAGS = --disable-update-mimedb --enable-gtk-doc
4040

41-
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
42-
4341
distclean-local:
4442
if test "$(srcdir)" = "."; then :; else \
4543
rm -f ChangeLog; \

autogen.sh

+34-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,40 @@
11
#!/bin/sh
2+
# Run this to generate all the initial makefiles, etc.
3+
test -n "$srcdir" || srcdir=$(dirname "$0")
4+
test -n "$srcdir" || srcdir=.
25

3-
srcdir=`dirname $0`
4-
test -z "$srcdir" && srcdir=.
6+
olddir=$(pwd)
57

6-
PKG_NAME="nemo"
8+
cd $srcdir
79

8-
which gnome-autogen.sh || {
9-
echo "You need to install gnome-common from GNOME Git (or from"
10-
echo "your OS vendor's package manager)."
10+
(test -f configure.ac) || {
11+
echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
1112
exit 1
1213
}
13-
USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
14+
15+
# shellcheck disable=SC2016
16+
PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
17+
18+
if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
19+
echo "*** WARNING: I am going to run 'configure' with no arguments." >&2
20+
echo "*** If you wish to pass any to it, please specify them on the" >&2
21+
echo "*** '$0' command line." >&2
22+
echo "" >&2
23+
fi
24+
25+
aclocal --install || exit 1
26+
glib-gettextize --force --copy || exit 1
27+
gtkdocize --copy || exit 1
28+
intltoolize --force --copy --automake || exit 1
29+
autoreconf --verbose --force --install || exit 1
30+
31+
cd "$olddir"
32+
if [ "$NOCONFIGURE" = "" ]; then
33+
$srcdir/configure "$@" || exit 1
34+
35+
if [ "$1" = "--help" ]; then exit 0 else
36+
echo "Now type 'make' to compile $PKG_NAME" || exit 1
37+
fi
38+
else
39+
echo "Skipping configure process."
40+
fi

configure.ac

+3-44
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ dnl ===========================================================================
2525
AC_CONFIG_SRCDIR(src)
2626
AC_CONFIG_HEADERS(config.h)
2727
AC_CONFIG_MACRO_DIR([m4])
28+
AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \${ACLOCAL_FLAGS}"])
29+
AX_IS_RELEASE([git-directory])
2830

2931
AM_INIT_AUTOMAKE([foreign 1.11 dist-xz no-dist-gzip tar-ustar])
3032
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -170,50 +172,7 @@ AM_CONDITIONAL(ENABLE_EMPTY_VIEW, test "x$ENABLE_EMPTY_VIEW" = "x1")
170172

171173
dnl ==========================================================================
172174

173-
dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
174-
175-
WARNING_CFLAGS=""
176-
177-
AC_ARG_ENABLE(more-warnings,
178-
AC_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]),
179-
set_more_warnings="$enableval",[
180-
if test -f $srcdir/.git; then
181-
set_more_warnings=yes
182-
else
183-
set_more_warnings=no
184-
fi
185-
])
186-
AC_MSG_CHECKING(for more warnings, including -Werror)
187-
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
188-
AC_MSG_RESULT(yes)
189-
WARNING_CFLAGS="\
190-
-Wall \
191-
-Wmissing-declarations -Wmissing-prototypes \
192-
-Wnested-externs -Wpointer-arith \
193-
-Wcast-align \
194-
-Werror"
195-
196-
for option in -Wstrict-aliasing=0 -Wno-pointer-sign; do
197-
SAVE_CFLAGS="$CFLAGS"
198-
CFLAGS="$CFLAGS $option"
199-
AC_MSG_CHECKING([whether gcc understands $option])
200-
AC_TRY_COMPILE([], [],
201-
has_option=yes,
202-
has_option=no,)
203-
if test $has_option = yes; then
204-
WARNING_CFLAGS="$WARNING_CFLAGS $option"
205-
fi
206-
AC_MSG_RESULT($has_option)
207-
CFLAGS="$SAVE_CFLAGS"
208-
unset has_option
209-
unset SAVE_CFLAGS
210-
done
211-
unset option
212-
else
213-
AC_MSG_RESULT(no)
214-
fi
215-
216-
AC_SUBST(WARNING_CFLAGS)
175+
AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS])
217176

218177
dnl ===========================================================================
219178
dnl Check for Tracker

cut-n-paste-code/libegg/Makefile.am

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ NULL=
22

33
noinst_LTLIBRARIES = libegg.la
44

5-
AM_CPPFLAGS = $(BASE_CFLAGS)
5+
AM_CPPFLAGS = $(WARN_CFLAGS) $(BASE_CFLAGS)
66

77
EGG_TREE_DND_FILES = \
88
eggtreemultidnd.c \
@@ -15,7 +15,7 @@ libegg_la_SOURCES = \
1515

1616
libegg_la_CFLAGS = \
1717
$(BASE_CFLAGS) \
18-
$(WARNING_CFLAGS) \
18+
$(WARN_CFLAGS) \
1919
$(DISABLE_DEPRECATED)
2020

2121
libegg_la_LIBADD = \

eel/Makefile.am

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ AM_CPPFLAGS = \
88
-I$(top_builddir) \
99
$(BASE_CFLAGS) \
1010
$(COMMON_CFLAGS) \
11-
$(WARNING_CFLAGS) \
11+
$(WARN_CFLAGS) \
1212
$(DISABLE_DEPRECATED_CFLAGS) \
1313
-DDATADIR=\""$(datadir)"\" \
1414
-DSOURCE_DATADIR=\""$(top_srcdir)/data"\" \
1515
$(NULL)
1616

1717
libeel_2_la_LDFLAGS = \
18+
$(WARN_LDFLAGS) \
1819
-no-undefined \
1920
$(NULL)
2021

@@ -68,7 +69,7 @@ noinst_PROGRAMS = check-program
6869
check_program_SOURCES = check-program.c
6970
check_program_DEPENDENCIES = libeel-2.la
7071
check_program_LDADD = $(EEL_LIBS)
71-
check_program_LDFLAGS = $(check_program_DEPENDENCIES) -lm
72+
check_program_LDFLAGS = $(WARN_LDFLAGS) $(check_program_DEPENDENCIES) -lm
7273

7374
TESTS = check-eel
7475

libnemo-extension/Makefile.am

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ AM_CPPFLAGS =\
88
-I$(top_srcdir) \
99
-I$(top_builddir) \
1010
$(BASE_CFLAGS) \
11-
$(WARNING_CFLAGS) \
11+
$(WARN_CFLAGS) \
1212
$(DISABLE_DEPRECATED_CFLAGS) \
1313
-DLIBEXECDIR=\""$(libexecdir)"\" \
1414
-DDATADIR=\""$(datadir)"\" \
1515
$(NULL)
1616

1717
libnemo_extension_la_LDFLAGS=\
18+
$(WARN_LDFLAGS) \
1819
-version-info @NEMO_EXTENSION_VERSION_INFO@ \
1920
-no-undefined \
2021
$(NULL)
@@ -77,11 +78,13 @@ introspection_files = \
7778
Nemo-3.0.gir: libnemo-extension.la Makefile
7879
Nemo_3_0_gir_INCLUDES = Gtk-3.0 Gio-2.0 GLib-2.0
7980
Nemo_3_0_gir_CFLAGS = \
81+
$(WARN_CFLAGS) \
8082
-I$(top_srcdir) \
8183
-I$(top_builddir) \
8284
$(BASE_CFLAGS)
8385
Nemo_3_0_gir_LIBS = libnemo-extension.la
8486
Nemo_3_0_gir_FILES = $(addprefix $(srcdir)/, $(introspection_files))
87+
Nemo_3_0_gir_SCANNERFLAGS = $(AM_SCANNERFLAGS) $(WARN_SCANNERFLAGS)
8588
INTROSPECTION_GIRS += Nemo-3.0.gir
8689

8790
girdir = @INTROSPECTION_GIRDIR@

libnemo-private/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ AM_CPPFLAGS = \
99
$(BASE_CFLAGS) \
1010
$(COMMON_CFLAGS) \
1111
$(NEMO_CFLAGS) \
12-
$(WARNING_CFLAGS) \
12+
$(WARN_CFLAGS) \
1313
$(DISABLE_DEPRECATED_CFLAGS) \
1414
$(TRACKER_CFLAGS) \
1515
-DDATADIR=\""$(datadir)"\" \
@@ -43,6 +43,7 @@ dependency_static_libs = \
4343
$(NULL)
4444

4545
libnemo_private_la_LDFLAGS = \
46+
$(WARN_LDFLAGS) \
4647
-no-undefined \
4748
$(NULL)
4849

src/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ AM_CPPFLAGS = \
1919
$(BASE_CFLAGS) \
2020
$(COMMON_CFLAGS) \
2121
$(NEMO_CFLAGS) \
22-
$(WARNING_CFLAGS) \
22+
$(WARN_CFLAGS) \
2323
$(EXIF_CFLAGS) \
2424
$(EXEMPI_CFLAGS) \
2525
-DDATADIR=\""$(datadir)"\" \

test/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ AM_CPPFLAGS =\
55
$(BASE_CFLAGS) \
66
$(COMMON_CFLAGS) \
77
$(NEMO_CFLAGS) \
8-
$(WARNING_CFLAGS) \
8+
$(WARN_CFLAGS) \
99
-DVERSION="\"$(VERSION)\"" \
1010
-DNEMO_DATADIR=\""$(datadir)/nemo"\" \
1111
$(NULL)

0 commit comments

Comments
 (0)