mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
fix out of tree build
In addition to use ${srcdir} and deliver ${NOTMUCH_SRCDIR} where needed, source from ruby bindings had to be copied to the out-of-tree target directory -- if the source files in source directory were referenced in build and there were also built object files there, those could have been considered as target files (and then not found when attempting to create bindings/ruby/notmuch.so).
This commit is contained in:
parent
18914c725b
commit
35cdebdad0
3 changed files with 10 additions and 3 deletions
|
@ -8,6 +8,7 @@ ifeq ($(HAVE_RUBY_DEV),1)
|
|||
cd $(dir)/ruby && \
|
||||
EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \
|
||||
LIBNOTMUCH="../../lib/$(LINKER_NAME)" \
|
||||
NOTMUCH_SRCDIR='$(NOTMUCH_SRCDIR)' \
|
||||
ruby extconf.rb --vendor
|
||||
$(MAKE) -C $(dir)/ruby
|
||||
endif
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
require 'mkmf'
|
||||
|
||||
dir = File.join('..', '..', 'lib')
|
||||
dir = File.join(ENV['NOTMUCH_SRCDIR'], 'lib')
|
||||
|
||||
# includes
|
||||
$INCFLAGS = "-I#{dir} #{$INCFLAGS}"
|
||||
|
|
10
configure
vendored
10
configure
vendored
|
@ -47,6 +47,12 @@ if [ "$srcdir" != "." ]; then
|
|||
# Emacs only likes to generate compiled files next to the .el files
|
||||
# by default so copy these as well (which is not ideal).
|
||||
cp -a "$srcdir"/emacs/*.el emacs
|
||||
|
||||
# We were not able to create fully working Makefile using ruby mkmf.rb
|
||||
# so ruby bindings source files are copied as well (ditto -- not ideal).
|
||||
mkdir bindings/ruby
|
||||
cp -a "$srcdir"/bindings/ruby/*.[ch] bindings/ruby
|
||||
cp -a "$srcdir"/bindings/ruby/extconf.rb bindings/ruby
|
||||
fi
|
||||
|
||||
# Set several defaults (optionally specified by the user in
|
||||
|
@ -357,8 +363,8 @@ int main(void) {
|
|||
return 0;
|
||||
}
|
||||
EOF
|
||||
if ${CC} ${CFLAGS} _libversion.c -o _libversion > /dev/null 2>&1 && \
|
||||
./_libversion > _libversion.sh && . ./_libversion.sh
|
||||
if ${CC} ${CFLAGS} -I"$srcdir" _libversion.c -o _libversion > /dev/null 2>&1 \
|
||||
&& ./_libversion > _libversion.sh && . ./_libversion.sh
|
||||
then
|
||||
printf "OK.\n"
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue