summaryrefslogtreecommitdiff
path: root/src/mods/configure
diff options
context:
space:
mode:
Diffstat (limited to 'src/mods/configure')
-rwxr-xr-xsrc/mods/configure40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/mods/configure b/src/mods/configure
index b90a55a..839380b 100755
--- a/src/mods/configure
+++ b/src/mods/configure
@@ -1,26 +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
+#! /bin/sh
-cxx=`sed -n '/^CXX=/ { s///; p; q; }' ../Makefile`
-cxxflags=`sed -n '/^CXXFLAGS=/ { s///; p; q; }' ../Makefile`
+if ! test -f ../../g++.version
+then
+ echo You need to run ./configure of the top level source dir first
+ exit 1
+fi
+echo Creating module Makefiles...
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 ..
+ if test -d $dir
+ then
+ cd $dir &&
+ srcs="SRCS=`ls *.cpp`" &&
+ echo $srcs > Makefile
+ compiler=`tail -n 1 ../../../g++.version`
+ sed s/COMPILER/$compiler/ Makefile.in >> Makefile &&
+ for i in *.cpp
+ do
+ echo "../../../mods/$dir/`echo $i | sed s/.cpp/.so/`: $i" >> Makefile
+ done
+ cd ..
+ fi
done