removed some of the debug logging and added author details
[httpd-crcsyncproxy.git] / build / fastgen.sh
blob87bce15e9fcca4f736ee04cddd1e732b85cb973c
1 #! /bin/sh
3 # Licensed to the Apache Software Foundation (ASF) under one or more
4 # contributor license agreements. See the NOTICE file distributed with
5 # this work for additional information regarding copyright ownership.
6 # The ASF licenses this file to You under the Apache License, Version 2.0
7 # (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
19 # The build environment was provided by Sascha Schumann.
21 srcdir=$1
22 shift
24 mkdir_p=$1
25 shift
27 bsd_makefile=$1
28 shift
30 top_srcdir=`(cd $srcdir; pwd)`
31 top_builddir=`pwd`
33 if test "$mkdir_p" = "yes"; then
34 mkdir_p="mkdir -p"
35 else
36 mkdir_p="$top_srcdir/build/mkdir.sh"
39 if test "$bsd_makefile" = "yes"; then
40 (cd $top_srcdir; ./build/bsd_makefile)
42 for makefile in $@; do
43 echo "creating $makefile"
44 dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
46 if test -z "$dir"; then
47 real_srcdir=$top_srcdir
48 real_builddir=$top_builddir
49 dir="."
50 else
51 $mkdir_p "$dir/"
52 real_srcdir=$top_srcdir/$dir
53 real_builddir=$top_builddir/$dir
55 cat - $top_srcdir/$makefile.in <<EOF |sed 's/^include \(.*\)/.include "\1"/' >$makefile
56 top_srcdir = $top_srcdir
57 top_builddir = $top_builddir
58 srcdir = $real_srcdir
59 builddir = $real_builddir
60 VPATH = $real_srcdir
61 EOF
63 touch $dir/.deps
64 done
65 else
66 for makefile in $@; do
67 echo "creating $makefile"
68 dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
70 if test -z "$dir"; then
71 real_srcdir=$top_srcdir
72 real_builddir=$top_builddir
73 dir="."
74 else
75 $mkdir_p "$dir/"
76 real_srcdir=$top_srcdir/$dir
77 real_builddir=$top_builddir/$dir
79 cat - $top_srcdir/$makefile.in <<EOF >$makefile
80 top_srcdir = $top_srcdir
81 top_builddir = $top_builddir
82 srcdir = $real_srcdir
83 builddir = $real_builddir
84 VPATH = $real_srcdir
85 EOF
87 touch $dir/.deps
88 done