]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
vici: Support ruby gem out-of-tree builds
authorMartin Willi <martin@revosec.ch>
Fri, 27 Feb 2015 10:40:50 +0000 (11:40 +0100)
committerMartin Willi <martin@revosec.ch>
Fri, 27 Feb 2015 10:44:20 +0000 (11:44 +0100)
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.

src/libcharon/plugins/vici/ruby/Makefile.am

index ce38e1c3d4f429d2301dca06b909a3ec0d8c52fd..c10705dc69b549003b79cf689d2f3c30b5665a36 100644 (file)
@@ -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