|
Packit |
90a5c9 |
#! /bin/sh
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
Packit |
90a5c9 |
# contributor license agreements. See the NOTICE file distributed with
|
|
Packit |
90a5c9 |
# this work for additional information regarding copyright ownership.
|
|
Packit |
90a5c9 |
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
Packit |
90a5c9 |
# (the "License"); you may not use this file except in compliance with
|
|
Packit |
90a5c9 |
# the License. You may obtain a copy of the License at
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# Unless required by applicable law or agreed to in writing, software
|
|
Packit |
90a5c9 |
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
Packit |
90a5c9 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
Packit |
90a5c9 |
# See the License for the specific language governing permissions and
|
|
Packit |
90a5c9 |
# limitations under the License.
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# The build environment was provided by Sascha Schumann.
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
srcdir=$1
|
|
Packit |
90a5c9 |
shift
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
mkdir_p=$1
|
|
Packit |
90a5c9 |
shift
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
bsd_makefile=$1
|
|
Packit |
90a5c9 |
shift
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
top_srcdir=`(cd $srcdir; pwd)`
|
|
Packit |
90a5c9 |
top_builddir=`pwd`
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
if test "$mkdir_p" = "yes"; then
|
|
Packit |
90a5c9 |
mkdir_p="mkdir -p"
|
|
Packit |
90a5c9 |
else
|
|
Packit |
90a5c9 |
mkdir_p="$top_srcdir/build/mkdir.sh"
|
|
Packit |
90a5c9 |
fi
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
if test "$bsd_makefile" = "yes"; then
|
|
Packit |
90a5c9 |
(cd $top_srcdir; ./build/bsd_makefile)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
for makefile in $@; do
|
|
Packit |
90a5c9 |
echo "creating $makefile"
|
|
Packit |
90a5c9 |
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
if test -z "$dir"; then
|
|
Packit |
90a5c9 |
real_srcdir=$top_srcdir
|
|
Packit |
90a5c9 |
real_builddir=$top_builddir
|
|
Packit |
90a5c9 |
dir="."
|
|
Packit |
90a5c9 |
else
|
|
Packit |
90a5c9 |
$mkdir_p "$dir/"
|
|
Packit |
90a5c9 |
real_srcdir=$top_srcdir/$dir
|
|
Packit |
90a5c9 |
real_builddir=$top_builddir/$dir
|
|
Packit |
90a5c9 |
fi
|
|
Packit |
90a5c9 |
cat - $top_srcdir/$makefile.in <<EOF |sed 's/^include \(.*\)/.include "\1"/' >$makefile
|
|
Packit |
90a5c9 |
top_srcdir = $top_srcdir
|
|
Packit |
90a5c9 |
top_builddir = $top_builddir
|
|
Packit |
90a5c9 |
srcdir = $real_srcdir
|
|
Packit |
90a5c9 |
builddir = $real_builddir
|
|
Packit |
90a5c9 |
VPATH = $real_srcdir
|
|
Packit |
90a5c9 |
EOF
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
touch $dir/.deps
|
|
Packit |
90a5c9 |
done
|
|
Packit |
90a5c9 |
else
|
|
Packit |
90a5c9 |
for makefile in $@; do
|
|
Packit |
90a5c9 |
echo "creating $makefile"
|
|
Packit |
90a5c9 |
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
if test -z "$dir"; then
|
|
Packit |
90a5c9 |
real_srcdir=$top_srcdir
|
|
Packit |
90a5c9 |
real_builddir=$top_builddir
|
|
Packit |
90a5c9 |
dir="."
|
|
Packit |
90a5c9 |
else
|
|
Packit |
90a5c9 |
$mkdir_p "$dir/"
|
|
Packit |
90a5c9 |
real_srcdir=$top_srcdir/$dir
|
|
Packit |
90a5c9 |
real_builddir=$top_builddir/$dir
|
|
Packit |
90a5c9 |
fi
|
|
Packit |
90a5c9 |
cat - $top_srcdir/$makefile.in <<EOF >$makefile
|
|
Packit |
90a5c9 |
top_srcdir = $top_srcdir
|
|
Packit |
90a5c9 |
top_builddir = $top_builddir
|
|
Packit |
90a5c9 |
srcdir = $real_srcdir
|
|
Packit |
90a5c9 |
builddir = $real_builddir
|
|
Packit |
90a5c9 |
VPATH = $real_srcdir
|
|
Packit |
90a5c9 |
EOF
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
touch $dir/.deps
|
|
Packit |
90a5c9 |
done
|
|
Packit |
90a5c9 |
fi
|