[metacity] build: fix builddir != srcdir



commit 320bb7f2f2b9143f871d2ee6061519a955b21ef6
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Jun 3 03:55:08 2016 +0300

    build: fix builddir != srcdir

 Makefile.am             |    2 +-
 autogen.sh              |    5 +++++
 libmetacity/Makefile.am |    6 +++---
 3 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index ccbad70..d0eb33e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@ MAINTAINERCLEANFILES = \
        $(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
        $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
        $(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL) \
-       `find "m4" -type f -name "*.m4" -print` \
+       `find "$(srcdir)/m4" -type f -name "*.m4" -print` \
        $(srcdir)/ABOUT-NLS \
        $(srcdir)/INSTALL \
        $(srcdir)/build-aux/config.rpath \
diff --git a/autogen.sh b/autogen.sh
index 4e9c78d..16a82c9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -11,6 +11,9 @@ if [ ! -f $srcdir/configure.ac ]; then
   exit 1
 fi
 
+olddir=$(pwd)
+cd "$srcdir"
+
 PKG_NAME=$(autoconf --trace 'AC_INIT:$1' "$srcdir/configure.ac")
 
 if [ "$#" = 0 ] && [ -z "$NOCONFIGURE" ]; then
@@ -24,6 +27,8 @@ aclocal --install || exit 1
 autoreconf --verbose --force --install -Wno-portability || exit 1
 { set +x; } 2>/dev/null
 
+cd "$olddir"
+
 if [ -z "$NOCONFIGURE" ]; then
   set -x
   $srcdir/configure "$@" || exit 1
diff --git a/libmetacity/Makefile.am b/libmetacity/Makefile.am
index 8d4c1d0..d247753 100644
--- a/libmetacity/Makefile.am
+++ b/libmetacity/Makefile.am
@@ -82,15 +82,15 @@ libmetacity_include_HEADERS = \
        $(NULL)
 
 ENUM_TYPES = \
-       meta-theme.h \
+       $(srcdir)/meta-theme.h \
        $(NULL)
 
 meta-enum-types.c: meta-enum-types.c.in meta-enum-types.h $(ENUM_TYPES)
-       $(AM_V_GEN) $(GLIB_MKENUMS) --template meta-enum-types.c.in $(ENUM_TYPES) > meta-enum-types.c.tmp \
+       $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/meta-enum-types.c.in $(ENUM_TYPES) > \
                meta-enum-types.c.tmp && mv meta-enum-types.c.tmp meta-enum-types.c
 
 meta-enum-types.h: meta-enum-types.h.in $(ENUM_TYPES)
-       $(AM_V_GEN) $(GLIB_MKENUMS) --template meta-enum-types.h.in $(ENUM_TYPES) > meta-enum-types.h.tmp \
+       $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/meta-enum-types.h.in $(ENUM_TYPES) > \
                meta-enum-types.h.tmp && mv meta-enum-types.h.tmp meta-enum-types.h
 
 BUILT_SOURCES = \


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