[PATCH 4/4] libsemanage -- Allow to build for several ruby version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

This allow to build the ruby module for both ruby 1.8 and 1.9.1 (the
way it's done for the python module)

Laurent

Description: Allow to build for several ruby version
Author: Laurent Bigonville <bigon@xxxxxxxxxx>
Date: Wed, 07 Mar 2012 13:41:39 +0100

--- a/libsemanage/src/Makefile
+++ b/libsemanage/src/Makefile
@@ -3,6 +3,8 @@
 # targets with "PYPREFIX":
 PYTHON ?= python
 PYPREFIX ?= $(notdir $(PYTHON))
+RUBY ?= ruby
+RUBYPREFIX ?= $(notdir $(RUBY))
 
 # Installation directories.
 PREFIX ?= $(DESTDIR)/usr
@@ -13,8 +15,8 @@
 PYINC ?= $(shell pkg-config --cflags $(PYPREFIX))
 PYTHONLIBDIR ?= $(shell pkg-config --libs $(PYPREFIX))
 PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER)
-RUBYLIBVER ?= $(shell ruby -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
-RUBYPLATFORM ?= $(shell ruby -e 'print RUBY_PLATFORM')
+RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
+RUBYPLATFORM ?= $(shell $(RUBY) -e 'print RUBY_PLATFORM')
 RUBYINC ?= $(LIBDIR)/ruby/$(RUBYLIBVER)/$(RUBYPLATFORM)
 RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM)
 LIBBASE=$(shell basename $(LIBDIR))
@@ -42,10 +44,10 @@
 SWIGCOUT= semanageswig_wrap.c
 SWIGRUBYCOUT= semanageswig_ruby_wrap.c
 SWIGLOBJ:= $(patsubst %.c,$(PYPREFIX)%.lo,$(SWIGCOUT))
-SWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT)) 
+SWIGRUBYLOBJ:= $(patsubst %.c,$(RUBYPREFIX)%.lo,$(SWIGRUBYCOUT)) 
 SWIGSO=$(PYPREFIX)_semanage.so
 SWIGFILES=$(SWIGSO) semanage.py 
-SWIGRUBYSO=_rubysemanage.so
+SWIGRUBYSO=$(RUBYPREFIX)_rubysemanage.so
 LIBSO=$(TARGET).$(LIBVERSION)
 
 GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) semanageswig_python_exception.i

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux