#!/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