source: rtems/tools/update/rtems-polish.sh @ 9e633f5

4.104.114.84.95
Last change on this file since 9e633f5 was df49c60, checked in by Joel Sherrill <joel.sherrill@…>, on 06/12/00 at 15:00:15

Merged from 4.5.0-beta3a

  • Property mode set to 100755
File size: 2.2 KB
Line 
1#!/bin/sh
2
3# $Id$
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
13progname=`basename $0`
14rootdir=`dirname $0`
15
16# Get the absolute path to the perltools
17pwd=`pwd`
18cd $rootdir
19perltools=`pwd`
20cd $pwd
21
22ac_do=""
23am_do=""
24ci_do=""
25
26usage()
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
41aux_files="../../VERSION ampolish acpolish cipolish"
42for 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
48done
49
50while test $# -gt 0; do
51case $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 ;;
67esac
68done
69
70if test -z "$ac_do" && test -z "$am_do" && test -z "$ci_do"; then
71  usage
72fi
73
74pwd=`pwd`;
75
76if test -n "$ac_do"; then
77ac_files=`find . -name 'Makefile.in' -print`;
78for 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
89done
90fi
91
92if test -n "$am_do"; then
93am_files=`find . -name 'Makefile.am' -print`;
94for 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    )
103done
104fi
105
106if test -n "$ci_do"; then
107ci_files=`find . -name 'configure.in' -print`;
108for 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    )
117done
118fi
Note: See TracBrowser for help on using the repository browser.