From: Martin Willi Date: Fri, 27 Feb 2015 10:40:50 +0000 (+0100) Subject: vici: Support ruby gem out-of-tree builds X-Git-Tag: 5.3.0dr1~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1151c9922aed27b2e8ecc18630941a56b2dab44e;p=thirdparty%2Fstrongswan.git vici: Support ruby gem out-of-tree builds Referencing $(srcdir) in the gemspec is not really an option, as "gem build" includes the full path in the gem, so we need to build in $(srcdir). As there does not seem to be a way to control the output of "gem build", we manually move the gem to $(builddir) in OOT builds. --- diff --git a/src/libcharon/plugins/vici/ruby/Makefile.am b/src/libcharon/plugins/vici/ruby/Makefile.am index ce38e1c3d4..c10705dc69 100644 --- a/src/libcharon/plugins/vici/ruby/Makefile.am +++ b/src/libcharon/plugins/vici/ruby/Makefile.am @@ -6,7 +6,9 @@ vici.gemspec: $(srcdir)/vici.gemspec.in $(srcdir)/vici.gemspec.in > $@ vici-$(PACKAGE_VERSION).gem: vici.gemspec - $(GEM) build vici.gemspec + (cd $(srcdir); $(GEM) build $(abs_builddir)/vici.gemspec) + [ "$(srcdir)" = "$(builddir)" ] || \ + mv $(srcdir)/vici-$(PACKAGE_VERSION).gem $(builddir) all-local: vici-$(PACKAGE_VERSION).gem