home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Magazine / HomeAutomation / Apache / lib / php / build / fastgen.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2000-07-11  |  2.0 KB  |  59 lines

  1. #! /bin/sh
  2. #
  3. # Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
  4. #
  5. # Redistribution and use in source and binary forms, with or without
  6. # modification, are permitted provided that the following conditions
  7. # are met:
  8. # 1. Redistributions of source code must retain the above copyright
  9. #    notice, this list of conditions and the following disclaimer.
  10. # 2. Redistributions in binary form must reproduce the above copyright
  11. #    notice, this list of conditions and the following disclaimer in the
  12. #    documentation and/or other materials provided with the distribution.
  13. # THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
  14. # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  15. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
  16. # EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  17. # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  19. # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  20. # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  21. # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  22. # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  23. #
  24. ##############################################################################
  25. # $Id: fastgen.sh,v 1.7 2000/06/11 10:33:39 sas Exp $ 
  26. #
  27.  
  28. srcdir=$1
  29. shift
  30.  
  31. mkdir_p=$1
  32. shift
  33.  
  34. top_srcdir=`(cd $srcdir; pwd)`
  35. top_builddir=`pwd`
  36.  
  37. if test "$mkdir_p" = "yes"; then
  38.   mkdir_p="mkdir -p"
  39. else
  40.   mkdir_p="$top_srcdir/helpers/mkdir.sh"
  41. fi
  42.  
  43. for makefile in $@; do
  44.   echo "creating $makefile"
  45.   dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
  46.   $mkdir_p "$dir/"
  47.  
  48.   cat - $top_srcdir/$makefile.in <<EOF >$makefile
  49. top_srcdir   = $top_srcdir
  50. top_builddir = $top_builddir
  51. srcdir       = $top_srcdir/$dir
  52. builddir     = $top_builddir/$dir
  53. VPATH        = $top_srcdir/$dir
  54. EOF
  55.   
  56.   test -z "$dir" || touch $dir/.deps
  57. done
  58.