source: rtems/doc/bootstrap @ deeecc1

4.104.114.84.95
Last change on this file since deeecc1 was 2ba8875, checked in by Joel Sherrill <joel.sherrill@…>, on 04/26/00 at 18:02:26

Patch rtemsdoc-4.5.0-rc-0.diff from Ralf Corsepius <corsepiu@…>
which contains the bulk of converting the documentation tree to automake
and GNU conventions. Comments follow:

This is the automake port of rtemsdoc.

To apply:

cvs co rtemsdoc
cd rtemsdoc
sh cvs-rm.sh
patch -p0 < rtemsdoc-4.5.0-rc-0.diff
sh cvs-add.sh

[Attention: cvs-rm.sh and cvs-add.sh directly modify cvs]

Known bugs:
1) src2html is not supported (yet? - Is this supposed to work?)
2) all *.pdf images now are generated on-the-fly, but not yet deleted
during "make distclean"
3) All supplements, including the templated ones, get build and
installed.
4) Building outside of the source tree is completely untested and very
likely does not work.
5) Make [ps|pdf] are not (yet) supported, make [dvi|info] are supported
by automake's default texinfo rules.

Fixing 2, 3 and 5 is almost trivial and needs to be done.
4) is a matter of testing and tool-properties, for now it is simply
untested.

General issues:

  • gif vs jpg vs png. I would recommend to replace all images with pngs to avoid potential copyright issues (gif) or lack in quality (jpg, jpg is good for real world photographs, but extremely poor on artificial images, graphs).
  • pdf images do net get placed correctly in pdf-documents.
  • texinfo: We now use a local copy of texinfo-4.0's texinfo.tex in texinfo/texinfo.tex for generating infos. However pdftex's system-wide texinfo.tex and pdftexinfo.tex are used for generating *.dvi, *.ps, *.pdf.
  • .cvsignore files still missing.
  • I have renamed the supplements filename not to use c_<supplement>, because automake seems to have problems with it.

Notes:

  • Again, I recommend not to put any generated files into CVS. Here, this comprises some *texi, all *.pdf and many *.html pages. Ie. I recommend to run make maintainer-clean before checking in any files.
  • To get building started, this should be sufficient: ./bootstrap ./configure cd tools; make; cd .. make info
  • To make a public tarball: [cvs co ; ./bootstrap] ./configure cd tools; make; cd .. make info [make clean] make dist

=> This generates a rtems-<version>.tar.gz in the toplevel directory.
=> Building the tools only is required after a "cvs co", but not in a

distribution tarball.

  • 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
94  test "$quiet" = "true" || echo "removing automake generated Makefile.in files"
95  files=`find . -name 'Makefile.am' -print | sed -e 's%\.am%\.in%g'` ;
96  for i in $files; do if test -f $i; then
97    rm -f $i
98    test "$verbose" = "-v" && echo "$i"   
99  fi; done
100
101  test "$quiet" = "true" || echo "removing configure files"
102  files=`find . -name 'configure' -print` ;
103  test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
104  for i in $files; do if test -f $i; then
105    rm -f $i
106    test "$verbose" = "-v" && echo "$i"
107  fi; done
108 
109  test "$quiet" = "true" || echo "removing aclocal.m4 files"
110  files=`find . -name 'aclocal.m4' -print` ;
111  test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
112  for i in $files; do if test -f $i; then
113    rm -f $i
114    test "$verbose" = "-v" && echo "$i"   
115  fi; done
116
117  find . -name '*~' -print | xargs rm -f
118  find . -name '*.orig' -print | xargs rm -f
119  find . -name '*.rej' -print | xargs rm -f
120  find . -name 'config.status' -print | xargs rm -f
121  find . -name 'config.log' -print | xargs rm -f
122  find . -name 'config.cache' -print | xargs rm -f
123  find . -name 'Makefile' -print | xargs rm -f
124  find . -name '.deps' -print | xargs rm -rf
125  find . -name '.libs' -print | xargs rm -rf
126  find . -name 'stamp-h.in' | xargs rm -rf
127  ;;
128esac
Note: See TracBrowser for help on using the repository browser.