3 # Copyright 2000-2004 The Apache Software Foundation
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
18 # The build environment was provided by Sascha Schumann.
29 top_srcdir=`(cd $srcdir; pwd)`
32 if test "$mkdir_p" = "yes"; then
35 mkdir_p="$top_srcdir/build/mkdir.sh"
38 if test "$bsd_makefile" = "yes"; then
39 (cd $top_srcdir; ./build/bsd_makefile)
41 for makefile in $@; do
42 echo "creating $makefile"
43 dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
45 if test -z "$dir"; then
46 real_srcdir=$top_srcdir
47 real_builddir=$top_builddir
51 real_srcdir=$top_srcdir/$dir
52 real_builddir=$top_builddir/$dir
54 cat - $top_srcdir/$makefile.in <<EOF |sed 's/^include \(.*\)/.include "\1"/' >$makefile
55 top_srcdir = $top_srcdir
56 top_builddir = $top_builddir
58 builddir = $real_builddir
65 for makefile in $@; do
66 echo "creating $makefile"
67 dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
69 if test -z "$dir"; then
70 real_srcdir=$top_srcdir
71 real_builddir=$top_builddir
75 real_srcdir=$top_srcdir/$dir
76 real_builddir=$top_builddir/$dir
78 cat - $top_srcdir/$makefile.in <<EOF >$makefile
79 top_srcdir = $top_srcdir
80 top_builddir = $top_builddir
82 builddir = $real_builddir