home · contact · privacy
Server/py: Integrate libplomrogue building into current main building.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 8 Mar 2015 15:57:25 +0000 (16:57 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 8 Mar 2015 15:57:25 +0000 (16:57 +0100)
compile-server.sh [new file with mode: 0755]
compile.sh [deleted file]
plomrogue-server.py
redo

diff --git a/compile-server.sh b/compile-server.sh
new file mode 100755 (executable)
index 0000000..88b11b4
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+gcc -shared -fPIC -std=c11 -pedantic-errors -Wall -Werror -Wextra -Wformat-security -g -o libplomrogue.so libplomrogue.c
diff --git a/compile.sh b/compile.sh
deleted file mode 100755 (executable)
index 88b11b4..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-gcc -shared -fPIC -std=c11 -pedantic-errors -Wall -Werror -Wextra -Wformat-security -g -o libplomrogue.so libplomrogue.c
index 5af05f7949e2ca18c16bcb3359d0f73d67fc6e10..56c0044f15603a35b695c74ea7e80f78c379be55 100755 (executable)
@@ -26,7 +26,8 @@ def prep_library():
     """Prepare ctypes library at ./libplomrogue.so"""
     libpath = ("./libplomrogue.so")
     if not os.access(libpath, os.F_OK):
-        raise SystemExit("No library " + libpath + ", run ./compile.sh first?")
+        raise SystemExit("No library " + libpath +
+                         ", run ./compile-server.sh first?")
     libpr = ctypes.cdll.LoadLibrary(libpath)
     libpr.seed_rrand.argtypes = [ctypes.c_uint8, ctypes.c_uint32]
     libpr.seed_rrand.restype = ctypes.c_uint32
diff --git a/redo b/redo
index 4081117268dee04d1df9a08acd01f043d71bf0fd..da2637beff1876add1a2f33e998f7ff95968cb7f 100755 (executable)
--- a/redo
+++ b/redo
 # <https://github.com/plomlompom/plomrogue/issues/2#issuecomment-50972436> for a
 # workaround.
 
+if [ ! -e ./libplomrogue.so ]
+then
+  echo "non-redo stuff (preparing for future Python port sans redo needs):"
+  echo "Building library for server's Python variant with mere shell one-liner."
+  ./compile-server.sh
+fi
+
 export PATH=$PATH:$PWD/build/redo_scripts
 redo "$@"