#!/bin/sh oname=`echo $1 | sed -e s/hh.in$/py.hh/g` cname=`echo $1 | sed -e s/.hh.in$//g` base=`echo $cname | sed -e s%[a-z]*/%%g` ns=`echo $cname | sed -e s%/[a-zA-Z]*%%g` if test "$ns" = "neoports"; then ns="ports::" else ns="" fi . ./gendefs fqcn="neo::cca::$ns$base$shared" # echo "$1 $oname $fqcn" CTORPY="public: $base($fqcn b){ impl = b; } private: $fqcn impl; public:" # sed -e "s/@CTORPY@/$CTORPY/g" | \ echo "// $CTORPY"> $oname.tmp echo "namespace py {" >> $oname.tmp cat $1 | \ sed -e 's/@VIRTPY@//g' | \ sed -e 's/@NSPY@/py::/g' | \ sed -e "s/@IGPY@/PY_/g" | \ sed -e "s/@NAMESPACE_NEEDS_ENDSEMI@/$NAMESPACE_NEEDS_ENDSEMI/g" | \ sed -e "s/@NEOCCA_VERSION@/$NEOCCA_VERSION/g" | \ sed -e "s/@NEOCCA_VERSION_MAJOR@/$NEOCCA_MAJOR_VERSION/g" | \ sed -e "s/@NEOCCA_VERSION_MINOR@/$NEOCCA_MINOR_VERSION/g" | \ sed -e "s/@NEOCCA_VERSION_PATCH@/$NEOCCA_PATCH_LEVEL/g" >> $oname.tmp echo "} $NAMESPACE_NEEDS_ENDSEMI // end namespace py" >> $oname.tmp # call the tcl stage ../src/ctor $oname.tmp $oname /bin/rm $oname.tmp