summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/build/configure.in1
-rw-r--r--tools/cpu/configure.in1
-rw-r--r--tools/cpu/generic/configure.in3
-rw-r--r--tools/cpu/hppa1.1/configure.in3
-rw-r--r--tools/cpu/sh/configure.in3
-rw-r--r--tools/cpu/unix/configure.in3
-rwxr-xr-xtools/update/cipolish261
-rw-r--r--tools/update/configure.in1
8 files changed, 196 insertions, 80 deletions
diff --git a/tools/build/configure.in b/tools/build/configure.in
index 5369179bc2..cbb68d672c 100644
--- a/tools/build/configure.in
+++ b/tools/build/configure.in
@@ -20,6 +20,7 @@ RTEMS_PATH_KSH
AM_CONFIG_HEADER(config.h)
+# Explicitly list all Makefiles here
AC_OUTPUT(
Makefile
install-if-change
diff --git a/tools/cpu/configure.in b/tools/cpu/configure.in
index 4ca1b1bf15..97105f730a 100644
--- a/tools/cpu/configure.in
+++ b/tools/cpu/configure.in
@@ -21,4 +21,5 @@ if test -d $srcdir/$RTEMS_CPU; then
AC_CONFIG_SUBDIRS($RTEMS_CPU)
fi
+# Explicitly list all Makefiles here
AC_OUTPUT(Makefile)
diff --git a/tools/cpu/generic/configure.in b/tools/cpu/generic/configure.in
index b1da0538ad..f637222a3b 100644
--- a/tools/cpu/generic/configure.in
+++ b/tools/cpu/generic/configure.in
@@ -8,7 +8,7 @@ AC_CONFIG_AUX_DIR(../../..)
RTEMS_CANONICAL_TARGET_CPU
-AM_INIT_AUTOMAKE(rtems-cpu-tools-generic,$RTEMS_VERSION,no)
+AM_INIT_AUTOMAKE(rtems-tools-cpu-generic,$RTEMS_VERSION,no)
AM_MAINTAINER_MODE
RTEMS_PATH_KSH
@@ -16,5 +16,6 @@ RTEMS_PATH_KSH
RTEMS_TOOLPATHS
AC_SUBST(program_prefix)
+# Explicitly list all Makefiles here
AC_OUTPUT(Makefile
size_rtems)
diff --git a/tools/cpu/hppa1.1/configure.in b/tools/cpu/hppa1.1/configure.in
index 13c495bec1..59927af180 100644
--- a/tools/cpu/hppa1.1/configure.in
+++ b/tools/cpu/hppa1.1/configure.in
@@ -8,7 +8,7 @@ AC_CONFIG_AUX_DIR(../../..)
RTEMS_CANONICAL_TARGET_CPU
-AM_INIT_AUTOMAKE(rtems-cpu-tools-hppa,$RTEMS_VERSION,no)
+AM_INIT_AUTOMAKE(rtems-tools-cpu-hppa1.1,$RTEMS_VERSION,no)
AM_MAINTAINER_MODE
AC_EXEEXT
@@ -16,4 +16,5 @@ AC_PROG_CC
RTEMS_TOOLPATHS
+# Explicitly list all Makefiles here
AC_OUTPUT(Makefile)
diff --git a/tools/cpu/sh/configure.in b/tools/cpu/sh/configure.in
index 1a152f7413..0b718ef87e 100644
--- a/tools/cpu/sh/configure.in
+++ b/tools/cpu/sh/configure.in
@@ -8,7 +8,7 @@ AC_CONFIG_AUX_DIR(../../..)
RTEMS_CANONICAL_TARGET_CPU
-AM_INIT_AUTOMAKE(rtems-cpu-tools-sh,$RTEMS_VERSION,no)
+AM_INIT_AUTOMAKE(rtems-tools-cpu-sh,$RTEMS_VERSION,no)
AM_MAINTAINER_MODE
AC_EXEEXT
@@ -17,4 +17,5 @@ AC_CHECK_LIB(m,fabs)
RTEMS_TOOLPATHS
+# Explicitly list all Makefiles here
AC_OUTPUT(Makefile)
diff --git a/tools/cpu/unix/configure.in b/tools/cpu/unix/configure.in
index b9460aaecb..39bb459c93 100644
--- a/tools/cpu/unix/configure.in
+++ b/tools/cpu/unix/configure.in
@@ -8,7 +8,7 @@ AC_CONFIG_AUX_DIR(../../..)
RTEMS_CANONICAL_TARGET_CPU
-AM_INIT_AUTOMAKE(rtems-cpu-tools-unix,$RTEMS_VERSION,no)
+AM_INIT_AUTOMAKE(rtems-tools-cpu-unix,$RTEMS_VERSION,no)
AM_MAINTAINER_MODE
AC_EXEEXT
@@ -16,4 +16,5 @@ AC_PROG_CC
RTEMS_TOOLPATHS
+# Explicitly list all Makefiles here
AC_OUTPUT(Makefile)
diff --git a/tools/update/cipolish b/tools/update/cipolish
index bd83aee275..c04e0c52c6 100755
--- a/tools/update/cipolish
+++ b/tools/update/cipolish
@@ -9,12 +9,155 @@
# acpolish <configure.in >configure.in~
# mv configure.in~ configure.in
#
-# ATTENTION: This file contains embedded tabs
-my $nl_seen = 0 ;
+# $Id$
+
+# find relative up-path to configure.in
+my $rtems_cfg = &find_file(".","VERSION");
+my $rtems_root = &find_root() ;
+$rtems_root =~ tr/\//\-/ ;
+my $rtems_name = "rtems" ;
+$rtems_name .= "-" . "$rtems_root" if (length($rtems_root) > 0 ) ;
+
+my @buffer = () ;
+
+while ( <> )
+{
+ push @buffer, "$_" ;
+}
+
+{
+ my @tbuf = () ;
+
+ foreach ( @buffer )
+ {
+ if ( /^#.*list.*Makefile.*$/o ) {}
+ elsif ( /^dnl[\s]+check.*target.*cc.*$/o ) {}
+ elsif ( /^[\s]*AC_CONFIG_AUX_DIR\(.*\)[\s]*$/o )
+ {
+ push @tbuf, "AC_CONFIG_AUX_DIR($rtems_cfg)\n" ;
+ }
+ elsif ( /^[\s]*RTEMS_TOP\(.*\)[\s]*$/o )
+ {
+ push @tbuf, "RTEMS_TOP($rtems_cfg)\n" ;
+ }
+ elsif ( /^[\s]*AM_INIT_AUTOMAKE\(.*\)[\s]*$/o )
+ {
+ push @tbuf, "AM_INIT_AUTOMAKE($rtems_name,\$RTEMS_VERSION,no)\n" ;
+ }
+ elsif ( /^[\s]*AC_SUBST\(RTEMS_HAS_POSIX_API\)[\s]*$/o )
+ {
+ #remove the line
+ }
+ elsif ( /^[\s]*AC_SUBST\(RTEMS_HAS_ITRON_API\)[\s]*$/o )
+ {
+ #remove the line
+ }
+ elsif ( /^[\s]*AC_SUBST\(RTEMS_HAS_HWAPI\)[\s]*$/o )
+ {
+ #remove the line
+ }
+ elsif ( /^[\s]*AC_SUBST\(RTEMS_USE_MACROS\)[\s]*$/o )
+ {
+ #remove the line
+ }
+ elsif ( /^[\s]*AC_SUBST\(RTEMS_HAS_MULTIPROCESSING\)[\s]*$/o )
+ {
+ #remove the line
+ }
+ elsif ( /^[\s]*AC_SUBST\(RTEMS_HAS_RDBG\)[\s]*$/o )
+ {
+ #remove the line
+ }
+ elsif ( /^[\s\t]*AC_SUBST\(RTEMS_USE_OWN_PDIR\)[\s]*$/o )
+ { # obsolete option
+ #remove the line
+ }
+ elsif ( /^[\s\t]*RTEMS_ENABLE_GMAKE_PRINT[ ]*$/o )
+ { # obsolete macro
+ #remove the line
+ }
+ elsif ( /^[\s]*AC_SUBST\(RTEMS_HAS_NETWORKING\)[\s]*$/o )
+ {
+ #remove the line
+ }
+ elsif ( /^[\s]*AC_SUBST\(RTEMS_LIBC_DIR\)[\s]*$/o )
+ {
+ #remove the line
+ }
+ elsif ( /^[\s]*AC_SUBST\(PROJECT_ROOT\)[\s]*$/o )
+ {
+ #remove the line
+ }
+ elsif ( /^[\s]*AC_SUBST\(RTEMS_GAS_CODE16\)[\s]*$/o )
+ {
+ #remove the line
+ }
+ elsif ( /^[\s]*PROJECT_ROOT[\s]*=.*$/o )
+ {
+ #remove the line
+ }
+ elsif ( /^[\s]*(RTEMS_ENABLE_LIBCDIR).*$/o )
+ { #remove the line
+ &define_variable("$1","");
+ push @tbuf, "$_" ;
+ }
+ elsif ( /^[\s]*(RTEMS_PROG_CC_FOR_TARGET).*$/o )
+ {
+ &define_variable("$1","");
+ push @tbuf, "$_" ;
+ }
+ elsif ( /^[\s]*(RTEMS_PROG_CXX_FOR_TARGET).*$/o )
+ {
+ &define_variable("$1","");
+ push @tbuf, "$_" ;
+ }
+ else
+ {
+ push @tbuf, "$_" ;
+ }
+ } # foreach
+ @buffer = @tbuf ;
+}
+
+{
+ my @tbuf = () ;
+ foreach ( @buffer )
+ {
+ if ( /^[\s]*(RTEMS_ENABLE_LIBCDIR).*$/o )
+ {
+ if ( ( not defined $var_RTEMS_PROG_CC_FOR_TARGET )
+ and ( not defined $var_RTEMS_PROG_CXX_FOR_TARGET )
+ )
+ {
+ push @tbuf, "$_" ;
+ }
+ }
+ elsif ( /^AC_OUTPUT.*$/o )
+ {
+ push @tbuf, "# Explicitly list all Makefiles here\n" ;
+ push @tbuf, "$_" ;
+ }
+ else
+ {
+ push @tbuf, "$_" ;
+ }
+ }
+ @buffer = @tbuf ;
+}
+
+{ ## pretty print
+ my $out = join ('',@buffer) ;
+ $out =~ s/\s\#\n(\#\n)+/\n/g ;
+ $out =~ s/\n\n\#\n\n/\n/g ;
+ $out =~ s/\n\n[\n]*/\n\n/g ;
+ print $out ;
+}
+
+exit 1 ;
# find a relative up-path to a file $file, starting at directory $pre
-sub find_file
+sub find_file($$)
{
my $pre = $_[0] ;
my $file= $_[1] ;
@@ -42,86 +185,52 @@ sub find_file
die "Can't find file ${file}\n" ;
}
-# find relative up-path to configure.in
-my $rtems_cfg = find_file(".","VERSION");
+sub find_root()
+{
+ my $top_builddir = "." ;
+ my $subdir="";
+ my $pwd = `pwd`; chomp $pwd;
+ $pwd .= "/" ;
+ my $len ;
+ if ( -f "VERSION" ) { return $subdir ; }
+ my $i = rindex($pwd,'/');
-while( <> )
-{
- if ( /^[ ]*$/o )
- {
- $nl_seen = $nl_seen+1;
- }
+ $len = $i;
+ $pwd = substr($pwd,0,$len);
+ $i = rindex($pwd,'/');
+ $subdir = substr($pwd,$i+1,$len - 1);
+ $top_builddir = ".." ;
- 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_ITRON_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 ( /^[\s\t]*AC_SUBST\(RTEMS_USE_OWN_PDIR\)[ ]*$/o )
- { # obsolete option
- #remove the line
- }
- elsif ( /^[\s\t]*RTEMS_ENABLE_GMAKE_PRINT[ ]*$/o )
- { # obsolete macro
- #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 )
+ while( -d "$top_builddir" )
{
- #remove the line
- }
- elsif ( /^[ ]*AC_SUBST\(RTEMS_GAS_CODE16\)[ ]*$/o )
- {
- #remove the line
- }
- elsif ( /^[ ]*PROJECT_ROOT[ ]*=.*$/o )
- {
- #remove the line
- }
- elsif ( /^[ ]*$/o )
+ if ( -f "${top_builddir}/VERSION" )
+ {
+ return $subdir ;
+ }
+ $len=$i;
+ $pwd = substr($pwd,0,$len);
+ $i = rindex($pwd,'/');
+ $subdir = substr($pwd,$i+1,$len - 1) . "/$subdir";
+ $top_builddir .= "/.." ;
+ } ;
+ die "Can't find VERSION\n" ;
+}
+
+sub define_variable
+{
+ my ($name,$value) = @_ ;
+
+ if ( not defined ${"var_$name"} )
{
- print "$_" if $nl_seen < 2 ;
+# print STDERR "DEFINING $name = $value\n" ;
+ push @vars, "$name" ;
+ ${"var_$name"} = "$value" ;
}
else
{
- print "$_" ;
- $nl_seen = 0;
+# print STDERR "APPENDING <$name> <- <$value>\n" ;
+ ${"var_$name"} .= " $value" ;
}
-} # while
+}
-;1
diff --git a/tools/update/configure.in b/tools/update/configure.in
index 19eeaa03a4..395459f66b 100644
--- a/tools/update/configure.in
+++ b/tools/update/configure.in
@@ -18,6 +18,7 @@ RTEMS_PATH_PERL
AM_CONDITIONAL(PERL,test -n "$PERL")
RTEMS_TOOLPATHS
+# Explicitly list all Makefiles here
AC_OUTPUT(
Makefile
)