You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.0 KiB

26 years ago
  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. #
  14. # THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
  15. # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  16. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  17. # EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  18. # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  19. # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  20. # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  21. # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  22. # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  23. # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. #
  25. ##############################################################################
  26. # $Id: fastgen.sh,v 1.7 2000-06-11 10:33:39 sas Exp $
  27. #
  28. srcdir=$1
  29. shift
  30. mkdir_p=$1
  31. shift
  32. top_srcdir=`(cd $srcdir; pwd)`
  33. top_builddir=`pwd`
  34. if test "$mkdir_p" = "yes"; then
  35. mkdir_p="mkdir -p"
  36. else
  37. mkdir_p="$top_srcdir/helpers/mkdir.sh"
  38. fi
  39. for makefile in $@; do
  40. echo "creating $makefile"
  41. dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
  42. $mkdir_p "$dir/"
  43. cat - $top_srcdir/$makefile.in <<EOF >$makefile
  44. top_srcdir = $top_srcdir
  45. top_builddir = $top_builddir
  46. srcdir = $top_srcdir/$dir
  47. builddir = $top_builddir/$dir
  48. VPATH = $top_srcdir/$dir
  49. EOF
  50. test -z "$dir" || touch $dir/.deps
  51. done