summaryrefslogtreecommitdiff
path: root/src/mods/configure
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2010-11-21 16:18:43 +0000
committerPaul Buetow <paul@buetow.org>2010-11-21 16:18:43 +0000
commit7fa0ff180b35e7fef218f0b9113d7e0f3f9b54a8 (patch)
treee45ffca8cf18ac5d00a2928229d8a717a3718669 /src/mods/configure
parentc155ee9e0f133aafff70984f5b09c45efc62ca5a (diff)
parent55b08bd93257d32df76efc4e8e3f49311c39ee82 (diff)
Diffstat (limited to 'src/mods/configure')
-rwxr-xr-xsrc/mods/configure26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mods/configure b/src/mods/configure
new file mode 100755
index 0000000..b90a55a
--- /dev/null
+++ b/src/mods/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+if ! test -f ../Makefile; then
+ if test $1 != "fromtop"; then
+ echo "===> You need to run ./configure of the top level source dir first"
+ exit 1
+ else
+ exit 0
+ fi
+fi
+
+cxx=`sed -n '/^CXX=/ { s///; p; q; }' ../Makefile`
+cxxflags=`sed -n '/^CXXFLAGS=/ { s///; p; q; }' ../Makefile`
+
+for dir in commands html
+do
+ echo "===> Creating $dir module Makefiles"
+ cd $dir
+ sed -n "s/=@CXXFLAGS@/=$cxxflags/; s/=@CXX@/=$cxx/; s/@CATEGORY@/$dir/g; w Makefile" ../Makefile.mods.in
+ for i in *.cpp
+ do
+ echo "../../../mods/$dir/./`echo $i | sed s/.cpp/.so/`: $i" >> Makefile
+ done
+ cd ..
+done
+