Commit 6a62820f authored by Andres G. Aragoneses's avatar Andres G. Aragoneses

build: fix out-of-tree builds (when srcdir != builddir)

parent 4941180e
......@@ -53,6 +53,8 @@ test -z "$srcdir" && srcdir=.
error "Directory \"$srcdir\" does not look like the top-level $PROJECT directory"
}
builddir=`pwd`
cd "$srcdir"
# in case there are binaries from a previous compilation
make distclean 2>/dev/null
......@@ -94,6 +96,7 @@ if [ $# = 0 ]; then
echo "WARNING: I am going to run configure without any arguments."
fi
cd "$builddir"
{ cat <<EOF
#!/usr/bin/env bash
......@@ -102,4 +105,4 @@ EOF
} > reautogen.sh
chmod +x reautogen.sh
run ./configure $@
run "$srcdir/configure" $@
SOURCES_BUILD = $(addprefix $(srcdir)/, $(SOURCES))
SOURCES_BUILD += $(top_srcdir)/src/AssemblyInfo.cs
SOURCES_BUILD += $(top_builddir)/src/AssemblyInfo.cs
RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES))
RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \
......
......@@ -12,9 +12,9 @@ dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
# Generate a fake source file containing strings for
# translation that are found in our .addin.xml files
ADDIN_XML_FILES = $(shell find $(top_srcdir)/src -name \*.addin.xml | grep -v /obj/)
addin-xml-strings.cs: $(ADDIN_XML_FILES) $(top_srcdir)/build/addin-xml-string-extractor.exe
addin-xml-strings.cs: $(ADDIN_XML_FILES) $(top_builddir)/build/addin-xml-string-extractor.exe
@echo " GEN $@"
$(MONO) $(top_srcdir)/build/addin-xml-string-extractor.exe $(ADDIN_XML_FILES) > $@
$(MONO) $(top_builddir)/build/addin-xml-string-extractor.exe $(ADDIN_XML_FILES) > $@
@INTLTOOL_XML_RULE@
appdatadir = $(datadir)/appdata
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment