diff options
Diffstat (limited to 'build/fastgen.sh')
-rwxr-xr-x | build/fastgen.sh | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/build/fastgen.sh b/build/fastgen.sh index 40ab4e149f..9261e1a9a6 100755 --- a/build/fastgen.sh +++ b/build/fastgen.sh @@ -23,29 +23,37 @@ # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ############################################################################## -# $Id: fastgen.sh,v 1.2 2000-01-01 20:48:42 sas Exp $ +# $Id: fastgen.sh,v 1.3 2000-04-30 03:10:34 sas Exp $ # srcdir=$1 shift -topsrcdir=`(cd $srcdir; pwd)` - mkdir_p=$1 shift +top_srcdir=`(cd $srcdir; pwd)` +top_builddir=`pwd` + if test "$mkdir_p" = "yes"; then mkdir_p="mkdir -p" else - mkdir_p="$topsrcdir/build/shtool mkdir -f -p" + mkdir_p="$top_srcdir/helpers/mkdir.sh" fi -for i in $@ ; do - echo "creating $i" - dir=`dirname $i` - $mkdir_p $dir - sed \ - -e s#@topsrcdir@#$topsrcdir# \ - -e s#@srcdir@#$topsrcdir/$dir# \ - < $topsrcdir/$i.in > $i +for makefile in $@; do + echo "creating $makefile" +# portable dirname + dir=`echo $makefile|sed 's%[^/][^/]*$%%'` + test -d "$dir/" || $mkdir_p "$dir/" + + (cat <<EOF +top_srcdir = $top_srcdir +top_builddir = $top_builddir +srcdir = $top_srcdir/$dir +builddir = $top_builddir/$dir +VPATH = $top_srcdir/$dir +EOF +)| cat - $top_srcdir/$makefile.in > $makefile + done |