diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:41 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:41 +0200 |
| commit | ae4e87df37ed8904de92c7cf2f3a11128cda2a21 (patch) | |
| tree | 5333f2930165cc6e4083ce15154799626ddb3d03 /src/mods/configure | |
| parent | 9cd3ccffd5372dfde3af478e3f832f18db4be3f1 (diff) | |
tagging ychat-0.7.4.1ychat-0.7.4.1
Diffstat (limited to 'src/mods/configure')
| -rwxr-xr-x | src/mods/configure | 40 |
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 |
