source: rtems/doc/bootstrap @ e189f6b7

4.104.114.84.95
Last change on this file since e189f6b7 was fc76a6aa, checked in by Joel Sherrill <joel.sherrill@…>, on 06/01/00 at 15:29:01

Patch rtemsdoc-4.5.0-rc-8.diff from Ralf Corsepius <corsepiu@…>.
Ralf's comments follow:

Changes:

  • Enhanced versioning:
    • Addition of automake's version.texi support
    • Replacement of rtemsdoc's former versioning support by automake's versioning support (Abandoning RTEMS-UPDATE-* etc.)
    • Abandoning setup.texi.in
    • Add EDITION to each documents Makefile.am
    • version.texi support in project.am
    • Addition of maintainer mode (currently only used to prevent incorrectly updating timestamps when users touch automake's version.texi timestamp files (stamp-vti)).
  • Fixing info dir support
    • Use texinfo's @dircategory and @direntry instead of infos *-DIR-ENTRY
    • $(infodir)/dir is now correctly set up
  • Avoid using temporary files
    • Pipe texts through REPLACE2 into BMENU2 instead of using temporary files.
    • Abandon using bmenu in favor of bmenu2 (bmenu could be removed now)
  • Prepare Makefile.ams for building in a separate buildtree
    • prefix files with $(srcdir) in Makefile.am for files which must be generated inside of the source tree

Notes:

  • rtemsdoc can not yet be build in a separate source-tree, but we are very close to it.
  • You as the maintainer of this package now should always use --enable-maintainer-mode to configure rtemsdoc.
  • Property mode set to 100755
File size: 3.2 KB
Line 
1#!/bin/sh
2#
3# helps bootstrapping, when checked out from CVS
4# requires GNU autoconf and GNU automake
5#
6# $Id$
7
8progname=`basename $0`
9top_srcdir=`dirname $0`
10
11verbose="";
12quiet="false"
13mode="generate"
14
15usage()
16{
17  echo
18  echo "usage: ${progname} [-h|-q|-v]"
19  echo
20  echo "options:"
21  echo "        -h .. display this message and exit";
22  echo "        -q .. quiet, don't display directories";
23  echo "        -v .. verbose, pass -v to automake when invoking automake"
24  echo "        -c .. clean, remove all aclocal/autoconf/automake generated files"
25  echo
26  exit 1;
27}
28
29generate()
30{
31  dir=$1
32  amopts=$2
33  aclocal_amflags=$3
34
35  ( test "$quiet" = "true" || echo "$dir";
36    cd $dir;
37    aclocal $aclocal_amflags
38    autoconf
39    test -n "`grep CONFIG_HEADER configure.in`" && autoheader ;
40    test -f Makefile.am && automake $amopts ;
41    test -f Makefile.am && test -n "`grep 'stamp-h\.in' Makefile.in`" \
42      && echo timestamp > stamp-h.in
43  )
44}
45
46while test $# -gt 0; do
47case $1 in
48-h|--he|--hel|--help)
49  usage ;;
50-q|--qu|--qui|--quie|--quiet)
51  quiet="true";
52  shift;;
53-v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
54  verbose="-v";
55  shift;;
56-c|--cl|--cle|--clea|--clean)
57  mode="clean";
58  shift;;
59-*) echo "unknown option $1" ;
60  usage ;;
61*) echo "invalid parameter $1" ;
62  usage ;;
63esac
64done
65
66case $mode in
67generate)
68 
69  case $top_srcdir in
70  /* ) aclocal_dir=$top_srcdir/aclocal
71    ;;
72  *) aclocal_dir=`pwd`/$top_srcdir/aclocal
73    ;;
74  esac
75  if test -d $aclocal_dir; then
76    aclocal_amflags="-I $aclocal_dir"
77  fi
78
79  confs=`find . -name 'configure.in' -print | sort`
80  for i in $confs; do
81    dir=`dirname $i`;
82    generate $dir "-a $verbose" "$aclocal_amflags";
83  done
84  ;;
85
86clean)
87  test "$quiet" = "$true" || echo "removing automake support files"
88  find . -name 'config.guess' -print | xargs rm -f
89  find . -name 'config.sub' -print | xargs rm -f
90  find . -name 'install-sh' -print | xargs rm -f
91  find . -name 'missing' -print | xargs rm -f
92  find . -name 'mkinstalldirs' -print | xargs rm -f
93  find . -name 'mdate-sh' -print | xargs rm -f
94
95  test "$quiet" = "true" || echo "removing automake generated Makefile.in files"
96  files=`find . -name 'Makefile.am' -print | sed -e 's%\.am%\.in%g'` ;
97  for i in $files; do if test -f $i; then
98    rm -f $i
99    test "$verbose" = "-v" && echo "$i"   
100  fi; done
101
102  test "$quiet" = "true" || echo "removing configure files"
103  files=`find . -name 'configure' -print` ;
104  test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
105  for i in $files; do if test -f $i; then
106    rm -f $i
107    test "$verbose" = "-v" && echo "$i"
108  fi; done
109 
110  test "$quiet" = "true" || echo "removing aclocal.m4 files"
111  files=`find . -name 'aclocal.m4' -print` ;
112  test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
113  for i in $files; do if test -f $i; then
114    rm -f $i
115    test "$verbose" = "-v" && echo "$i"   
116  fi; done
117
118  find . -name '*~' -print | xargs rm -f
119  find . -name '*.orig' -print | xargs rm -f
120  find . -name '*.rej' -print | xargs rm -f
121  find . -name 'config.status' -print | xargs rm -f
122  find . -name 'config.log' -print | xargs rm -f
123  find . -name 'config.cache' -print | xargs rm -f
124  find . -name 'Makefile' -print | xargs rm -f
125  find . -name '.deps' -print | xargs rm -rf
126  find . -name '.libs' -print | xargs rm -rf
127  find . -name 'stamp-h.in' | xargs rm -rf
128  ;;
129esac
Note: See TracBrowser for help on using the repository browser.