2012-07-27 15:38:04 +02:00
|
|
|
#!/bin/sh
|
Automake II patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. Email
description follows:
Description:
* automake for *all* tool subdirectories (Makefile.am, configure.in etc.)
* autogen now also considers CONFIG_HEADER (generates stamp-h.ins and
config.h.ins)
* c/src/tests/tools/generic/difftest and
c/src/tests/tools/generic/sorttimes generated by configure scripts
* c/update-tools/ampolish, beautifier for Makefile.ams, similar to
acpolish
* rtems-polish.sh added to c/update-tools/ + ampolish support
* New subdirectory ./automake, contains automake -Makefile fragments to
support RTEMS make "debug, debug_install, profile, profile_install" for
native Makefile.ams (== ignore these make targets).
* aclocal/rtems-top.m4's RTEMS_TOP now reads the automake makefile
variable VERSION from RTEMS ./VERSION file.
* ./configure.in uses the macros from aclocal + support for the tools'
configure scripts
Remarks:
* To run rtems-polish.sh, "cd <rtems-source-tree>;
./c/update-tools/rtems-polish.sh"
* AFAIS, now all native subdirectories are converted to automake (Please
drop me a note, if I forgot something).
* Unless you notice something fatal, IMO the time has come for a public
try (== snapshot). I do not intend to send more automake related patches
within, say 2 weeks, to give these patches time to settle and to give me
some time to think on how to continue.
* The patch assumes installation to the new main installation directory
[$(prefix)].
1999-03-23 18:02:17 +00:00
|
|
|
#
|
1999-03-19 22:01:26 +00:00
|
|
|
# helps bootstrapping, when checked out from CVS
|
|
|
|
|
# requires GNU autoconf and GNU automake
|
Automake II patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. Email
description follows:
Description:
* automake for *all* tool subdirectories (Makefile.am, configure.in etc.)
* autogen now also considers CONFIG_HEADER (generates stamp-h.ins and
config.h.ins)
* c/src/tests/tools/generic/difftest and
c/src/tests/tools/generic/sorttimes generated by configure scripts
* c/update-tools/ampolish, beautifier for Makefile.ams, similar to
acpolish
* rtems-polish.sh added to c/update-tools/ + ampolish support
* New subdirectory ./automake, contains automake -Makefile fragments to
support RTEMS make "debug, debug_install, profile, profile_install" for
native Makefile.ams (== ignore these make targets).
* aclocal/rtems-top.m4's RTEMS_TOP now reads the automake makefile
variable VERSION from RTEMS ./VERSION file.
* ./configure.in uses the macros from aclocal + support for the tools'
configure scripts
Remarks:
* To run rtems-polish.sh, "cd <rtems-source-tree>;
./c/update-tools/rtems-polish.sh"
* AFAIS, now all native subdirectories are converted to automake (Please
drop me a note, if I forgot something).
* Unless you notice something fatal, IMO the time has come for a public
try (== snapshot). I do not intend to send more automake related patches
within, say 2 weeks, to give these patches time to settle and to give me
some time to think on how to continue.
* The patch assumes installation to the new main installation directory
[$(prefix)].
1999-03-23 18:02:17 +00:00
|
|
|
#
|
1999-03-19 22:01:26 +00:00
|
|
|
# this is not meant to be exported outside the source tree
|
2012-05-03 12:24:46 -05:00
|
|
|
#
|
1999-03-19 22:01:26 +00:00
|
|
|
# NOTE: Inspired by libtool's autogen script
|
2012-05-03 12:24:46 -05:00
|
|
|
#
|
1999-03-19 22:01:26 +00:00
|
|
|
# to be run from the toplevel directory of RTEMS'
|
|
|
|
|
# source tree
|
|
|
|
|
|
|
|
|
|
progname=`basename $0`
|
2000-06-12 15:00:15 +00:00
|
|
|
top_srcdir=`dirname $0`
|
|
|
|
|
|
2017-12-23 18:18:56 +11:00
|
|
|
LC_ALL=C
|
|
|
|
|
export LC_ALL
|
|
|
|
|
|
2012-07-27 15:38:04 +02:00
|
|
|
verbose=""
|
1999-03-19 22:01:26 +00:00
|
|
|
quiet="false"
|
2011-03-03 16:05:34 +00:00
|
|
|
mode="autoreconf"
|
2012-07-27 10:02:00 +02:00
|
|
|
force=0
|
1999-03-19 22:01:26 +00:00
|
|
|
|
|
|
|
|
usage()
|
|
|
|
|
{
|
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Yet some more modifications, I would recommend to be considered before
releasing a snapshot:
1. Cleanup to aclocal/
cvs rm -f aclocal/cygwin.m4
cvs rm -f aclocal/exeext.m4
They are neither used nor needed anymore, however they also don't
disturb (we use autoconf-2.13's AC_EXEEXT instead, now)
----------
2. rtems-rc-19990328-0.diff
Some (minor) bug-fixes:
* make/Templates/Makefile.inc.in: use the new installation directory
($(prefix)/ instead of $(prefix)/rtems/)
* c/src/exec/score/tools/generic/Makefile.am: added line to include local.am
* c/src/exec/score/tools/*/configure.in: added CVS Id header
----------
3. rtems-rc-19990328-1.diff
Enhancements and cleanups to autogen, rtems-polish.sh, configure.in etc.
* autogen: Use the file "VERSION" to detect RTEMS toplevel directory,
extended usage-message, use "find -print"
* c/update-tools/cipolish: New script to beautify configure.in scripts
* c/update-tools/rtems-polish.sh: Use the file "VERSION" to detect RTEMS
toplevel directory, extended usage-message, added variable for perl
scripts' subdirectory, use "find -print", cipolish support, new options
-ac -am -ci.
* aclocal/*.m4, configure.in: moved some AC_SUBST lines to aclocal/*.m4
(reduces size of configure.in
scripts, eases splitting configure.in scripts).
----------
1999-03-29 21:08:04 +00:00
|
|
|
echo
|
2018-08-29 18:02:09 -05:00
|
|
|
echo "usage: ${progname} [-c|-h|-H] [-q][-v]"
|
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Yet some more modifications, I would recommend to be considered before
releasing a snapshot:
1. Cleanup to aclocal/
cvs rm -f aclocal/cygwin.m4
cvs rm -f aclocal/exeext.m4
They are neither used nor needed anymore, however they also don't
disturb (we use autoconf-2.13's AC_EXEEXT instead, now)
----------
2. rtems-rc-19990328-0.diff
Some (minor) bug-fixes:
* make/Templates/Makefile.inc.in: use the new installation directory
($(prefix)/ instead of $(prefix)/rtems/)
* c/src/exec/score/tools/generic/Makefile.am: added line to include local.am
* c/src/exec/score/tools/*/configure.in: added CVS Id header
----------
3. rtems-rc-19990328-1.diff
Enhancements and cleanups to autogen, rtems-polish.sh, configure.in etc.
* autogen: Use the file "VERSION" to detect RTEMS toplevel directory,
extended usage-message, use "find -print"
* c/update-tools/cipolish: New script to beautify configure.in scripts
* c/update-tools/rtems-polish.sh: Use the file "VERSION" to detect RTEMS
toplevel directory, extended usage-message, added variable for perl
scripts' subdirectory, use "find -print", cipolish support, new options
-ac -am -ci.
* aclocal/*.m4, configure.in: moved some AC_SUBST lines to aclocal/*.m4
(reduces size of configure.in
scripts, eases splitting configure.in scripts).
----------
1999-03-29 21:08:04 +00:00
|
|
|
echo
|
|
|
|
|
echo "options:"
|
1999-04-12 15:41:33 +00:00
|
|
|
echo " -c .. clean, remove all aclocal/autoconf/automake generated files"
|
2006-11-18 01:58:17 +00:00
|
|
|
echo " -h .. display this message and exit"
|
2017-12-23 18:18:56 +11:00
|
|
|
echo " -H .. regenerate headers.am files"
|
2006-11-18 01:58:17 +00:00
|
|
|
echo " -q .. quiet, don't display directories"
|
|
|
|
|
echo " -v .. verbose, pass -v to autotools"
|
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Yet some more modifications, I would recommend to be considered before
releasing a snapshot:
1. Cleanup to aclocal/
cvs rm -f aclocal/cygwin.m4
cvs rm -f aclocal/exeext.m4
They are neither used nor needed anymore, however they also don't
disturb (we use autoconf-2.13's AC_EXEEXT instead, now)
----------
2. rtems-rc-19990328-0.diff
Some (minor) bug-fixes:
* make/Templates/Makefile.inc.in: use the new installation directory
($(prefix)/ instead of $(prefix)/rtems/)
* c/src/exec/score/tools/generic/Makefile.am: added line to include local.am
* c/src/exec/score/tools/*/configure.in: added CVS Id header
----------
3. rtems-rc-19990328-1.diff
Enhancements and cleanups to autogen, rtems-polish.sh, configure.in etc.
* autogen: Use the file "VERSION" to detect RTEMS toplevel directory,
extended usage-message, use "find -print"
* c/update-tools/cipolish: New script to beautify configure.in scripts
* c/update-tools/rtems-polish.sh: Use the file "VERSION" to detect RTEMS
toplevel directory, extended usage-message, added variable for perl
scripts' subdirectory, use "find -print", cipolish support, new options
-ac -am -ci.
* aclocal/*.m4, configure.in: moved some AC_SUBST lines to aclocal/*.m4
(reduces size of configure.in
scripts, eases splitting configure.in scripts).
----------
1999-03-29 21:08:04 +00:00
|
|
|
echo
|
2012-07-27 15:38:04 +02:00
|
|
|
exit 1
|
1999-03-19 22:01:26 +00:00
|
|
|
}
|
|
|
|
|
|
2002-03-28 13:53:19 +00:00
|
|
|
if test ! -f $top_srcdir/aclocal/version.m4; then
|
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Yet some more modifications, I would recommend to be considered before
releasing a snapshot:
1. Cleanup to aclocal/
cvs rm -f aclocal/cygwin.m4
cvs rm -f aclocal/exeext.m4
They are neither used nor needed anymore, however they also don't
disturb (we use autoconf-2.13's AC_EXEEXT instead, now)
----------
2. rtems-rc-19990328-0.diff
Some (minor) bug-fixes:
* make/Templates/Makefile.inc.in: use the new installation directory
($(prefix)/ instead of $(prefix)/rtems/)
* c/src/exec/score/tools/generic/Makefile.am: added line to include local.am
* c/src/exec/score/tools/*/configure.in: added CVS Id header
----------
3. rtems-rc-19990328-1.diff
Enhancements and cleanups to autogen, rtems-polish.sh, configure.in etc.
* autogen: Use the file "VERSION" to detect RTEMS toplevel directory,
extended usage-message, use "find -print"
* c/update-tools/cipolish: New script to beautify configure.in scripts
* c/update-tools/rtems-polish.sh: Use the file "VERSION" to detect RTEMS
toplevel directory, extended usage-message, added variable for perl
scripts' subdirectory, use "find -print", cipolish support, new options
-ac -am -ci.
* aclocal/*.m4, configure.in: moved some AC_SUBST lines to aclocal/*.m4
(reduces size of configure.in
scripts, eases splitting configure.in scripts).
----------
1999-03-29 21:08:04 +00:00
|
|
|
echo "${progname}:"
|
2002-03-28 13:53:19 +00:00
|
|
|
echo " Installation problem: Can't find file aclocal/version.m4"
|
2012-07-27 15:38:04 +02:00
|
|
|
exit 1
|
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Yet some more modifications, I would recommend to be considered before
releasing a snapshot:
1. Cleanup to aclocal/
cvs rm -f aclocal/cygwin.m4
cvs rm -f aclocal/exeext.m4
They are neither used nor needed anymore, however they also don't
disturb (we use autoconf-2.13's AC_EXEEXT instead, now)
----------
2. rtems-rc-19990328-0.diff
Some (minor) bug-fixes:
* make/Templates/Makefile.inc.in: use the new installation directory
($(prefix)/ instead of $(prefix)/rtems/)
* c/src/exec/score/tools/generic/Makefile.am: added line to include local.am
* c/src/exec/score/tools/*/configure.in: added CVS Id header
----------
3. rtems-rc-19990328-1.diff
Enhancements and cleanups to autogen, rtems-polish.sh, configure.in etc.
* autogen: Use the file "VERSION" to detect RTEMS toplevel directory,
extended usage-message, use "find -print"
* c/update-tools/cipolish: New script to beautify configure.in scripts
* c/update-tools/rtems-polish.sh: Use the file "VERSION" to detect RTEMS
toplevel directory, extended usage-message, added variable for perl
scripts' subdirectory, use "find -print", cipolish support, new options
-ac -am -ci.
* aclocal/*.m4, configure.in: moved some AC_SUBST lines to aclocal/*.m4
(reduces size of configure.in
scripts, eases splitting configure.in scripts).
----------
1999-03-29 21:08:04 +00:00
|
|
|
fi
|
|
|
|
|
|
1999-03-19 22:01:26 +00:00
|
|
|
while test $# -gt 0; do
|
|
|
|
|
case $1 in
|
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Yet some more modifications, I would recommend to be considered before
releasing a snapshot:
1. Cleanup to aclocal/
cvs rm -f aclocal/cygwin.m4
cvs rm -f aclocal/exeext.m4
They are neither used nor needed anymore, however they also don't
disturb (we use autoconf-2.13's AC_EXEEXT instead, now)
----------
2. rtems-rc-19990328-0.diff
Some (minor) bug-fixes:
* make/Templates/Makefile.inc.in: use the new installation directory
($(prefix)/ instead of $(prefix)/rtems/)
* c/src/exec/score/tools/generic/Makefile.am: added line to include local.am
* c/src/exec/score/tools/*/configure.in: added CVS Id header
----------
3. rtems-rc-19990328-1.diff
Enhancements and cleanups to autogen, rtems-polish.sh, configure.in etc.
* autogen: Use the file "VERSION" to detect RTEMS toplevel directory,
extended usage-message, use "find -print"
* c/update-tools/cipolish: New script to beautify configure.in scripts
* c/update-tools/rtems-polish.sh: Use the file "VERSION" to detect RTEMS
toplevel directory, extended usage-message, added variable for perl
scripts' subdirectory, use "find -print", cipolish support, new options
-ac -am -ci.
* aclocal/*.m4, configure.in: moved some AC_SUBST lines to aclocal/*.m4
(reduces size of configure.in
scripts, eases splitting configure.in scripts).
----------
1999-03-29 21:08:04 +00:00
|
|
|
-h|--he|--hel|--help)
|
|
|
|
|
usage ;;
|
1999-03-19 22:01:26 +00:00
|
|
|
-q|--qu|--qui|--quie|--quiet)
|
2012-07-27 15:38:04 +02:00
|
|
|
quiet="true"
|
1999-03-19 22:01:26 +00:00
|
|
|
shift;;
|
|
|
|
|
-v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
|
2012-07-27 15:38:04 +02:00
|
|
|
verbose="-v"
|
1999-03-19 22:01:26 +00:00
|
|
|
shift;;
|
1999-04-12 15:41:33 +00:00
|
|
|
-c|--cl|--cle|--clea|--clean)
|
2012-07-27 15:38:04 +02:00
|
|
|
mode="clean"
|
1999-04-12 15:41:33 +00:00
|
|
|
shift;;
|
2012-07-27 10:02:00 +02:00
|
|
|
-f|--fo|--for|--forc|--force)
|
|
|
|
|
force=`expr $force + 1`
|
|
|
|
|
shift;;
|
2017-12-23 18:18:56 +11:00
|
|
|
-H|--headers)
|
|
|
|
|
mode="headers"
|
2006-11-18 01:58:17 +00:00
|
|
|
shift;;
|
2006-11-18 06:07:06 +00:00
|
|
|
-r|--re|--rec|--reco|--recon|--reconf)
|
2012-07-27 15:38:04 +02:00
|
|
|
mode="autoreconf"
|
2006-11-18 06:07:06 +00:00
|
|
|
shift;;
|
2011-03-03 16:05:34 +00:00
|
|
|
-g|--ge|--gen|--gene|--gener|--genera|--generat|--generate)
|
2012-07-27 15:38:04 +02:00
|
|
|
mode="generate"
|
2011-03-03 16:05:34 +00:00
|
|
|
shift;;
|
2012-07-27 15:38:04 +02:00
|
|
|
-*) echo "unknown option $1"
|
1999-03-19 22:01:26 +00:00
|
|
|
usage ;;
|
2012-07-27 15:38:04 +02:00
|
|
|
*) echo "invalid parameter $1"
|
1999-03-19 22:01:26 +00:00
|
|
|
usage ;;
|
|
|
|
|
esac
|
|
|
|
|
done
|
|
|
|
|
|
1999-04-12 15:41:33 +00:00
|
|
|
case $mode in
|
2017-12-23 18:18:56 +11:00
|
|
|
headers)
|
|
|
|
|
if test "." != "$top_srcdir"; then
|
|
|
|
|
echo "To generate the headers.am you must call the script via \"./$progname -H\""
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
base="$PWD"
|
2018-09-10 17:38:14 +02:00
|
|
|
|
|
|
|
|
# Generate cpukit/header-dirs.am
|
|
|
|
|
tmp="$base/cpukit/header-dirs.am.new"
|
|
|
|
|
hdr_dirs=`for i in cpukit/include cpukit/libnetworking cpukit/score/cpu/*/include ; do
|
|
|
|
|
cd "$i"
|
|
|
|
|
find -mindepth 1 -type d
|
|
|
|
|
cd "$base"
|
|
|
|
|
done | sort -u | sed 's%^\./%%'`
|
|
|
|
|
echo '## This file was generated by "./boostrap -H".' > "$tmp"
|
|
|
|
|
echo 'include_HEADERS =' >> "$tmp"
|
|
|
|
|
for dir in $hdr_dirs ; do
|
|
|
|
|
am_dir=`echo $dir | sed 's%[/-]%_%g'`
|
|
|
|
|
echo "include_${am_dir}dir = \$(includedir)/$dir" >> "$tmp"
|
|
|
|
|
echo "include_${am_dir}_HEADERS =" >> "$tmp"
|
|
|
|
|
done
|
|
|
|
|
diff -q "$tmp" "cpukit/header-dirs.am" || mv "$tmp" "cpukit/header-dirs.am"
|
|
|
|
|
rm -f "$tmp"
|
|
|
|
|
|
|
|
|
|
# Generate cpukit/*/headers.am
|
|
|
|
|
tmp="$base/headers.am.new"
|
|
|
|
|
cpukit="$base/cpukit"
|
|
|
|
|
cd "$cpukit"
|
|
|
|
|
for inc in include score/cpu/*/include ; do
|
|
|
|
|
echo '## This file was generated by "./boostrap -H".' > "$tmp"
|
|
|
|
|
hdr=`dirname $inc`
|
|
|
|
|
am_dir=""
|
|
|
|
|
cd $inc
|
|
|
|
|
for b in `find -type d | sort` ; do
|
|
|
|
|
for j in `find $b -mindepth 1 -maxdepth 1 -name '*.h' | sed 's%^\.%%' | sed 's%^/%%' | sort` ; do
|
|
|
|
|
dir=`dirname $j`
|
|
|
|
|
if test x$dir != x. ; then
|
|
|
|
|
am_dir=`echo $dir | sed 's%[/-]%_%g'`
|
|
|
|
|
am_dir="_$am_dir"
|
|
|
|
|
else
|
|
|
|
|
am_dir=""
|
|
|
|
|
fi
|
|
|
|
|
echo "include${am_dir}_HEADERS += $inc/$j" >> "$tmp"
|
|
|
|
|
done
|
|
|
|
|
done
|
|
|
|
|
cd "$cpukit"
|
|
|
|
|
diff -q "$tmp" "${hdr}/headers.am" || mv "$tmp" "${hdr}/headers.am"
|
|
|
|
|
done
|
|
|
|
|
rm -f "$tmp"
|
|
|
|
|
cd "$base"
|
|
|
|
|
|
|
|
|
|
# Generate bsps/*/headers.am
|
2017-12-23 18:18:56 +11:00
|
|
|
tmp="$base/headers.am.new"
|
2018-09-10 17:38:14 +02:00
|
|
|
for i in bsps/include bsps/*/include bsps/*/*/include ; do
|
2017-12-23 18:18:56 +11:00
|
|
|
dir=""
|
|
|
|
|
am_dir=""
|
|
|
|
|
echo '## This file was generated by "./boostrap -H".' > "$tmp"
|
|
|
|
|
case $i in
|
|
|
|
|
bsps/*/*/include)
|
|
|
|
|
hdr="../"
|
|
|
|
|
inc="../../../../../../$i/"
|
|
|
|
|
;;
|
|
|
|
|
bsps/*/include)
|
|
|
|
|
hdr="../"
|
|
|
|
|
inc="../../../../../$i/"
|
|
|
|
|
;;
|
|
|
|
|
bsps/include)
|
|
|
|
|
hdr="../"
|
|
|
|
|
inc="../../$i/"
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
hdr=""
|
|
|
|
|
inc=""
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
cd $i
|
|
|
|
|
for b in `find -type d | sort` ; do
|
|
|
|
|
for j in `find $b -mindepth 1 -maxdepth 1 -name '*.h' -or -name '*.inc' | sed 's%^\.%%' | sed 's%^/%%' | sort` ; do
|
|
|
|
|
d=`dirname $j`
|
|
|
|
|
if test x$d != x$dir ; then
|
|
|
|
|
dir=$d
|
|
|
|
|
if test x$d != x. ; then
|
|
|
|
|
am_dir=`echo $dir | sed 's%[/-]%_%g'`
|
|
|
|
|
am_dir="_$am_dir"
|
2018-03-09 21:08:31 +05:30
|
|
|
printf "\ninclude%sdir = \$(includedir)/$dir\n" "$am_dir" >> "$tmp"
|
2017-12-23 18:18:56 +11:00
|
|
|
else
|
|
|
|
|
am_dir=""
|
|
|
|
|
echo "" >> "$tmp"
|
|
|
|
|
fi
|
|
|
|
|
echo "include${am_dir}_HEADERS =" >> "$tmp"
|
|
|
|
|
fi
|
|
|
|
|
echo "include${am_dir}_HEADERS += $inc$j" >> "$tmp"
|
|
|
|
|
if test $j = bsp.h ; then
|
2018-03-09 21:08:31 +05:30
|
|
|
echo "include_HEADERS += include/bspopts.h" >> "$tmp"
|
2017-12-23 18:18:56 +11:00
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
done
|
|
|
|
|
cd "$base"
|
|
|
|
|
diff -q "$tmp" "$i/${hdr}headers.am" || mv "$tmp" "$i/${hdr}headers.am"
|
2006-11-18 01:58:17 +00:00
|
|
|
done
|
2017-12-23 18:18:56 +11:00
|
|
|
rm -f "$tmp"
|
2006-11-18 01:58:17 +00:00
|
|
|
;;
|
|
|
|
|
|
1999-04-12 15:41:33 +00:00
|
|
|
generate)
|
2003-02-11 13:00:13 +00:00
|
|
|
AUTOCONF=${AUTOCONF-autoconf}
|
2002-10-09 17:23:52 +00:00
|
|
|
if test -z "$AUTOCONF"; then
|
|
|
|
|
echo "You must have autoconf installed to run $program"
|
2003-03-25 08:50:16 +00:00
|
|
|
exit 1
|
2002-10-09 17:23:52 +00:00
|
|
|
fi
|
2012-07-27 15:38:04 +02:00
|
|
|
|
2003-03-25 08:50:16 +00:00
|
|
|
AUTOHEADER=${AUTOHEADER-autoheader}
|
|
|
|
|
if test -z "$AUTOHEADER"; then
|
|
|
|
|
echo "You must have autoconf installed to run $program"
|
|
|
|
|
exit 1
|
2002-10-09 17:23:52 +00:00
|
|
|
fi
|
2012-07-27 15:38:04 +02:00
|
|
|
|
2003-02-11 13:00:13 +00:00
|
|
|
AUTOMAKE=${AUTOMAKE-automake}
|
2002-10-09 17:23:52 +00:00
|
|
|
if test -z "$AUTOMAKE"; then
|
|
|
|
|
echo "You must have automake installed to run $program"
|
2003-03-25 08:50:16 +00:00
|
|
|
exit 1
|
2002-10-09 17:23:52 +00:00
|
|
|
fi
|
2012-07-27 15:38:04 +02:00
|
|
|
|
2003-03-25 08:50:16 +00:00
|
|
|
ACLOCAL=${ACLOCAL-aclocal}
|
|
|
|
|
if test -z "$ACLOCAL"; then
|
|
|
|
|
echo "You must have automake installed to run $program"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2000-06-12 15:00:15 +00:00
|
|
|
case $top_srcdir in
|
2000-06-14 17:15:18 +00:00
|
|
|
/* ) aclocal_dir=$top_srcdir
|
2000-06-12 15:00:15 +00:00
|
|
|
;;
|
2000-06-14 17:15:18 +00:00
|
|
|
*) aclocal_dir=`pwd`/$top_srcdir
|
2000-06-12 15:00:15 +00:00
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
2001-09-13 13:14:30 +00:00
|
|
|
confs=`find . \( -name 'configure.in' -o -name 'configure.ac' \) -print`
|
1999-04-12 15:41:33 +00:00
|
|
|
for i in $confs; do
|
2012-07-27 15:38:04 +02:00
|
|
|
dir=`dirname $i`
|
|
|
|
|
configure=`basename $i`
|
|
|
|
|
( test "$quiet" = "true" || echo "$dir"
|
|
|
|
|
cd $dir
|
2000-06-14 17:15:18 +00:00
|
|
|
pat="s,\$(RTEMS_TOPdir),${aclocal_dir},g"
|
|
|
|
|
aclocal_args=`grep '^[ ]*ACLOCAL_AMFLAGS' Makefile.am | \
|
2012-07-27 15:38:04 +02:00
|
|
|
sed -e 's%.*ACLOCAL_AMFLAGS.*\=[ ]*%%g' -e $pat `
|
2003-03-25 08:50:16 +00:00
|
|
|
test "$verbose" = "-v" && echo "${ACLOCAL} $aclocal_args"
|
2012-07-27 15:38:04 +02:00
|
|
|
${ACLOCAL} $aclocal_args
|
2003-03-25 08:50:16 +00:00
|
|
|
test -n "`grep CONFIG_HEADER ${configure}`" && ${AUTOHEADER} \
|
2012-07-27 15:38:04 +02:00
|
|
|
&& test "$verbose" = "-v" && echo "${AUTOHEADER}"
|
2003-03-25 08:50:16 +00:00
|
|
|
test -n "`grep RTEMS_BSP_CONFIGURE ${configure}`" && ${AUTOHEADER} \
|
2012-07-27 15:38:04 +02:00
|
|
|
&& test "$verbose" = "-v" && echo "${AUTOHEADER}"
|
|
|
|
|
test -f Makefile.am && ${AUTOMAKE} -a -c $verbose
|
|
|
|
|
${AUTOCONF}
|
1999-07-01 18:55:29 +00:00
|
|
|
test -f Makefile.am && test -n "`grep 'stamp-h\.in' Makefile.in`" \
|
|
|
|
|
&& echo timestamp > stamp-h.in
|
1999-04-12 15:41:33 +00:00
|
|
|
)
|
|
|
|
|
done
|
|
|
|
|
;;
|
2000-06-12 15:00:15 +00:00
|
|
|
|
2006-11-18 06:07:06 +00:00
|
|
|
autoreconf)
|
|
|
|
|
AUTORECONF=${AUTORECONF-autoreconf}
|
|
|
|
|
if test -z "$AUTORECONF"; then
|
|
|
|
|
echo "You must have autoreconf installed to run $program"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
confs=`find . -name 'configure.ac' -print`
|
|
|
|
|
for i in $confs; do
|
2012-07-27 15:38:04 +02:00
|
|
|
dir=`dirname $i`
|
|
|
|
|
configure=`basename $i`
|
|
|
|
|
( test "$quiet" = "true" || echo "$dir"
|
|
|
|
|
cd $dir
|
|
|
|
|
${AUTORECONF} -i --no-recursive $verbose
|
2006-11-18 06:07:06 +00:00
|
|
|
test -f Makefile.am && test -n "`grep 'stamp-h\.in' Makefile.in`" \
|
|
|
|
|
&& echo timestamp > stamp-h.in
|
|
|
|
|
)
|
|
|
|
|
done
|
|
|
|
|
;;
|
|
|
|
|
|
1999-04-12 15:41:33 +00:00
|
|
|
clean)
|
|
|
|
|
test "$quiet" = "true" || echo "removing automake generated Makefile.in files"
|
2012-07-27 15:38:04 +02:00
|
|
|
files=`find . -name 'Makefile.am' -print | sed -e 's%\.am%\.in%g'`
|
|
|
|
|
for i in $files; do
|
2012-07-27 10:02:00 +02:00
|
|
|
if test -f $i; then
|
|
|
|
|
rm -f $i
|
2012-07-27 15:38:04 +02:00
|
|
|
test "$verbose" = "-v" && echo "$i"
|
|
|
|
|
fi
|
2012-07-27 10:02:00 +02:00
|
|
|
done
|
1999-04-12 15:41:33 +00:00
|
|
|
|
|
|
|
|
test "$quiet" = "true" || echo "removing configure files"
|
2012-07-27 15:38:04 +02:00
|
|
|
files=`find . -name 'configure' -print`
|
|
|
|
|
for i in $files; do
|
2012-07-27 10:02:00 +02:00
|
|
|
if test -f $i; then
|
|
|
|
|
rm -f $i
|
|
|
|
|
test "$verbose" = "-v" && echo "$i"
|
2012-07-27 15:38:04 +02:00
|
|
|
fi
|
2012-07-27 10:02:00 +02:00
|
|
|
done
|
2012-07-27 15:38:04 +02:00
|
|
|
|
2012-07-27 10:02:00 +02:00
|
|
|
if test $force -gt 0; then
|
|
|
|
|
needles=""
|
|
|
|
|
if test $force -gt 1; then
|
|
|
|
|
# Manually maintained
|
|
|
|
|
needles="$needles config.sub"
|
|
|
|
|
needles="$needles config.guess"
|
|
|
|
|
fi
|
|
|
|
|
if test $force -gt 0; then
|
|
|
|
|
# Inherited from automake
|
|
|
|
|
needles="$needles compile"
|
|
|
|
|
needles="$needles depcomp"
|
|
|
|
|
needles="$needles install-sh"
|
|
|
|
|
needles="$needles missing"
|
|
|
|
|
needles="$needles mdate-sh"
|
|
|
|
|
fi
|
|
|
|
|
for j in $needles; do
|
|
|
|
|
files=`find . -name "$j" -print`
|
2012-07-27 15:38:04 +02:00
|
|
|
for i in $files; do
|
2012-07-27 10:02:00 +02:00
|
|
|
if test -f $i; then
|
|
|
|
|
rm -f $i
|
|
|
|
|
test "$verbose" = "-v" && echo "$i"
|
2012-07-27 15:38:04 +02:00
|
|
|
fi
|
2012-07-27 10:02:00 +02:00
|
|
|
done
|
|
|
|
|
done
|
|
|
|
|
fi
|
|
|
|
|
|
1999-04-12 15:41:33 +00:00
|
|
|
test "$quiet" = "true" || echo "removing aclocal.m4 files"
|
2012-07-27 15:38:04 +02:00
|
|
|
files=`find . -name 'aclocal.m4' -print`
|
|
|
|
|
test "$verbose" = "-v" && test -n "$files" && echo "$files"
|
|
|
|
|
for i in $files; do
|
2012-07-27 10:02:00 +02:00
|
|
|
if test -f $i; then
|
|
|
|
|
rm -f $i
|
2012-07-27 15:38:04 +02:00
|
|
|
test "$verbose" = "-v" && echo "$i"
|
|
|
|
|
fi
|
2012-07-27 10:02:00 +02:00
|
|
|
done
|
1999-04-12 15:41:33 +00:00
|
|
|
|
|
|
|
|
find . -name '*~' -print | xargs rm -f
|
2006-02-01 15:08:54 +00:00
|
|
|
find . -name 'bspopts.h.in' -print | xargs rm -f
|
1999-04-12 15:41:33 +00:00
|
|
|
find . -name '*.orig' -print | xargs rm -f
|
|
|
|
|
find . -name '*.rej' -print | xargs rm -f
|
|
|
|
|
find . -name 'config.status' -print | xargs rm -f
|
|
|
|
|
find . -name 'config.log' -print | xargs rm -f
|
1999-07-01 18:55:29 +00:00
|
|
|
find . -name 'config.cache' -print | xargs rm -f
|
2020-02-13 13:39:43 +01:00
|
|
|
find . -name 'Makefile' -and -not -path ./testsuites/ada/sptests/sp19/Makefile -print | xargs rm -f
|
1999-04-12 15:41:33 +00:00
|
|
|
find . -name '.deps' -print | xargs rm -rf
|
1999-07-01 18:55:29 +00:00
|
|
|
find . -name '.libs' -print | xargs rm -rf
|
|
|
|
|
find . -name 'stamp-h.in' | xargs rm -rf
|
2002-10-30 07:08:44 +00:00
|
|
|
find . -name 'autom4te*.cache' | xargs rm -rf
|
1999-04-12 15:41:33 +00:00
|
|
|
;;
|
|
|
|
|
esac
|
2003-06-18 15:15:48 +00:00
|
|
|
|
|
|
|
|
exit 0
|