From e1b1d44814fded4b2c363b52bc905704feeb65be Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Tue, 23 Feb 2010 19:13:29 -0800 Subject: [PATCH] made 'make install' install ruby module, too --- Makefile.common.in | 1 + Makefile.in | 2 ++ configure | 8 ++++++-- configure.in | 4 ++-- lib/ruby/Makefile.in | 6 ++++++ m4/ruby.m4 | 5 ++++- 6 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Makefile.common.in b/Makefile.common.in index 1f0ad79..b176ba4 100644 --- a/Makefile.common.in +++ b/Makefile.common.in @@ -30,6 +30,7 @@ PYTHON_INCLUDES=@PYTHON_INCLUDES@ RUBY_CPPFLAGS=@RUBY_CPPFLAGS@ RUBY_LDFLAGS=@RUBY_LDFLAGS@ RUBY_LIBS=@RUBY_LIBS@ +RUBY_INSTALLDIR=@RUBY_INSTALLDIR@ # libtool stuff OBJEXT=@OBJEXT@ diff --git a/Makefile.in b/Makefile.in index e242a0f..9c0fe46 100644 --- a/Makefile.in +++ b/Makefile.in @@ -14,6 +14,8 @@ all install uninstall clean: cd lib;$(MAKE) $@ @echo making $@ in lib/python... cd lib/python;$(MAKE) $@ + @echo making $@ in lib/ruby... + cd lib/ruby;$(MAKE) $@ @echo making $@ in src... cd src;$(MAKE) $@ @echo making $@ in avi2swf... diff --git a/configure b/configure index cdafce4..7e03d9c 100755 --- a/configure +++ b/configure @@ -644,6 +644,7 @@ PDF2PDF DEVICE_PDF LIBPDF PDF2SWF +RUBY_INSTALLDIR RUBY_LDFLAGS RUBY_CPPFLAGS RUBY_LIBS @@ -10193,6 +10194,7 @@ $as_echo "$rubylib" >&6; } RUBY_CPPFLAGS="$rubycpp -I$rubyinc $RUBY_CPPFLAGS" RUBY_LDFLAGS="$rubyld $RUBY_LDFLAGS" + RUBY_INSTALLDIR="$rubyinc" else { $as_echo "$as_me:$LINENO: result: 'unknown'" >&5 $as_echo "'unknown'" >&6; } @@ -10392,12 +10394,14 @@ $as_echo "yes" >&6; } + else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } RUBY_CPPFLAGS="" RUBY_LDFLAGS="" RUBY_LIBS="" + RUBY_INSTALLDIR="" fi @@ -10406,7 +10410,7 @@ if test "x$RUBY_OK" '!=' "xyes";then # fail silently- the most users won't have any need for the # ruby interface anyway else - rubygfx="lib/python/Makefile" + rubygfx="lib/ruby/Makefile" fi # ------------------------------------------------------------------ @@ -10558,7 +10562,7 @@ fi if test -f "release.in"; then release_in="./release"; fi if test -f "Makefile.new.in"; then mk_in="./Makefile.new"; fi -FILES="$release_in $mk_in Makefile.common ${avi2swf} Makefile lib/Makefile lib/action/Makefile src/Makefile ${pdf2swf_makefile} swfs/Makefile ${pythongfx} ${lame_makefile} lib/readers/Makefile" +FILES="$release_in $mk_in Makefile.common ${avi2swf} Makefile lib/Makefile lib/action/Makefile src/Makefile ${pdf2swf_makefile} swfs/Makefile ${pythongfx} ${rubygfx} ${lame_makefile} lib/readers/Makefile" ac_config_files="$ac_config_files ${FILES}" cat >confcache <<\_ACEOF diff --git a/configure.in b/configure.in index 165d7e1..7fda6b9 100644 --- a/configure.in +++ b/configure.in @@ -394,7 +394,7 @@ if test "x$RUBY_OK" '!=' "xyes";then # fail silently- the most users won't have any need for the # ruby interface anyway else - rubygfx="lib/python/Makefile" + rubygfx="lib/ruby/Makefile" fi # ------------------------------------------------------------------ @@ -583,7 +583,7 @@ AH_BOTTOM([ if test -f "release.in"; then release_in="./release"; fi if test -f "Makefile.new.in"; then mk_in="./Makefile.new"; fi -FILES="$release_in $mk_in Makefile.common ${avi2swf} Makefile lib/Makefile lib/action/Makefile src/Makefile ${pdf2swf_makefile} swfs/Makefile ${pythongfx} ${lame_makefile} lib/readers/Makefile" +FILES="$release_in $mk_in Makefile.common ${avi2swf} Makefile lib/Makefile lib/action/Makefile src/Makefile ${pdf2swf_makefile} swfs/Makefile ${pythongfx} ${rubygfx} ${lame_makefile} lib/readers/Makefile" AC_OUTPUT(${FILES}) dnl new autoconf diff --git a/lib/ruby/Makefile.in b/lib/ruby/Makefile.in index bac1a5a..e946201 100644 --- a/lib/ruby/Makefile.in +++ b/lib/ruby/Makefile.in @@ -15,6 +15,12 @@ gfx.$(SLEXT): gfx.$(O) $(GFX_DEPS) Makefile clean: rm -f *.o *.$(O) *.$(SLEXT) *.so +INSTALL_LIB = echo installing $$file to $(RUBY_INSTALLDIR);$(INSTALL_PROGRAM) $$file $(RUBY_INSTALLDIR) +UNINSTALL_LIB = rm -f $(RUBY_INSTALLDIR)/$$file install: + @file=gfx.$(SLEXT); if test -f $$file;then $(INSTALL_LIB);fi + +uninstall: + @file=gfx.$(SLEXT); $(UNINSTALL_LIB) .PHONY: all diff --git a/m4/ruby.m4 b/m4/ruby.m4 index f64d6e6..cbb7320 100644 --- a/m4/ruby.m4 +++ b/m4/ruby.m4 @@ -27,9 +27,10 @@ if test "x$RUBY" '!=' "x";then AC_MSG_CHECKING([for ruby library name]) rubylib=`$RUBY -e 'require "rbconfig";puts Config::expand(Config::CONFIG.send("\x5b\x5d", "RUBY_SO_NAME"))' 2>/dev/null` AC_MSG_RESULT($rubylib) - + RUBY_CPPFLAGS="$rubycpp -I$rubyinc $RUBY_CPPFLAGS" RUBY_LDFLAGS="$rubyld $RUBY_LDFLAGS" + RUBY_INSTALLDIR="$rubyinc" else AC_MSG_RESULT('unknown') fi @@ -80,10 +81,12 @@ if test "x${RUBY_OK}" '=' "xyes"; then AC_SUBST(RUBY_LIBS) AC_SUBST(RUBY_CPPFLAGS) AC_SUBST(RUBY_LDFLAGS) + AC_SUBST(RUBY_INSTALLDIR) else AC_MSG_RESULT([no]) RUBY_CPPFLAGS="" RUBY_LDFLAGS="" RUBY_LIBS="" + RUBY_INSTALLDIR="" fi ]) -- 1.7.10.4