summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorRalf Cors├ępius <ralf.corsepius@rtems.org>2012-07-27 10:02:00 +0200
committerGedare Bloom <gedare@rtems.org>2012-08-06 12:42:43 -0400
commitaa96f47df12980ba786028f169b93e85563e8b39 (patch)
tree45e5127d2624e14fd8fda2d59e1cf501f89f0112 /bootstrap
parent69b346b755e3b8d37bf0700f9c3bee38bc3f1c06 (diff)
downloadrtems-aa96f47df12980ba786028f169b93e85563e8b39.tar.bz2
Do not remove scripts upon ./bootstrap -c. Introduce ./bootstrap -c -f.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap63
1 files changed, 49 insertions, 14 deletions
diff --git a/bootstrap b/bootstrap
index 137b4abeea..de5d626a33 100755
--- a/bootstrap
+++ b/bootstrap
@@ -16,6 +16,7 @@ top_srcdir=`dirname $0`
verbose="";
quiet="false"
mode="autoreconf"
+force=0
usage()
{
@@ -81,6 +82,9 @@ case $1 in
-c|--cl|--cle|--clea|--clean)
mode="clean";
shift;;
+-f|--fo|--for|--forc|--force)
+ force=`expr $force + 1`
+ shift;;
-p|--pr|--pre|--prei|--prein|--preins|--preinst)
mode="preinstall";
shift;;
@@ -189,27 +193,58 @@ autoreconf)
clean)
test "$quiet" = "true" || echo "removing automake generated Makefile.in files"
files=`find . -name 'Makefile.am' -print | sed -e 's%\.am%\.in%g'` ;
- for i in $files; do if test -f $i; then
- rm -f $i
- test "$verbose" = "-v" && echo "$i"
- fi; done
+ for i in $files; do
+ if test -f $i; then
+ rm -f $i
+ test "$verbose" = "-v" && echo "$i"
+ fi;
+ done
test "$quiet" = "true" || echo "removing configure files"
files=`find . -name 'configure' -print` ;
- test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
- for i in $files; do if test -f $i; then
- rm -f $i config.sub config.guess install-sh missing mkinstalldirs
-# rm -f depcomp compile texinfo.tex mdate-sh
- test "$verbose" = "-v" && echo "$i"
- fi; done
+ for i in $files; do
+ if test -f $i; then
+ rm -f $i
+ test "$verbose" = "-v" && echo "$i"
+ fi;
+ done
+ 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"
+ needles="$needles texinfo.tex"
+ fi
+ for j in $needles; do
+ files=`find . -name "$j" -print`
+ for i in $files; do
+ if test -f $i; then
+ rm -f $i
+ test "$verbose" = "-v" && echo "$i"
+ fi;
+ done
+ done
+ fi
+
test "$quiet" = "true" || echo "removing aclocal.m4 files"
files=`find . -name 'aclocal.m4' -print` ;
test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
- for i in $files; do if test -f $i; then
- rm -f $i
- test "$verbose" = "-v" && echo "$i"
- fi; done
+ for i in $files; do
+ if test -f $i; then
+ rm -f $i
+ test "$verbose" = "-v" && echo "$i"
+ fi;
+ done
find . -name '*~' -print | xargs rm -f
find . -name 'bspopts.h.in' -print | xargs rm -f