#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
$(generator_built) \
Rakefile.in \
+ README.rdoc \
+ doc/site/index.html \
ext/guestfs/extconf.rb \
lib/guestfs.rb \
run-bindtests \
TESTS_ENVIRONMENT = \
LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
- LIBGUESTFS_PATH=$(top_builddir)/appliance
+ LIBGUESTFS_PATH=$(top_builddir)/appliance \
+ TMPDIR=$(top_builddir) \
+ RUBY=$(RUBY)
all: $(generator_built)
- rake build
+ $(RAKE) build
+ $(RAKE) rdoc
+
+RUBY_SITELIB := $(shell $(RUBY) -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
+RUBY_SITEARCH := $(shell $(RUBY) -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
+
+install:
+ $(MKDIR_P) $(DESTDIR)$(RUBY_SITELIB)
+ $(MKDIR_P) $(DESTDIR)$(RUBY_SITEARCH)
+ $(INSTALL) -p -m 0644 $(srcdir)/lib/guestfs.rb $(DESTDIR)$(RUBY_SITELIB)
+ $(INSTALL) -p -m 0755 $(builddir)/ext/guestfs/_guestfs.so $(DESTDIR)$(RUBY_SITEARCH)
endif