Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
macosx: ruby: Use correct dllib extension instead of assuming '.so'.
  • Loading branch information
shulima authored and rwmjones committed Feb 6, 2015
1 parent f630677 commit eaae0b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions ruby/Makefile.am
Expand Up @@ -21,6 +21,8 @@ generator_built = \
ext/guestfs/_guestfs.c \
bindtests.rb

DLEXT := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['DLEXT']")

EXTRA_DIST = \
$(generator_built) \
Rakefile.in \
Expand All @@ -38,7 +40,7 @@ CLEANFILES = \
ext/guestfs/*~ \
ext/guestfs/extconf.h \
ext/guestfs/_guestfs.o \
ext/guestfs/_guestfs.so \
ext/guestfs/_guestfs.$(DLEXT) \
ext/guestfs/mkmf.log \
ext/guestfs/Makefile

Expand All @@ -59,7 +61,7 @@ install:
$(MKDIR_P) $(DESTDIR)$(RUBY_LIBDIR)
$(MKDIR_P) $(DESTDIR)$(RUBY_ARCHDIR)
$(INSTALL) -p -m 0644 $(srcdir)/lib/guestfs.rb $(DESTDIR)$(RUBY_LIBDIR)
$(INSTALL) -p -m 0755 ext/guestfs/_guestfs.so $(DESTDIR)$(RUBY_ARCHDIR)
$(INSTALL) -p -m 0755 ext/guestfs/_guestfs.$(DLEXT) $(DESTDIR)$(RUBY_ARCHDIR)

TESTS = run-bindtests run-ruby-tests

Expand Down
4 changes: 3 additions & 1 deletion ruby/Rakefile.in
Expand Up @@ -40,9 +40,11 @@ end
PKG_NAME='@PACKAGE_NAME@'
PKG_VERSION='@PACKAGE_VERSION@'

DLEXT=RbConfig::CONFIG['DLEXT']

EXT_CONF='@abs_builddir@/ext/guestfs/extconf.rb'
MAKEFILE='@builddir@/ext/guestfs/Makefile'
GUESTFS_MODULE='@builddir@/ext/guestfs/_guestfs.so'
GUESTFS_MODULE="@builddir@/ext/guestfs/_guestfs.#{DLEXT}"
GUESTFS_SRC='@srcdir@/ext/guestfs/_guestfs.c'

CLEAN.include [ "@builddir@/ext/**/*.o", GUESTFS_MODULE,
Expand Down

0 comments on commit eaae0b6

Please sign in to comment.