#!/bin/sh # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * This source file is part of libspmt. * # * * # * See the file "LICENSE" for the copyright information and for * # * the terms and conditions for copying, distribution and * # * modification of this source file. * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # $Date$ if test `uname -s` == Darwin; then SED=gsed # bsd sed doesn't support \U else SED=sed fi # create module from boilerplate template files. __template__ is necessary to avoid C++ conflicts cat tests/template.c | $SED -e "s/TEMPLATE/\U$1/g" | $SED -e "s/__template__/$1/g" | $SED -e "s/template/$1/g" > tests/$1.c svn add tests/$1.c cat src/template.c | $SED -e "s/TEMPLATE/\U$1/g" | $SED -e "s/__template__/$1/g" | $SED -e "s/template/$1/g" > src/$1.c svn add src/$1.c cat src/template.h | $SED -e "s/TEMPLATE/\U$1/g" | $SED -e "s/__template__/$1/g" | $SED -e "s/template/$1/g" > src/$1.h svn add src/$1.h # integrate the module into the src build system cd src echo $1.c > modules.list ./modules.process cd .. # integrate the module into the tests build system cd tests touch $1.mk echo $1.c > modules.list ./modules.process svn add $1.mk cd .. # add the module to the list of ignored binaries in tests cd tests svn propget svn:ignore . > ignore.old echo $1 | cat - ignore.old | sed '/^$/ d' | sort | uniq > ignore.new svn propset svn:ignore --file ignore.new . rm ignore.old rm ignore.new cd ..