forked from Imagelibrary/rtems
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).
----------
This commit is contained in:
13
aclocal.m4
vendored
13
aclocal.m4
vendored
@@ -60,6 +60,7 @@ AC_ARG_ENABLE(gmake-print-directory,
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for gmake-print-directory option)
|
||||
;;
|
||||
esac],[RTEMS_USE_OWN_PDIR=yes])
|
||||
AC_SUBST(RTEMS_USE_OWN_PDIR)dnl
|
||||
])
|
||||
|
||||
dnl $Id$
|
||||
@@ -73,6 +74,7 @@ AC_ARG_ENABLE(multiprocessing,
|
||||
no) RTEMS_HAS_MULTIPROCESSING=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;;
|
||||
esac],[RTEMS_HAS_MULTIPROCESSING=no])
|
||||
AC_SUBST(RTEMS_HAS_MULTIPROCESSING)dnl
|
||||
])
|
||||
|
||||
dnl $Id$
|
||||
@@ -86,6 +88,7 @@ AC_ARG_ENABLE(posix,
|
||||
no) RTEMS_HAS_POSIX_API=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for enable-posix option) ;;
|
||||
esac],[RTEMS_HAS_POSIX_API=yes])
|
||||
AC_SUBST(RTEMS_HAS_POSIX_API)
|
||||
|
||||
changequote(,)dnl
|
||||
case "${target}" in
|
||||
@@ -123,6 +126,7 @@ AC_ARG_ENABLE(networking,
|
||||
no) RTEMS_HAS_NETWORKING=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for enable-networking option) ;;
|
||||
esac],[RTEMS_HAS_NETWORKING=yes])
|
||||
AC_SUBST(RTEMS_HAS_NETWORKING)dnl
|
||||
])
|
||||
|
||||
dnl $Id$
|
||||
@@ -136,6 +140,7 @@ AC_ARG_ENABLE(rdbg,
|
||||
no) RTEMS_HAS_RDBG=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for enable-rdbg option) ;;
|
||||
esac],[RTEMS_HAS_RDBG=no])
|
||||
AC_SUBST(RTEMS_HAS_RDBG)dnl
|
||||
])
|
||||
|
||||
dnl $Id$
|
||||
@@ -149,6 +154,7 @@ AC_DEFUN(RTEMS_ENABLE_INLINES,
|
||||
no) RTEMS_USE_MACROS=yes ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for disable-rtems-inlines option) ;;
|
||||
esac],[RTEMS_USE_MACROS=no])
|
||||
AC_SUBST(RTEMS_USE_MACROS)dnl
|
||||
])
|
||||
|
||||
dnl $Id$
|
||||
@@ -186,6 +192,7 @@ AC_ARG_ENABLE(libcdir,
|
||||
[ --enable-libcdir=directory set the directory for the C library],
|
||||
[ RTEMS_LIBC_DIR="${enableval}" ; \
|
||||
test -d ${enableval} || AC_MSG_ERROR("$enableval is not a directory" ) ] )
|
||||
AC_SUBST(RTEMS_LIBC_DIR)dnl
|
||||
])
|
||||
|
||||
AC_DEFUN(RTEMS_ENABLE_BARE,
|
||||
@@ -703,7 +710,7 @@ dnl check for i386 gas supporting 16 bit mode
|
||||
dnl - binutils 2.9.1.0.7 and higher
|
||||
|
||||
AC_DEFUN(RTEMS_I386_GAS_CODE16,
|
||||
if test "${target_cpu}" = "i386"; then
|
||||
[ if test "${target_cpu}" = "i386"; then
|
||||
AC_CACHE_CHECK([for 16 bit mode assembler support],
|
||||
rtems_cv_prog_gas_code16,
|
||||
[cat > conftest.s << EOF
|
||||
@@ -719,7 +726,8 @@ EOF
|
||||
fi])
|
||||
RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16"
|
||||
fi
|
||||
)
|
||||
AC_SUBST(RTEMS_GAS_CODE16)
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
@@ -886,5 +894,6 @@ AC_ARG_ENABLE(hwapi, \
|
||||
no) RTEMS_HAS_HWAPI=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for hwapi option) ;;
|
||||
esac],[RTEMS_HAS_HWAPI=no])
|
||||
AC_SUBST(RTEMS_HAS_HWAPI)dnl
|
||||
])dnl
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl Detect the Cygwin32 environment (unix under Win32)
|
||||
dnl
|
||||
dnl 98/06/16 David Fiddes (D.J.Fiddes@hw.ac.uk)
|
||||
dnl Hacked from automake-1.3
|
||||
|
||||
# Check to see if we're running under Cygwin32, without using
|
||||
# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
|
||||
# Otherwise set it to "no".
|
||||
|
||||
dnl RTEMS_CYGWIN32()
|
||||
AC_DEFUN(RTEMS_CYGWIN32,
|
||||
[AC_CACHE_CHECK(for Cygwin32 environment, rtems_cv_cygwin32,
|
||||
[AC_TRY_COMPILE(,[return __CYGWIN32__;],
|
||||
rtems_cv_cygwin32=yes, rtems_cv_cygwin32=no)
|
||||
rm -f conftest*])
|
||||
CYGWIN32=
|
||||
test "$rtems_cv_cygwin32" = yes && CYGWIN32=yes])
|
||||
|
||||
@@ -12,4 +12,5 @@ AC_ARG_ENABLE(gmake-print-directory,
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for gmake-print-directory option)
|
||||
;;
|
||||
esac],[RTEMS_USE_OWN_PDIR=yes])
|
||||
AC_SUBST(RTEMS_USE_OWN_PDIR)dnl
|
||||
])
|
||||
|
||||
@@ -11,4 +11,5 @@ AC_ARG_ENABLE(hwapi, \
|
||||
no) RTEMS_HAS_HWAPI=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for hwapi option) ;;
|
||||
esac],[RTEMS_HAS_HWAPI=no])
|
||||
AC_SUBST(RTEMS_HAS_HWAPI)dnl
|
||||
])dnl
|
||||
|
||||
@@ -9,4 +9,5 @@ AC_DEFUN(RTEMS_ENABLE_INLINES,
|
||||
no) RTEMS_USE_MACROS=yes ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for disable-rtems-inlines option) ;;
|
||||
esac],[RTEMS_USE_MACROS=no])
|
||||
AC_SUBST(RTEMS_USE_MACROS)dnl
|
||||
])
|
||||
|
||||
@@ -6,4 +6,5 @@ AC_ARG_ENABLE(libcdir,
|
||||
[ --enable-libcdir=directory set the directory for the C library],
|
||||
[ RTEMS_LIBC_DIR="${enableval}" ; \
|
||||
test -d ${enableval} || AC_MSG_ERROR("$enableval is not a directory" ) ] )
|
||||
AC_SUBST(RTEMS_LIBC_DIR)dnl
|
||||
])
|
||||
|
||||
@@ -9,4 +9,5 @@ AC_ARG_ENABLE(multiprocessing,
|
||||
no) RTEMS_HAS_MULTIPROCESSING=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;;
|
||||
esac],[RTEMS_HAS_MULTIPROCESSING=no])
|
||||
AC_SUBST(RTEMS_HAS_MULTIPROCESSING)dnl
|
||||
])
|
||||
|
||||
@@ -9,4 +9,5 @@ AC_ARG_ENABLE(networking,
|
||||
no) RTEMS_HAS_NETWORKING=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for enable-networking option) ;;
|
||||
esac],[RTEMS_HAS_NETWORKING=yes])
|
||||
AC_SUBST(RTEMS_HAS_NETWORKING)dnl
|
||||
])
|
||||
|
||||
@@ -9,6 +9,7 @@ AC_ARG_ENABLE(posix,
|
||||
no) RTEMS_HAS_POSIX_API=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for enable-posix option) ;;
|
||||
esac],[RTEMS_HAS_POSIX_API=yes])
|
||||
AC_SUBST(RTEMS_HAS_POSIX_API)
|
||||
|
||||
changequote(,)dnl
|
||||
case "${target}" in
|
||||
|
||||
@@ -9,4 +9,5 @@ AC_ARG_ENABLE(rdbg,
|
||||
no) RTEMS_HAS_RDBG=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for enable-rdbg option) ;;
|
||||
esac],[RTEMS_HAS_RDBG=no])
|
||||
AC_SUBST(RTEMS_HAS_RDBG)dnl
|
||||
])
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl Set the EXE extension
|
||||
dnl
|
||||
dnl 98/06/16 David Fiddes (D.J.Fiddes@hw.ac.uk)
|
||||
dnl Hacked from automake-1.3
|
||||
|
||||
# Check to see if we're running under Win32, without using
|
||||
# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
|
||||
# Otherwise set it to "".
|
||||
|
||||
dnl RTEMS_EXEEXT()
|
||||
dnl This knows we add .exe if we're building in the Cygwin32
|
||||
dnl environment. But if we're not, then it compiles a test program
|
||||
dnl to see if there is a suffix for executables.
|
||||
AC_DEFUN(RTEMS_EXEEXT,
|
||||
[AC_REQUIRE([RTEMS_CYGWIN32])
|
||||
AC_MSG_CHECKING([for executable suffix])
|
||||
AC_CACHE_VAL(rtems_cv_exeext,
|
||||
[if test "$CYGWIN32" = yes; then
|
||||
rtems_cv_exeext=.exe
|
||||
else
|
||||
cat > rtems_c_test.c << 'EOF'
|
||||
int main() {
|
||||
/* Nothing needed here */
|
||||
}
|
||||
EOF
|
||||
${CC-cc} -o rtems_c_test $CFLAGS $CPPFLAGS $LDFLAGS rtems_c_test.c $LIBS 1>&5
|
||||
rtems_cv_exeext=`echo rtems_c_test.* | grep -v rtems_c_test.c | sed -e s/rtems_c_test//`
|
||||
rm -f rtems_c_test*])
|
||||
test x"${rtems_cv_exeext}" = x && rtems_cv_exeext=no
|
||||
fi
|
||||
EXEEXT=""
|
||||
test x"${rtems_cv_exeext}" != xno && EXEEXT=${rtems_cv_exeext}
|
||||
AC_MSG_RESULT(${rtems_cv_exeext})
|
||||
AC_SUBST(EXEEXT)])
|
||||
|
||||
@@ -6,7 +6,7 @@ dnl check for i386 gas supporting 16 bit mode
|
||||
dnl - binutils 2.9.1.0.7 and higher
|
||||
|
||||
AC_DEFUN(RTEMS_I386_GAS_CODE16,
|
||||
if test "${target_cpu}" = "i386"; then
|
||||
[ if test "${target_cpu}" = "i386"; then
|
||||
AC_CACHE_CHECK([for 16 bit mode assembler support],
|
||||
rtems_cv_prog_gas_code16,
|
||||
[cat > conftest.s << EOF
|
||||
@@ -22,5 +22,6 @@ EOF
|
||||
fi])
|
||||
RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16"
|
||||
fi
|
||||
)
|
||||
AC_SUBST(RTEMS_GAS_CODE16)
|
||||
])
|
||||
|
||||
|
||||
26
autogen
26
autogen
@@ -18,12 +18,27 @@ quiet="false"
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "${progname} [-v|-q]"
|
||||
echo
|
||||
echo "usage: ${progname} [-h|-q|-v]"
|
||||
echo
|
||||
echo "options:"
|
||||
echo " -h .. display this message and exit";
|
||||
echo " -q .. quiet, don't display directories";
|
||||
echo " -v .. verbose, pass -v to automake when invoking automake"
|
||||
echo
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if test ! -f VERSION; then
|
||||
echo "${progname}:"
|
||||
echo " Please change directory to RTEMS's toplevel directory"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
-h|--he|--hel|--help)
|
||||
usage ;;
|
||||
-q|--qu|--qui|--quie|--quiet)
|
||||
quiet="true";
|
||||
shift;;
|
||||
@@ -37,14 +52,8 @@ case $1 in
|
||||
esac
|
||||
done
|
||||
|
||||
if test ! -d aclocal; then
|
||||
echo "${progname}"
|
||||
echo " Please change directory to RTEMS's toplevel directory"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
pwd=`pwd`;
|
||||
confs=`find $pwd -name configure.in`
|
||||
confs=`find $pwd -name 'configure.in' -print`
|
||||
|
||||
aclocal_dir=$pwd/aclocal
|
||||
for i in $confs; do
|
||||
@@ -57,4 +66,3 @@ dir=`dirname $i`;
|
||||
test -f Makefile.am && automake $verbose ;
|
||||
)
|
||||
done
|
||||
|
||||
|
||||
@@ -6,3 +6,4 @@ AUTOMAKE_OPTIONS = foreign
|
||||
ACLOCAL = @ACLOCAL@ -I $(RTEMS_TOPdir)/aclocal
|
||||
|
||||
noinst_SCRIPTS=size_rtems
|
||||
include $(top_srcdir)/../../../../../../automake/local.am
|
||||
|
||||
@@ -15,6 +15,14 @@
|
||||
#
|
||||
|
||||
|
||||
# $Id$
|
||||
|
||||
# NOTE: This is a temporary work-around to keep
|
||||
# "make debug" and "make debug_install" working.
|
||||
# Once automake is fully integrated these make targets
|
||||
# and this file will probably be removed
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -96,7 +104,7 @@ TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/../../../../../../automake/local.am
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
@@ -232,6 +240,24 @@ distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
debug-am:
|
||||
|
||||
debug: debug-am
|
||||
|
||||
debug_install-am:
|
||||
|
||||
debug_install: debug_install-am
|
||||
|
||||
profile-am:
|
||||
|
||||
profile: profile-am
|
||||
|
||||
profile_install-am:
|
||||
|
||||
profile_install: profile_install-am
|
||||
|
||||
.PHONY: debug debug_install profile profile_install
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT(size_rtems.in)
|
||||
AC_CONFIG_AUX_DIR(../../../../../..)
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT(genoffsets.c)
|
||||
AC_CONFIG_AUX_DIR(../../../../../..)
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT(shgen.c)
|
||||
AC_CONFIG_AUX_DIR(../../../../../..)
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT(gensize.c)
|
||||
AC_CONFIG_AUX_DIR(../../../../../..)
|
||||
|
||||
|
||||
119
c/update-tools/cipolish
Normal file
119
c/update-tools/cipolish
Normal file
@@ -0,0 +1,119 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
#
|
||||
# Perl script to beautify and enhance RTEMS configure.in
|
||||
#
|
||||
# Reads from stdin and writes to stdout
|
||||
#
|
||||
# usage:
|
||||
# acpolish <configure.in >configure.in~
|
||||
# mv configure.in~ configure.in
|
||||
#
|
||||
# ATTENTION: This file contains embedded tabs
|
||||
|
||||
my $nl_seen = 0 ;
|
||||
|
||||
# find a relative up-path to a file $file, starting at directory $pre
|
||||
sub find_file
|
||||
{
|
||||
my $pre = $_[0] ;
|
||||
my $file= $_[1] ;
|
||||
|
||||
my $top = "." ;
|
||||
if (not "$pre") { $pre = "." ; }
|
||||
|
||||
for ( $str = "$pre" . "/" . "$top" ;
|
||||
( -d "$str" ) ;
|
||||
$str = "$pre" . "/" . "$top" )
|
||||
{
|
||||
if ( -f "${str}/${file}" )
|
||||
{
|
||||
return $top ;
|
||||
}
|
||||
if ( "$top" eq "." )
|
||||
{
|
||||
$top = ".." ;
|
||||
}
|
||||
else
|
||||
{
|
||||
$top .= "/.." ;
|
||||
}
|
||||
} ;
|
||||
die "Can't find file ${file}\n" ;
|
||||
}
|
||||
|
||||
# find relative up-path to configure.in
|
||||
my $rtems_cfg = find_file(".","VERSION");
|
||||
|
||||
|
||||
while( <> )
|
||||
{
|
||||
if ( /^[ ]*$/o )
|
||||
{
|
||||
$nl_seen = $nl_seen+1;
|
||||
}
|
||||
|
||||
if ( /^[ ]*AC_CONFIG_AUX_DIR\(.*\)[ ]*$/o )
|
||||
{
|
||||
print "AC_CONFIG_AUX_DIR($rtems_cfg)\n" ;
|
||||
}
|
||||
elsif ( /^[ ]*RTEMS_TOP\(.*\)[ ]*$/o )
|
||||
{
|
||||
print "RTEMS_TOP($rtems_cfg)\n" ;
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_HAS_POSIX_API\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_HAS_HWAPI\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_USE_MACROS\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_HAS_MULTIPROCESSING\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_HAS_RDBG\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_USE_OWN_PDIR\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_HAS_NETWORKING\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_LIBC_DIR\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(PROJECT_ROOT\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_GAS_CODE16\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*PROJECT_ROOT[ ]*=.*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*$/o )
|
||||
{
|
||||
print "$_" if $nl_seen < 2 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
print "$_" ;
|
||||
$nl_seen = 0;
|
||||
}
|
||||
} # while
|
||||
|
||||
;1
|
||||
@@ -1,8 +1,70 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $Id$
|
||||
|
||||
#
|
||||
# Search RTEMS source tree for autoconf Makefile.ins and automake
|
||||
# Makefile.ams and run c/update-tools/acpolish rsp. c/update-tool/ampolish
|
||||
# on them.
|
||||
#
|
||||
# To be run from the toplevel directory of the source-tree
|
||||
#
|
||||
|
||||
progname=`basename $0`
|
||||
|
||||
perltools=c/update-tools
|
||||
ac_do=""
|
||||
am_do=""
|
||||
ci_do=""
|
||||
|
||||
usage()
|
||||
{
|
||||
echo
|
||||
echo "usage: ./${perltools}/${progname} [-h][-ac|-am|-ci]";
|
||||
echo
|
||||
echo "options:"
|
||||
echo " -h .. display this message and exit";
|
||||
echo " -ac .. run acpolish on all autoconf Makefile.ins"
|
||||
echo " -am .. run ampolish on all automake Makefile.ams"
|
||||
echo " -ci .. run cipolish on all configure.in scripts"
|
||||
echo
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if test ! -f VERSION; then
|
||||
echo "${progname}:"
|
||||
echo " Please change directory to RTEMS's toplevel directory"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
-h|--he|--hel|--help)
|
||||
usage ;;
|
||||
-ac)
|
||||
ac_do="yes";
|
||||
shift ;;
|
||||
-am)
|
||||
am_do="yes";
|
||||
shift ;;
|
||||
-ci)
|
||||
ci_do="yes";
|
||||
shift ;;
|
||||
-*) echo "unknown option $1" ;
|
||||
usage ;;
|
||||
*) echo "invalid parameter $1" ;
|
||||
usage ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test -z "$ac_do" && test -z "$am_do" && test -z "$ci_do"; then
|
||||
usage
|
||||
fi
|
||||
|
||||
pwd=`pwd`;
|
||||
|
||||
ac_files=`find . -name Makefile.in`;
|
||||
if test -n "$ac_do"; then
|
||||
ac_files=`find . -name 'Makefile.in' -print`;
|
||||
for f in $ac_files; do
|
||||
i=`dirname $f`
|
||||
dest="$i"
|
||||
@@ -10,21 +72,37 @@ for f in $ac_files; do
|
||||
echo "polishing : $dest/Makefile.in"
|
||||
( cd $dest;
|
||||
mv Makefile.in Makefile.in~;
|
||||
$pwd/c/update-tools/acpolish <Makefile.in~ >Makefile.in
|
||||
${pwd}/${perltools}/acpolish <Makefile.in~ >Makefile.in
|
||||
rm Makefile.in~
|
||||
)
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
am_files=`find . -name Makefile.am`;
|
||||
if test -n "$am_do"; then
|
||||
am_files=`find . -name 'Makefile.am' -print`;
|
||||
for f in $am_files; do
|
||||
i=`dirname $f`
|
||||
dest="$i"
|
||||
echo "polishing : $dest/Makefile.am"
|
||||
( cd $dest;
|
||||
mv Makefile.am Makefile.am~;
|
||||
$pwd/c/update-tools/ampolish <Makefile.am~ >Makefile.am
|
||||
${pwd}/${perltools}/ampolish <Makefile.am~ >Makefile.am
|
||||
rm Makefile.am~
|
||||
)
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "$ci_do"; then
|
||||
ci_files=`find . -name 'configure.in' -print`;
|
||||
for f in $ci_files; do
|
||||
i=`dirname $f`
|
||||
dest="$i"
|
||||
echo "polishing : $dest/configure.in"
|
||||
( cd $dest;
|
||||
mv configure.in configure.in~;
|
||||
${pwd}/${perltools}/cipolish <configure.in~ >configure.in
|
||||
rm configure.in~
|
||||
)
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -30,8 +30,8 @@ export SIZE
|
||||
export OBJCOPY
|
||||
|
||||
RTEMS_HOST = @RTEMS_HOST@
|
||||
RTEMS_CUSTOM = $(prefix)/rtems/make/custom/$(RTEMS_BSP).cfg
|
||||
PROJECT_ROOT = $(prefix)/rtems/
|
||||
RTEMS_CUSTOM = $(prefix)/make/custom/$(RTEMS_BSP).cfg
|
||||
PROJECT_ROOT = $(prefix)/
|
||||
RTEMS_USE_OWN_PDIR = @RTEMS_USE_OWN_PDIR@
|
||||
RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@
|
||||
RTEMS_USE_MACROS = @RTEMS_USE_MACROS@
|
||||
|
||||
@@ -6,3 +6,4 @@ AUTOMAKE_OPTIONS = foreign
|
||||
ACLOCAL = @ACLOCAL@ -I $(RTEMS_TOPdir)/aclocal
|
||||
|
||||
noinst_SCRIPTS=size_rtems
|
||||
include $(top_srcdir)/../../../../../../automake/local.am
|
||||
|
||||
@@ -15,6 +15,14 @@
|
||||
#
|
||||
|
||||
|
||||
# $Id$
|
||||
|
||||
# NOTE: This is a temporary work-around to keep
|
||||
# "make debug" and "make debug_install" working.
|
||||
# Once automake is fully integrated these make targets
|
||||
# and this file will probably be removed
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -96,7 +104,7 @@ TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/../../../../../../automake/local.am
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
@@ -232,6 +240,24 @@ distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
debug-am:
|
||||
|
||||
debug: debug-am
|
||||
|
||||
debug_install-am:
|
||||
|
||||
debug_install: debug_install-am
|
||||
|
||||
profile-am:
|
||||
|
||||
profile: profile-am
|
||||
|
||||
profile_install-am:
|
||||
|
||||
profile_install: profile_install-am
|
||||
|
||||
.PHONY: debug debug_install profile profile_install
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT(size_rtems.in)
|
||||
AC_CONFIG_AUX_DIR(../../../../../..)
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT(genoffsets.c)
|
||||
AC_CONFIG_AUX_DIR(../../../../../..)
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT(shgen.c)
|
||||
AC_CONFIG_AUX_DIR(../../../../../..)
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT(gensize.c)
|
||||
AC_CONFIG_AUX_DIR(../../../../../..)
|
||||
|
||||
|
||||
119
tools/update/cipolish
Executable file
119
tools/update/cipolish
Executable file
@@ -0,0 +1,119 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
#
|
||||
# Perl script to beautify and enhance RTEMS configure.in
|
||||
#
|
||||
# Reads from stdin and writes to stdout
|
||||
#
|
||||
# usage:
|
||||
# acpolish <configure.in >configure.in~
|
||||
# mv configure.in~ configure.in
|
||||
#
|
||||
# ATTENTION: This file contains embedded tabs
|
||||
|
||||
my $nl_seen = 0 ;
|
||||
|
||||
# find a relative up-path to a file $file, starting at directory $pre
|
||||
sub find_file
|
||||
{
|
||||
my $pre = $_[0] ;
|
||||
my $file= $_[1] ;
|
||||
|
||||
my $top = "." ;
|
||||
if (not "$pre") { $pre = "." ; }
|
||||
|
||||
for ( $str = "$pre" . "/" . "$top" ;
|
||||
( -d "$str" ) ;
|
||||
$str = "$pre" . "/" . "$top" )
|
||||
{
|
||||
if ( -f "${str}/${file}" )
|
||||
{
|
||||
return $top ;
|
||||
}
|
||||
if ( "$top" eq "." )
|
||||
{
|
||||
$top = ".." ;
|
||||
}
|
||||
else
|
||||
{
|
||||
$top .= "/.." ;
|
||||
}
|
||||
} ;
|
||||
die "Can't find file ${file}\n" ;
|
||||
}
|
||||
|
||||
# find relative up-path to configure.in
|
||||
my $rtems_cfg = find_file(".","VERSION");
|
||||
|
||||
|
||||
while( <> )
|
||||
{
|
||||
if ( /^[ ]*$/o )
|
||||
{
|
||||
$nl_seen = $nl_seen+1;
|
||||
}
|
||||
|
||||
if ( /^[ ]*AC_CONFIG_AUX_DIR\(.*\)[ ]*$/o )
|
||||
{
|
||||
print "AC_CONFIG_AUX_DIR($rtems_cfg)\n" ;
|
||||
}
|
||||
elsif ( /^[ ]*RTEMS_TOP\(.*\)[ ]*$/o )
|
||||
{
|
||||
print "RTEMS_TOP($rtems_cfg)\n" ;
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_HAS_POSIX_API\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_HAS_HWAPI\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_USE_MACROS\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_HAS_MULTIPROCESSING\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_HAS_RDBG\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_USE_OWN_PDIR\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_HAS_NETWORKING\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_LIBC_DIR\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(PROJECT_ROOT\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*AC_SUBST\(RTEMS_GAS_CODE16\)[ ]*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*PROJECT_ROOT[ ]*=.*$/o )
|
||||
{
|
||||
#remove the line
|
||||
}
|
||||
elsif ( /^[ ]*$/o )
|
||||
{
|
||||
print "$_" if $nl_seen < 2 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
print "$_" ;
|
||||
$nl_seen = 0;
|
||||
}
|
||||
} # while
|
||||
|
||||
;1
|
||||
@@ -1,8 +1,70 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $Id$
|
||||
|
||||
#
|
||||
# Search RTEMS source tree for autoconf Makefile.ins and automake
|
||||
# Makefile.ams and run c/update-tools/acpolish rsp. c/update-tool/ampolish
|
||||
# on them.
|
||||
#
|
||||
# To be run from the toplevel directory of the source-tree
|
||||
#
|
||||
|
||||
progname=`basename $0`
|
||||
|
||||
perltools=c/update-tools
|
||||
ac_do=""
|
||||
am_do=""
|
||||
ci_do=""
|
||||
|
||||
usage()
|
||||
{
|
||||
echo
|
||||
echo "usage: ./${perltools}/${progname} [-h][-ac|-am|-ci]";
|
||||
echo
|
||||
echo "options:"
|
||||
echo " -h .. display this message and exit";
|
||||
echo " -ac .. run acpolish on all autoconf Makefile.ins"
|
||||
echo " -am .. run ampolish on all automake Makefile.ams"
|
||||
echo " -ci .. run cipolish on all configure.in scripts"
|
||||
echo
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if test ! -f VERSION; then
|
||||
echo "${progname}:"
|
||||
echo " Please change directory to RTEMS's toplevel directory"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
-h|--he|--hel|--help)
|
||||
usage ;;
|
||||
-ac)
|
||||
ac_do="yes";
|
||||
shift ;;
|
||||
-am)
|
||||
am_do="yes";
|
||||
shift ;;
|
||||
-ci)
|
||||
ci_do="yes";
|
||||
shift ;;
|
||||
-*) echo "unknown option $1" ;
|
||||
usage ;;
|
||||
*) echo "invalid parameter $1" ;
|
||||
usage ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test -z "$ac_do" && test -z "$am_do" && test -z "$ci_do"; then
|
||||
usage
|
||||
fi
|
||||
|
||||
pwd=`pwd`;
|
||||
|
||||
ac_files=`find . -name Makefile.in`;
|
||||
if test -n "$ac_do"; then
|
||||
ac_files=`find . -name 'Makefile.in' -print`;
|
||||
for f in $ac_files; do
|
||||
i=`dirname $f`
|
||||
dest="$i"
|
||||
@@ -10,21 +72,37 @@ for f in $ac_files; do
|
||||
echo "polishing : $dest/Makefile.in"
|
||||
( cd $dest;
|
||||
mv Makefile.in Makefile.in~;
|
||||
$pwd/c/update-tools/acpolish <Makefile.in~ >Makefile.in
|
||||
${pwd}/${perltools}/acpolish <Makefile.in~ >Makefile.in
|
||||
rm Makefile.in~
|
||||
)
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
am_files=`find . -name Makefile.am`;
|
||||
if test -n "$am_do"; then
|
||||
am_files=`find . -name 'Makefile.am' -print`;
|
||||
for f in $am_files; do
|
||||
i=`dirname $f`
|
||||
dest="$i"
|
||||
echo "polishing : $dest/Makefile.am"
|
||||
( cd $dest;
|
||||
mv Makefile.am Makefile.am~;
|
||||
$pwd/c/update-tools/ampolish <Makefile.am~ >Makefile.am
|
||||
${pwd}/${perltools}/ampolish <Makefile.am~ >Makefile.am
|
||||
rm Makefile.am~
|
||||
)
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "$ci_do"; then
|
||||
ci_files=`find . -name 'configure.in' -print`;
|
||||
for f in $ci_files; do
|
||||
i=`dirname $f`
|
||||
dest="$i"
|
||||
echo "polishing : $dest/configure.in"
|
||||
( cd $dest;
|
||||
mv configure.in configure.in~;
|
||||
${pwd}/${perltools}/cipolish <configure.in~ >configure.in
|
||||
rm configure.in~
|
||||
)
|
||||
done
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user