source: rtems/autogen @ 2b28307

4.104.114.84.95
Last change on this file since 2b28307 was 8cdb582, checked in by Joel Sherrill <joel.sherrill@…>, on 04/12/99 at 15:41:33

Patch from Ralf Corsepius <corsepiu@…>:

This patch addresses a few minor issues and contains a few (minor)
preparations for automake.

  • configure.in: Fix for handing c/src/tests subdirectory handling (FIX)
  • aclocal/rtems-top.m4: + Add TARGET_SUBDIR and --with-target-subdir (preparation of future

enhancements for cross-compiling)

+ Activate RTEMS_ROOT handling (automake preparation)

  • automake/*.am: replace comments "#" with "##" so that comments won't get included into Makefile.in's anymore
  • c/update-tools/* automake support (NEW)
  • ./autogen update/enhancement (cf. ./autogen for details)

After applying this patch please run:

./autogen
cvs add c/update-tools/configure.in
cvs add c/update-tools/Makefile.am
cvs add c/update-tools/aclocal.m4

  • Property mode set to 100644
File size: 2.6 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
8# this is not meant to be exported outside the source tree
9
10# NOTE: Inspired by libtool's autogen script
11
12# to be run from the toplevel directory of RTEMS'
13# source tree
14
15progname=`basename $0`
16verbose="";
17quiet="false"
18mode="generate"
19
20usage()
21{
22  echo
23  echo "usage: ${progname} [-h|-q|-v]"
24  echo
25  echo "options:"
26  echo "        -h .. display this message and exit";
27  echo "        -q .. quiet, don't display directories";
28  echo "        -v .. verbose, pass -v to automake when invoking automake"
29  echo "        -c .. clean, remove all aclocal/autoconf/automake generated files"
30  echo
31  exit 1;
32}
33
34if test ! -f VERSION; then
35  echo "${progname}:"
36  echo "        Please change directory to RTEMS's toplevel directory"
37  exit 1;
38fi
39
40while test $# -gt 0; do
41case $1 in
42-h|--he|--hel|--help)
43  usage ;;
44-q|--qu|--qui|--quie|--quiet)
45  quiet="true";
46  shift;;
47-v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
48  verbose="-v";
49  shift;;
50-c|--cl|--cle|--clea|--clean)
51  mode="clean";
52  shift;;
53-*) echo "unknown option $1" ;
54  usage ;;
55*) echo "invalid parameter $1" ;
56  usage ;;
57esac
58done
59
60pwd=`pwd`;
61
62case $mode in
63generate)
64  confs=`find $pwd -name 'configure.in' -print`
65  aclocal_dir=$pwd/aclocal
66  for i in $confs; do
67  dir=`dirname $i`;
68  ( test "$quiet" = "true" || echo "$dir";
69    cd $dir;
70    aclocal -I $aclocal_dir;
71    autoconf;
72    test -n "`grep CONFIG_HEADER configure.in`" && autoheader ;
73    test -f Makefile.am && automake $verbose ;
74  )
75  done
76  ;;
77clean)
78  test "$quiet" = "true" || echo "removing automake generated Makefile.in files"
79  files=`find . -name 'Makefile.am' -print | sed -e 's%\.am%\.in%g'` ;
80  for i in $files; do if test -f $i; then
81    rm -f $i
82    test "$verbose" = "-v" && echo "$i"   
83  fi; done
84
85  test "$quiet" = "true" || echo "removing configure files"
86  files=`find . -name 'configure' -print` ;
87  test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
88  for i in $files; do if test -f $i; then
89    rm -f $i
90    test "$verbose" = "-v" && echo "$i"   
91  fi; done
92 
93  test "$quiet" = "true" || echo "removing aclocal.m4 files"
94  files=`find . -name 'aclocal.m4' -print` ;
95  test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
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  find . -name '*~' -print | xargs rm -f
102  find . -name '*.orig' -print | xargs rm -f
103  find . -name '*.rej' -print | xargs rm -f
104  find . -name 'config.status' -print | xargs rm -f
105  find . -name 'config.log' -print | xargs rm -f
106  find . -name '.deps' -print | xargs rm -rf
107  ;;
108esac
Note: See TracBrowser for help on using the repository browser.