From: Justin Erenkrantz Date: Thu, 18 Apr 2002 18:44:03 +0000 (+0000) Subject: Simplify last commit by only calling cat once (this should hopefully resolve X-Git-Tag: 2.0.36~153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f46ab55e551f737a0753b457a6a30e4e703926a;p=thirdparty%2Fapache%2Fhttpd.git Simplify last commit by only calling cat once (this should hopefully resolve rbb's concern about maintainability and still address mine about annoying /s). Don't call mkdir when we are the top-level directory. We *have* to have been created before hand. Also add this fix to the bsd_makefile section. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94703 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/build/fastgen.sh b/build/fastgen.sh index 1df631022e6..092a5e7eb73 100755 --- a/build/fastgen.sh +++ b/build/fastgen.sh @@ -79,42 +79,48 @@ if test "$bsd_makefile" = "yes"; then for makefile in $@; do echo "creating $makefile" dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'` - $mkdir_p "$dir/" + if test -z "$dir"; then + real_srcdir=$top_srcdir + real_builddir=$top_builddir + dir="." + else + $mkdir_p "$dir/" + real_srcdir=$top_srcdir/$dir + real_builddir=$top_builddir/$dir + fi cat - $top_srcdir/$makefile.in <$makefile top_srcdir = $top_srcdir top_builddir = $top_builddir -srcdir = $top_srcdir/$dir -builddir = $top_builddir/$dir -VPATH = $top_srcdir/$dir +srcdir = $real_srcdir +builddir = $real_builddir +VPATH = $real_srcdir EOF - test -z "$dir" && dir="." touch $dir/.deps done else for makefile in $@; do echo "creating $makefile" dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'` - $mkdir_p "$dir/" + if test -z "$dir"; then - cat - $top_srcdir/$makefile.in <$makefile -top_srcdir = $top_srcdir -top_builddir = $top_builddir -srcdir = $top_srcdir -builddir = $top_builddir -VPATH = $top_srcdir -EOF + real_srcdir=$top_srcdir + real_builddir=$top_builddir dir="." else - cat - $top_srcdir/$makefile.in <$makefile + $mkdir_p "$dir/" + real_srcdir=$top_srcdir/$dir + real_builddir=$top_builddir/$dir + fi + cat - $top_srcdir/$makefile.in <$makefile top_srcdir = $top_srcdir top_builddir = $top_builddir -srcdir = $top_srcdir/$dir -builddir = $top_builddir/$dir -VPATH = $top_srcdir/$dir +srcdir = $real_srcdir +builddir = $real_builddir +VPATH = $real_srcdir EOF - fi + touch $dir/.deps done fi