OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [tools/] [update/] [rtems-polish.sh] - Blame information for rev 492

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
#!/bin/sh
2
 
3
# $Id: rtems-polish.sh,v 1.2 2001-09-27 12:02:54 chris Exp $
4
 
5
#
6
# Search RTEMS source tree for autoconf Makefile.ins and automake
7
# Makefile.ams and run c/update-tools/acpolish rsp. c/update-tool/ampolish
8
# on them.
9
#
10
# To be run from the toplevel directory of the source-tree
11
#
12
 
13
progname=`basename $0`
14
rootdir=`dirname $0`
15
 
16
# Get the absolute path to the perltools
17
pwd=`pwd`
18
cd $rootdir
19
perltools=`pwd`
20
cd $pwd
21
 
22
ac_do=""
23
am_do=""
24
ci_do=""
25
 
26
usage()
27
{
28
  echo
29
  echo "usage: ./${perltools}/${progname} [-h][-ac|-am|-ci]";
30
  echo
31
  echo "options:"
32
  echo "        -h .. display this message and exit";
33
  echo "        -ac .. run acpolish on all autoconf Makefile.ins"
34
  echo "        -am .. run ampolish on all automake Makefile.ams"
35
  echo "        -ci .. run cipolish on all configure.in scripts"
36
  echo
37
  exit 1;
38
}
39
 
40
# Check for auxiliary files
41
aux_files="../../VERSION ampolish acpolish cipolish"
42
for i in ${aux_files}; do
43
  if test ! -f ${perltools}/$i; then
44
    echo "${progname}:"
45
    echo "        Missing $perltools/$i"
46
    exit 1;
47
  fi
48
done
49
 
50
while test $# -gt 0; do
51
case $1 in
52
-h|--he|--hel|--help)
53
  usage ;;
54
-ac)
55
  ac_do="yes";
56
  shift ;;
57
-am)
58
  am_do="yes";
59
  shift ;;
60
-ci)
61
  ci_do="yes";
62
  shift ;;
63
-*) echo "unknown option $1" ;
64
  usage ;;
65
*) echo "invalid parameter $1" ;
66
  usage ;;
67
esac
68
done
69
 
70
if test -z "$ac_do" && test -z "$am_do" && test -z "$ci_do"; then
71
  usage
72
fi
73
 
74
pwd=`pwd`;
75
 
76
if test -n "$ac_do"; then
77
ac_files=`find . -name 'Makefile.in' -print`;
78
for f in $ac_files; do
79
  i=`dirname $f`
80
  dest="$i"
81
  if test ! -f $dest/Makefile.am; then
82
    echo "polishing : $dest/Makefile.in"
83
    ( cd $dest;
84
      mv Makefile.in Makefile.in~;
85
      ${perltools}/acpolish <Makefile.in~ >Makefile.in
86
      rm Makefile.in~
87
    )
88
  fi
89
done
90
fi
91
 
92
if test -n "$am_do"; then
93
am_files=`find . -name 'Makefile.am' -print`;
94
for f in $am_files; do
95
  i=`dirname $f`
96
  dest="$i"
97
    echo "polishing : $dest/Makefile.am"
98
    ( cd $dest;
99
      mv Makefile.am Makefile.am~;
100
      ${perltools}/ampolish <Makefile.am~ >Makefile.am
101
      rm Makefile.am~
102
    )
103
done
104
fi
105
 
106
if test -n "$ci_do"; then
107
ci_files=`find . -name 'configure.in' -print`;
108
for f in $ci_files; do
109
  i=`dirname $f`
110
  dest="$i"
111
    echo "polishing : $dest/configure.in"
112
    ( cd $dest;
113
      mv configure.in configure.in~;
114
      ${perltools}/cipolish <configure.in~ >configure.in
115
      rm configure.in~
116
    )
117
done
118
fi

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.