[glib] build: fix a srcdir != builddir problem with gnetworking.h



commit 455afd3545a29393aec66f5d87dde7920db9d87b
Author: Dan Winship <danw gnome org>
Date:   Mon Jan 21 11:25:26 2013 -0500

    build: fix a srcdir != builddir problem with gnetworking.h
    
    gio's glib-mkenums call needs to get gnetworking.h out of $(builddir),
    not $(srcdir). Fix/simplify it by using $(filter) on $^ and letting
    make find everything.
    
    Also add -Wno-portability to AM_INIT_AUTOMAKE in configure.ac, so that
    it doesn't warn about this (or about the gmake-specific features we
    were already using in gio/tests/)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691866

 configure.ac    |    2 +-
 gio/Makefile.am |    6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index aea8ba5..2d001da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,7 +63,7 @@ AC_CONFIG_MACRO_DIR([m4macros])
 # Save this value here, since automake will set cflags later
 cflags_set=${CFLAGS+set}
 
-AM_INIT_AUTOMAKE([1.11 no-define no-dist-gzip dist-xz tar-ustar])
+AM_INIT_AUTOMAKE([1.11 -Wno-portability no-define no-dist-gzip dist-xz tar-ustar])
 AM_MAINTAINER_MODE([enable])
 
 # Support silent build rules. Disable
diff --git a/gio/Makefile.am b/gio/Makefile.am
index cee9beb..136f9ef 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -653,13 +653,11 @@ DISTCLEANFILES = 		\
 all-local: gio-public-headers.txt
 
 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
-	$(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
-	  cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
+	$(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
 	    gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
 
 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
-	$(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
-	  cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
+	$(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
 	    gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
 
 gio-2.0.lib: libgio-2.0.la gio.def



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