summaryrefslogtreecommitdiff
path: root/build/fastgen.sh
diff options
context:
space:
mode:
authorJustin Erenkrantz <jerenkrantz@apache.org>2002-04-18 18:44:03 +0000
committerJustin Erenkrantz <jerenkrantz@apache.org>2002-04-18 18:44:03 +0000
commit5f46ab55e551f737a0753b457a6a30e4e703926a (patch)
treef5c5ab1725f4eb71293ce7d3f761d3aad130c1ea /build/fastgen.sh
parent920e7befe4a73469c9e1d193869e08298506218b (diff)
downloadhttpd-5f46ab55e551f737a0753b457a6a30e4e703926a.tar.gz
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
Diffstat (limited to 'build/fastgen.sh')
-rwxr-xr-xbuild/fastgen.sh42
1 files changed, 24 insertions, 18 deletions
diff --git a/build/fastgen.sh b/build/fastgen.sh
index 1df631022e..092a5e7eb7 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 <<EOF |sed 's/^include \(.*\)/.include "\1"/' >$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 <<EOF >$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 <<EOF >$makefile
+ $mkdir_p "$dir/"
+ real_srcdir=$top_srcdir/$dir
+ real_builddir=$top_builddir/$dir
+ fi
+ cat - $top_srcdir/$makefile.in <<EOF >$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