build: Enable subdir-objects

Like we did in the master branch.

Using subdir-objects removes the forward compatibility warnings coming
from autotools.
This commit is contained in:
Emmanuele Bassi 2017-04-30 16:06:29 +01:00
parent d237b255f9
commit dc471fa258
2 changed files with 36 additions and 18 deletions

View File

@ -81,7 +81,7 @@ AC_SUBST(INTROSPECTION_REQUIRED_VERSION)
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
AM_INIT_AUTOMAKE([1.11 -Wall no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
AM_INIT_AUTOMAKE([1.11 -Wall subdir-objects no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
AM_MAINTAINER_MODE([enable])
# Support silent build rules. Disable

View File

@ -24,6 +24,10 @@ LDADD = \
$(top_builddir)/gdk/libgdk-3.la \
$(GTK_DEP_LIBS)
BUILT_SOURCES =
CLEANFILES =
noinst_PROGRAMS = $(TEST_PROGS)
TESTS_ENVIRONMENT = \
@ -115,19 +119,26 @@ rbtree_CFLAGS = -DGTK_COMPILATION -UG_ENABLE_DEBUG
rbtree_LDADD = $(GTK_DEP_LIBS)
rbtree_SOURCES = \
rbtree.c \
$(top_srcdir)/gtk/gtkrbtree.h \
$(top_srcdir)/gtk/gtkrbtree.c \
gtkrbtree.c \
$(NULL)
gtkrbtree.c: $(top_srcdir)/gtk/gtkrbtree.c
$(AM_V_GEN) $(LN_S) $^ $@
CLEANFILES += gtkrbtree.c
bitmask_CFLAGS = -DGTK_COMPILATION -UG_ENABLE_DEBUG
bitmask_LDADD = $(GTK_DEP_LIBS)
bitmask_SOURCES = \
bitmask.c \
$(top_srcdir)/gtk/gtkbitmaskprivate.h \
$(top_srcdir)/gtk/gtkallocatedbitmaskprivate.h \
$(top_srcdir)/gtk/gtkallocatedbitmask.c \
bitmask_SOURCES = \
bitmask.c \
gtkallocatedbitmask.c \
$(NULL)
gtkallocatedbitmask.c: $(top_srcdir)/gtk/gtkallocatedbitmask.c
$(AM_V_GEN) $(LN_S) $^ $@
CLEANFILES += gtkallocatedbitmask.c
keyhash_CFLAGS = \
-DGTK_COMPILATION \
-DGTK_LIBDIR=\"$(libdir)\" \
@ -136,16 +147,23 @@ keyhash_CFLAGS = \
-DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
$(NULL)
keyhash_SOURCES = \
keyhash.c \
$(top_srcdir)/gtk/gtkkeyhash.c \
$(top_srcdir)/gtk/gtkkeyhash.h \
$(top_builddir)/gtk/gtkresources.c \
$(top_builddir)/gtk/gtkresources.h \
$(top_srcdir)/gtk/gtkprivate.c \
$(top_srcdir)/gtk/gtkprivate.h \
keyhash_SOURCES = \
keyhash.c \
gtkkeyhash.c \
gtkresources.c \
gtkprivate.c \
$(NULL)
gtkkeyhash.c: $(top_srcdir)/gtk/gtkkeyhash.c
$(AM_V_GEN) $(LN_S) $^ $@
gtkresources.c: $(top_builddir)/gtk/gtkresources.c
$(AM_V_GEN) $(LN_S) $^ $@
gtkprivate.c: $(top_srcdir)/gtk/gtkprivate.c
$(AM_V_GEN) $(LN_S) $^ $@
CLEANFILES += gtkkeyhash.c gtkresources.c gtkprivate.c
test_icontheme = \
icons/index.theme \
@ -254,9 +272,9 @@ GTK_GSETTINGS_SCHEMAS = \
$(top_srcdir)/gtk/org.gtk.Settings.FileChooser.gschema.xml \
$(NULL)
BUILT_SOURCES = gschemas.compiled
BUILT_SOURCES += gschemas.compiled
CLEANFILES = gschemas.compiled
CLEANFILES += gschemas.compiled
gschemas.compiled: $(GTK_GSETTINGS_SCHEMAS)
$(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) \