[evolution/gnome-3-8] build: Fix srcdir != builddir from git



commit 847567542f7e63b5924bca625413df384c42acdc
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Apr 18 11:30:24 2013 -0400

    build: Fix srcdir != builddir from git
    
    Mimicing Colin's commit fb9b02e for E-D-S.
    
    We can't do (cd $(srcdir); ...) and inside reference $(top_srcdir)
    because that variable uses a *relative* path.  Thus we copy the
    approach from gnome-shell of explicitly using addprefix to append
    the source directory.
    
    (cherry picked from commit 7dec65de1a2f3c879a53a7a1649b0d8899412a39)

 e-util/Makefile.am          | 8 ++++----
 libemail-engine/Makefile.am | 8 ++++----
 shell/Makefile.am           | 8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index b9710a5..545bc22 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -7,15 +7,15 @@ ruledir = $(privdatadir)
 ENUM_TYPES = e-util-enums.h
 
 e-util-enumtypes.h: $(top_srcdir)/enumtypes.h.template $(ENUM_TYPES)
-       $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.h.template \
+       $(AM_V_GEN) $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.h.template \
                --fhead "#ifndef E_UTIL_ENUMTYPES_H\n#define E_UTIL_ENUMTYPES_H\n" \
                --ftail "#endif /* E_UTIL_ENUMTYPES_H */\n" \
-               $(ENUM_TYPES)) > $@
+               $(addprefix $(srcdir)/,$(ENUM_TYPES)) > $@
 
 e-util-enumtypes.c: $(top_srcdir)/enumtypes.c.template $(ENUM_TYPES)
-       $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.c.template \
+       $(AM_V_GEN) $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.c.template \
                --fhead "#include \"e-util-enumtypes.h\"" \
-               $(ENUM_TYPES)) > $@
+               $(addprefix $(srcdir)/,$(ENUM_TYPES)) > $@
 
 e-marshal.h: e-marshal.list
        $(AM_V_GEN) $(GLIB_GENMARSHAL) --header --prefix=e_marshal $^ > e-marshal.h.tmp && \
diff --git a/libemail-engine/Makefile.am b/libemail-engine/Makefile.am
index d8f8207..649d298 100644
--- a/libemail-engine/Makefile.am
+++ b/libemail-engine/Makefile.am
@@ -5,15 +5,15 @@ privsolib_LTLIBRARIES = libemail-engine.la
 ENUM_TYPES = e-mail-enums.h
 
 e-mail-enumtypes.h: $(top_srcdir)/enumtypes.h.template $(ENUM_TYPES)
-       $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.h.template \
+       $(AM_V_GEN) $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.h.template \
                --fhead "#ifndef E_MAIL_ENUMTYPES_H\n#define E_MAIL_ENUMTYPES_H\n" \
                --ftail "#endif /* E_MAIL_ENUMTYPES_H */\n" \
-               $(ENUM_TYPES)) > $@
+               $(addprefix $(srcdir)/,$(ENUM_TYPES)) > $@
 
 e-mail-enumtypes.c: $(top_srcdir)/enumtypes.c.template $(ENUM_TYPES)
-       $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.c.template \
+       $(AM_V_GEN) $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.c.template \
                --fhead "#include \"e-mail-enumtypes.h\"" \
-               $(ENUM_TYPES)) > $@
+               $(addprefix $(srcdir)/,$(ENUM_TYPES)) > $@
 
 ENUM_GENERATED = e-mail-enumtypes.h e-mail-enumtypes.c
 
diff --git a/shell/Makefile.am b/shell/Makefile.am
index ddf31aa..9bc7375 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -9,15 +9,15 @@ eshellincludedir = $(privincludedir)/shell
 ENUM_TYPES = e-shell.h
 
 e-shell-enumtypes.h: $(top_srcdir)/enumtypes.h.template $(ENUM_TYPES)
-       $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.h.template \
+       $(AM_V_GEN) $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.h.template \
                --fhead "#ifndef E_SHELL_ENUMTYPES_H\n#define E_SHELL_ENUMTYPES_H\n" \
                --ftail "#endif /* E_SHELL_ENUMTYPES_H */\n" \
-               $(ENUM_TYPES)) > $@
+               $(addprefix $(srcdir)/,$(ENUM_TYPES)) > $@
 
 e-shell-enumtypes.c: $(top_srcdir)/enumtypes.c.template $(ENUM_TYPES)
-       $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.c.template \
+       $(AM_V_GEN) $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.c.template \
                --fhead "#include \"e-shell-enumtypes.h\"" \
-               $(ENUM_TYPES)) > $@
+               $(addprefix $(srcdir)/,$(ENUM_TYPES)) > $@
 
 ENUM_GENERATED = e-shell-enumtypes.h e-shell-enumtypes.c
 


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