[gnome-dictionary] Fix build with srcdir != builddir



commit eaacf80e9b135d5c7085f899e2bea0076557bc53
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Wed Jan 2 01:06:28 2013 +0100

    Fix build with srcdir != builddir
    
    - $(srcdir) is relative to $(builddir), so you must not cd before using it.
    - src/ needs to reference libgdict include paths, or it cannot find
      gdict-enum-types.h, which is not in the same directory as gdict.h
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690973

 libgdict/Makefile.am |   16 ++++++----------
 src/Makefile.am      |    2 ++
 2 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/libgdict/Makefile.am b/libgdict/Makefile.am
index 5a22784..43656e4 100644
--- a/libgdict/Makefile.am
+++ b/libgdict/Makefile.am
@@ -107,7 +107,7 @@ stamp-gdict-marshal.h: gdict-marshal.list $(GLIB_GENMARSHAL) Makefile
 	$(AM_V_GEN)$(GLIB_GENMARSHAL) $< --header --prefix=gdict_marshal > xgen-gmh \
 	&& ( cmp -s xgen-gmh gdict-marshal.h || cp xgen-gmh gdict-marshal.h ) \
 	&& rm -f xgen-gmh \
-	&& echo timestamp > $(@F)
+	&& echo timestamp > $@
 
 gdict-marshal.c: gdict-marshal.list $(GLIB_GENMARSHAL) Makefile
 	$(AM_V_GEN)( echo "#include \"gdict-marshal.h\""; echo; \
@@ -118,19 +118,15 @@ gdict-marshal.c: gdict-marshal.list $(GLIB_GENMARSHAL) Makefile
 gdict-enum-types.h: stamp-gdict-enum-types.h
 	@true
 stamp-gdict-enum-types.h: $(sources_h) gdict-enum-types.h.in Makefile
-	$(AM_V_GEN)( cd $(srcdir) && \
-	  $(GLIB_MKENUMS) \
-	  	--template $(srcdir)/gdict-enum-types.h.in \
-	  $(sources_h) ) > xgen-ceth \
+	$(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gdict-enum-types.h.in \
+	  $(sources_h) > xgen-ceth \
 	&& ( cmp -s xgen-ceth gdict-enum-types.h || cp xgen-ceth gdict-enum-types.h ) \
 	&& rm -f xgen-ceth \
-	&& echo timestamp > $(@F)
+	&& echo timestamp > $@
 
 gdict-enum-types.c: gdict-enum-types.h gdict-enum-types.c.in Makefile
-	$(AM_V_GEN)( cd $(srcdir) && \
-	  $(GLIB_MKENUMS) \
-	  	--template $(srcdir)/gdict-enum-types.c.in \
-	  $(sources_h) ) > xgen-cetc \
+	$(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gdict-enum-types.c.in \
+	  $(sources_h) > xgen-cetc \
 	&& cp xgen-cetc gdict-enum-types.c \
 	&& rm -f xgen-cetc
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 18cdda0..1a68c96 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -35,6 +35,8 @@ gnome_dictionary_SOURCES = \
 gnome_dictionary_CFLAGS = \
 	-I$(top_builddir)	\
 	-I$(top_srcdir)		\
+	-I$(top_srcdir)/libgdict	\
+	-I$(top_builddir)/libgdict 	\
 	$(GDICT_CFLAGS)		\
 	$(NULL)
 



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