summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpython/config/s2py.py (renamed from python/config/slice2py.py)0
-rw-r--r--python/python/Makefile2
-rw-r--r--python/python/Makefile.mak2
-rwxr-xr-xpython/scripts/slice2py.py18
-rw-r--r--python/test/Slice/import/Makefile2
-rw-r--r--python/test/Slice/import/Makefile.mak2
-rwxr-xr-xruby/config/s2rb.rb (renamed from ruby/config/slice2rb.rb)0
-rw-r--r--ruby/ruby/Makefile2
-rwxr-xr-xruby/scripts/slice2rb17
9 files changed, 40 insertions, 5 deletions
diff --git a/python/config/slice2py.py b/python/config/s2py.py
index 64d73120ace..64d73120ace 100755
--- a/python/config/slice2py.py
+++ b/python/config/s2py.py
diff --git a/python/python/Makefile b/python/python/Makefile
index 2ab5e3b897c..a415521d4f0 100644
--- a/python/python/Makefile
+++ b/python/python/Makefile
@@ -101,7 +101,7 @@ PACKAGES = IceBox IceGrid IcePatch2 IceStorm IceMX
all:: $(ALL_SRCS)
-SLICE2PY = ../config/slice2py.py
+SLICE2PY = $(top_srcdir)/config/s2py.py
SLICE2PYFLAGS += --ice
Ice_%_ice.py: $(slicedir)/Ice/%.ice $(SLICE2PY) $(SLICEPARSERLIB)
diff --git a/python/python/Makefile.mak b/python/python/Makefile.mak
index 8f6562d65af..13e4df20f60 100644
--- a/python/python/Makefile.mak
+++ b/python/python/Makefile.mak
@@ -122,7 +122,7 @@ ALL_SRCS = $(ICE_SRCS) \
PACKAGES = IceBox IceGrid IcePatch2 IceStorm IceMX
-SLICE2PY = $(PYTHON_HOME)\python $(top_srcdir)\config\slice2py.py
+SLICE2PY = $(PYTHON_HOME)\python $(top_srcdir)\config\s2py.py
SLICE2PYFLAGS = $(SLICE2PYFLAGS) --ice
all:: $(ALL_SRCS)
diff --git a/python/scripts/slice2py.py b/python/scripts/slice2py.py
new file mode 100755
index 00000000000..7f2aca37164
--- /dev/null
+++ b/python/scripts/slice2py.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import sys, Ice, IcePy
+def main():
+ sliceDir = Ice.getSliceDir()
+ # Automatically add the slice dir.
+ if not sliceDir is None:
+ sys.argv.append('-I' + sliceDir)
+ val = IcePy.compile(sys.argv)
+ sys.exit(int(val))
diff --git a/python/test/Slice/import/Makefile b/python/test/Slice/import/Makefile
index 3e5464309dd..69b5a2015b3 100644
--- a/python/test/Slice/import/Makefile
+++ b/python/test/Slice/import/Makefile
@@ -20,7 +20,7 @@ include $(top_srcdir)/config/Make.rules
SRCS = Test1_ice.py \
Test2_ice.py
-SLICE2PY = ../../../config/slice2py.py
+SLICE2PY = $(top_srcdir)/config/s2py.py
all:: $(SRCS)
Test1_ice.py: Test1.ice $(SLICE2PY) $(SLICEPARSERLIB)
diff --git a/python/test/Slice/import/Makefile.mak b/python/test/Slice/import/Makefile.mak
index a017b57afea..a9c5fad1b74 100644
--- a/python/test/Slice/import/Makefile.mak
+++ b/python/test/Slice/import/Makefile.mak
@@ -15,7 +15,7 @@ SRCS = Test1_ice.py \
Test2_ice.py
!if "$(ice_src_dist)" != ""
-SLICE2PY = $(PYTHON_HOME)\python $(top_srcdir)\config\slice2py.py
+SLICE2PY = $(PYTHON_HOME)\python $(top_srcdir)\config\s2py.py
!endif
all:: $(SRCS)
diff --git a/ruby/config/slice2rb.rb b/ruby/config/s2rb.rb
index 2744db07692..2744db07692 100755
--- a/ruby/config/slice2rb.rb
+++ b/ruby/config/s2rb.rb
diff --git a/ruby/ruby/Makefile b/ruby/ruby/Makefile
index f04307cd04a..deebfa22b08 100644
--- a/ruby/ruby/Makefile
+++ b/ruby/ruby/Makefile
@@ -115,7 +115,7 @@ MODULES = Glacier2 Ice IceBox IceGrid IcePatch2 IceStorm
all:: $(ALL_SRCS)
-SLICE2RB = ../config/slice2rb.rb
+SLICE2RB = $(top_srcdir)/config/s2rb.rb
SLICE2RBFLAGS += --ice
Ice/%.rb: $(slicedir)/Ice/%.ice $(SLICE2RB) $(SLICEPARSERLIB)
diff --git a/ruby/scripts/slice2rb b/ruby/scripts/slice2rb
new file mode 100755
index 00000000000..c56fc02575f
--- /dev/null
+++ b/ruby/scripts/slice2rb
@@ -0,0 +1,17 @@
+#!/usr/bin/env ruby
+# **********************************************************************
+#
+# Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+require 'Ice'
+sliceDir = Ice.getSliceDir()
+if sliceDir != nil
+ ARGV << "-I" + sliceDir
+end
+rc = Ice::compile(ARGV)
+exit(rc)