OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/rtos/rtems/tools/update
    from Rev 30 to Rev 173
    Reverse comparison

Rev 30 → Rev 173

/rtems-polish.sh
0,0 → 1,118
#!/bin/sh
 
# $Id: rtems-polish.sh,v 1.2 2001-09-27 12:02:54 chris Exp $
 
#
# 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`
rootdir=`dirname $0`
 
# Get the absolute path to the perltools
pwd=`pwd`
cd $rootdir
perltools=`pwd`
cd $pwd
 
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;
}
 
# Check for auxiliary files
aux_files="../../VERSION ampolish acpolish cipolish"
for i in ${aux_files}; do
if test ! -f ${perltools}/$i; then
echo "${progname}:"
echo " Missing $perltools/$i"
exit 1;
fi
done
 
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`;
 
if test -n "$ac_do"; then
ac_files=`find . -name 'Makefile.in' -print`;
for f in $ac_files; do
i=`dirname $f`
dest="$i"
if test ! -f $dest/Makefile.am; then
echo "polishing : $dest/Makefile.in"
( cd $dest;
mv Makefile.in Makefile.in~;
${perltools}/acpolish <Makefile.in~ >Makefile.in
rm Makefile.in~
)
fi
done
fi
 
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~;
${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~;
${perltools}/cipolish <configure.in~ >configure.in
rm configure.in~
)
done
fi
/acpolish
0,0 → 1,679
#!/usr/bin/perl
 
use strict ;
 
sub print_macro($$);
 
#
# Perl script to beautify and enhance RTEMS autoconf Makefile.ins
#
# Reads from stdin and writes to stdout
#
# usage:
# acpolish <Makefile.in >Makefile.in~
# mv Makefile.in~ Makefile.in
#
# Note: This tool is not indented to be exported from the source-tree
#
 
if ( -f "Makefile.am" )
{
# Refuse to work on Makefile.ins generated from automake;
# redirecting STDOUT to Makefile.in will trash the Makefile.in ;-
 
die "acpolish must not be run in automake directories" ;
}
 
my $experimental = 0 ; # enable experimental/unsafe features
my $verbose = 0 ;
my $build_pgms_seen = "" ;
my $make_exe_seen = 0 ;
my $install_seen = 0 ;
my $top_builddir = "";
my $subdir = "";
my @installdirs = () ;
 
my @pieces = () ;
my @files = () ;
my @variants = () ;
my @vars = () ;
 
# Strip off duplicate entries from a list
sub purge($)
{
my $list = $_[0] ; # Reference to list !
my (@tmp) = () ;
 
foreach my $l ( @{$list} )
{
my $i = 1 ;
foreach my $t (@tmp)
{
if ( $t eq $l )
{
$i = 0 ;
last ;
}
}
push @tmp,$l if ($i) ;
}
 
@{$list} = @tmp ;
}
 
sub find_root
{
$top_builddir = "." ;
$subdir="";
my $pwd = `pwd`; chomp $pwd;
$pwd .= "/" ;
my $len ;
 
if ( -f "configure.in" ) { return $top_builddir ; }
my $i = rindex($pwd,'/');
 
$len = $i;
$pwd = substr($pwd,0,$len);
$i = rindex($pwd,'/');
$subdir = substr($pwd,$i+1,$len - 1);
$top_builddir = ".." ;
 
while( -d "$top_builddir" )
{
if ( -f "${top_builddir}/configure.in" )
{
return $top_builddir ;
}
$len=$i;
$pwd = substr($pwd,0,$len);
$i = rindex($pwd,'/');
$subdir = substr($pwd,$i+1,$len - 1) . "/$subdir";
$top_builddir .= "/.." ;
} ;
die "Can't find configure.in\n" ;
}
 
find_root();
 
my @buffer = () ;
 
sub subst_line
{
# substitute obsolete variables
if ( /^([^\s]*)[\s]+$/o )
{ # strip trailing spaces
$_ = "$1\n";
}
if ( /^(.*)MKLIB(.*)$/o )
{
s/MKLIB/RANLIB/g ;
}
if ( /^(.*)\$\(INSTINCFLAGS\)(.*)$/o )
{
s/\$\(INSTINCFLAGS\)/-m 644/g ;
}
if ( /^(.*)ASM(_FILES|_PIECES|_O_FILES)(.*)$/o )
{
s/ASM_FILES/S_FILES/g ;
s/ASM_PIECES/S_PIECES/g ;
s/ASM_O_FILES/S_O_FILES/g ;
print STDERR "ASM: $_" if ( $verbose > 0) ;
}
if ( /^(.*)MP_PIECES(.*)$/o )
{ # HACK: this is not always correct
s/MP_PIECES/MP_C_PIECES/g ;
print STDERR "MP_PIECES: $_" if ( $verbose > 0 );
}
if ( /^(.*)\$\(RTEMS_BSP\)(.*)$/o )
{
s/\$\(RTEMS_BSP\)/\@RTEMS_BSP\@/g ;
}
if ( /^(.*)\$\(RTEMS_ROOT\)\/mkinstalldirs(.*)$/o )
{
$_ = "$1\$\(mkinstalldirs\)$2\n" ;
}
if ( /^(.*)\$\{(.*)_FILES\}(.*)$/o )
{
$_ = "$1\$\($2_FILES\)$3\n" ;
}
if ( /^(.*)\$\{(.*)_PIECES\}(.*)$/o )
{
$_ = "$1\$\($2_PIECES\)$3\n" ;
}
if ( /^(.*)\$\(PROJECT_ROOT\)\/\@RTEMS_BSP\@\/lib\/include(.*)$/o )
{
$_ = "$1\$\(PROJECT_INCLUDE\)$2\n" ;
}
if ( /^(.*)\$\{PROJECT_RELEASE\}(.*)$/o )
{
$_ = "$1\$\(PROJECT_RELEASE\)$2\n" ;
}
if ( /^(.*\$\(INSTALL_[A-Z]+\))[\s]+-m[\s]+([54])([0-9][0-9].*)$/o )
{
my $v = $2 + 2 ;
$_ = "$1 -m $v$3\n" ;
}
if ( /^H_FILES[\s]*=[\s]*\$\(wildcard[\s]+\$\(srcdir\)\/\*\.h\)[\s]*$/o )
{
my $files =`ls *.h 2>/dev/null`;
print STDERR "WARNING: Replacing \"\(wildcard... in $_\n" ;
my $line = "H_FILES =";
my @l = split(' ',$files) ;
foreach(@l) { $line .= " \$\(srcdir\)/$_"; }
$line .= "\n" ;
$_ = "$line" ;
}
if ( /^(.*)RTEMS_HAS_([A-Z]+)(.*)$/o )
{
print STDERR "WARNING: Replacing RTEMS_HAS_$2 with HAS_$2\n" ;
$_ = "$1HAS_$2$3\n" ;
}
if ( /^[\s]*\$[({]PGM[)}]:[\s]*(.*)\$([({]SRCS[)}])(.*)$/o )
{
$_ = "\$(PGM):$1$3\n" ;
}
if ( /^.*\$\(make\-exe\).*$/o )
{
$make_exe_seen = 1 ;
}
if ( /^.*\$\(INSTALL_(DATA|SCRIPT|PROGRAM)\)(.*)$/o )
{
$install_seen = 1 ;
}
}
 
{
# 1st PASS:
# * Read input file
# * concatenate multiple lines
# * Remove obsolete variables
 
my @ibuf = () ;
my $line = "" ;
 
while ( <STDIN> )
{
&subst_line ;
if ( /^(#.*)$/o )
{ # preserve comments
$line = "$_" ;
push @ibuf, $line ;
$line = "" ;
}
elsif ( /^.*\\$/o )
{ # multilines
chop ;
$line .= "$_\\" ;
}
else
{
$line .= "$_" ;
push @ibuf, $line ;
$line = "" ;
}
}
@buffer = @ibuf;
}
 
{
# 2nd PASS:
# * remove automatically generated lines
# * process some selected make rules
my $line = "" ;
my @tbuf = () ;
foreach (@buffer)
{
if ( /^[\t](.*)$/o )
{ # make rule production
my $line = $1 ;
tr/\\/ / ;
my @l = split(/;/,$_);
foreach (@l)
{ # try to get installation directories
if ( /^.*\$\(mkinstalldirs\).*\s\$\(INSTALLDIRS\)$/o )
{
}
elsif ( /^.*\$\(mkinstalldirs\).*\s([^\s]+)$/o )
{
push @installdirs, "$1" ;
}
elsif ( /^.*\$\(INSTALL_CHANGE\).*\s([^\s]+)(\/[^\.\s]+\.[^\s\/]+)$/o )
{
# print STDERR "WARNING - DIR1: $1 <$2> " ;
push @installdirs, "$1" ;
}
elsif ( /^.*\$\(INSTALL_CHANGE\).*\s([^\s]+)$/o )
{
# print STDERR "DIR2 $1\n" ;
push @installdirs, "$1" ;
}
}
 
}
elsif ( /^[\s]*\#.*$/o )
{ # comment
push @tbuf, "$_" ;
}
elsif ( /^[\s]*([A-Z_]*)_FILES[\s]*\=[\s]*(.*)$/o )
{ # *_FILES = ... Macros
if ( /^[\s]*([A-Z_]*_|)(CC|C|EQ|H|I|O|S|X)_FILES[\s]*\=[\s]*(.*)$/o )
{
# print STDERR "FILES: <$1>--<$2>--<$3>\n" ;
my $f = "$1$2_FILES" ;
${"var_$f"}="$3" ;
if ( ( $experimental > 0 )
and ( ( "$2" eq "C" ) or ( "$2" eq "CC" ) or ( "$2" eq "S" )
or ( "$2" eq "I" ) or ( "$2" eq "H" ) ) )
{
my $p = "$1$2_PIECES" ;
if ( not defined ${"var_$p"} )
{
print STDERR "ADDING $p\n" ;
${"var_$p"} = "" ;
 
push @pieces, "$p" ;
}
}
# place a marker
 
push @files, "$f" ;
}
else
{ # found a bug
print STDERR "UNKNOWN _FILES: $_\n" ;
my $f = "$1_FILES" ;
${"var_$f"}="$2" ;
# place a marker
 
push @files, "$f" ;
}
}
elsif ( /^[\s]*([A-Z_]*)_PIECES[\s]*\=[\s]*(.*)$/o )
{ # *_PIECES = ... Macros
if ( /^[\s]*([A-Z][A-Z0-9_]*_|)(CC|C|EQ|H|I|O|S|X|REL)_PIECES[\s]*\=[\s]*(.*)$/o )
{
my $p = "$1$2_PIECES" ;
 
if ( not defined ${"var_$p"} )
{
${"var_$p"} = "$3" ;
 
push @pieces, "$p" ;
}
else
{
${"var_$p"} .= " $3" ;
}
}
elsif ( /^[\s]*(BSP|CPU|GENERIC)_PIECES[\s]*\=[\s]*(.*)$/o )
{ # Explicit exceptions from the *_PIECES naming conventions
# They should better be replaced in future
my $p = "$1_PIECES" ;
${"var_$p"}="$2" ;
# place a marker
 
push @pieces, "$p" ;
}
else
{ # found a bug
print STDERR "UNKNOWN _PIECES: $_\n" ;
my $p = "$1_PIECES" ;
${"var_$p"}="$2" ;
# place a marker
 
push @pieces, "$p" ;
}
}
elsif ( /^[\s]*([A-Z_]+)_PIECES_([^\s]+)_V[\s]*\=[\s]*(.*)$/o )
{ # *_PIECES_.._V = ... Macros
if ( /^[\s]*([A-Z][A-Z0-9_]*_|)(CC|C|EQ|H|I|O|S|X|REL)_PIECES_([^\s]+)_V[\s]*\=[\s]*(.*)$/o )
{
my @l = split(/_/,$3);
my $v = "$1$2-$#l" ;
if ( not defined @{"variants_$v"} ) { push @variants, "$v" ; }
 
my $p = "$1$2_PIECES_$3_V" ;
push @{"variants_${v}"}, "$p" ;
 
${"var_$p"}="$4" ;
# place a marker
 
push @pieces, "$p" ;
}
else
{ # found a bug
print STDERR "UNKNOWN _PIECES: $_\n" ;
my $p = "$1_PIECES" ;
${"var_$p"}="$2" ;
# place a marker
 
push @pieces, "$p" ;
}
}
elsif ( /^[\s]*([^\s+=]+)[\s]*\=[\s]*(.*)$/o )
{ # makefile variables
if ( ( "$1" eq "subdir" )
or ( "$1" eq "top_srcdir" )
or ( "$1" eq "top_builddir" )
or ( "$1" eq "RTEMS_ROOT" )
or ( "$1" eq "PROJECT_ROOT" )
or ( "$1" eq "INSTALL" )
or ( "$1" eq "PACKHEX" )
or ( "$1" eq "INSTALL_CHANGE" )
or ( "$1" eq "mkinstalldirs" )
or ( "$1" eq "ACLOCAL" )
or ( "$1" eq "AUTOCONF" )
or ( "$1" eq "ACLOCAL_M4" )
or ( "$1" eq "ACLOCAL_AMFLAGS" )
)
{
print STDERR "REMOVE: $1\n" if $verbose ;
}
elsif ( "$1" eq "srcdir" )
{ # place marker
 
}
elsif ( "$1" eq "INSTALLDIRS" )
{ # process the block
my $input = $2 ;
$input =~ s/\\\\/ /g ;
my @l = split(' ',$input);
foreach (@l)
{
if ( /[\s]*([^\s]+)[\s]*$/o )
{
push @installdirs, "$1" ;
}
}
}
else
{
# print STDERR "MACRO: <$1> = <$2>\n";
my $p = "$1" ;
${"var_$p"}="$2" ;
# place a marker
 
push @vars, "$p" ;
}
}
elsif ( /^[\s]*([^\s+=]+)[\s]*\+\=[\s]*(.*)$/o )
{ # makefile variable addition
# print STDERR "MACRO: <$1> += <$2>\n";
my $p = "$1" ;
if ( not defined ${"var_$p+"} )
{
# place a marker
 
push @vars, "$p+" ;
}
else
{
print STDERR "WARNING += $_" ;
}
${"var_$p+"} .=" $2" ;
}
elsif ( /^[\s]*(\@[^\s]+\@)$/o )
{ # autoconf variable
if ( "$1" eq "\@SET_MAKE\@" )
{
}
else
{
push @tbuf, "$1\n" ;
}
}
elsif ( /^[\s]*include[\s]+(.*)$/o )
{ # include line
push @tbuf, "$_" ;
if ( /^include[\s\t]*.*(directory|leaf|lib)\.cfg.*$/o )
{
 
push @tbuf, "PACKHEX = \@PACKHEX\@\n" if ( $make_exe_seen == 1 ) ;
 
}
}
elsif ( /^[\s]*(ifeq|ifneq|else|endif)[\s]+(.*)$/o )
{ # gmake conditionals
# Most of them are removed, but we still have some :-
push @tbuf, "$1 $2\n" ;
}
elsif ( /^\@.*_(TRUE|FALSE)\@.*$/o )
{ # automake conditionals
# HACK: Don't know how to handle them, so let's pass them through
push @tbuf, "$_" ;
}
elsif ( /^[\s]*([^:]+)[\s]*(:[:]*)[\s]*(.*)$/o )
{
if ( "$2" eq "::" )
{
# Warn about "::"-rules
# Will be silently removed below.
print STDERR "WARNING: Removing \"::\" in RULE $_\n" ;
}
 
if ( ( "$1" eq "Makefile" )
or ( "$1" eq "\$\(INSTALLDIRS\)" )
or ( "$1" eq "\$\(ACLOCAL_M4\)" )
or ( "$1" eq "config\.status" )
or ( "$1" eq "\$\(srcdir\)/configure" )
)
{ # delete entry
shift @buffer ;
}
elsif ( ( "$1" eq "all" )
or ( "$1" eq "preinstall" ) )
{
# Note the dependencies
# Not yet exploited, but could be useful for dependency
# tracking in future
if ( defined ${"var_$1"} )
{ ${"var_$1"} .= " $3" ; }
else
{ ${"var_$1"} = "$3" ; }
push @tbuf, "$1: $3\n" ;
}
else
{ # make rule
push @tbuf, "$1: $3\n" ;
}
}
elsif ( /^[\s]*$/o )
{ # empty line
push @tbuf, "\n" ;
}
else
{
die "PASS 2: Unhandled $_" ;
}
}
@buffer = @tbuf ;
@tbuf = @installdirs ;
@installdirs = () ;
foreach ( @tbuf )
{
if ( /^([^\s]+)(\/[^\.\s]+\.[^\s\/]+)$/o )
{
print STDERR "WARNING - stripping of file: $1 <$2> " if ( $verbose > 1 );
push @installdirs, "$1" ;
}
else
{
push @installdirs, "$_" ;
}
}
purge \@installdirs ;
purge \@pieces ;
}
 
# A fragment to debug conditionals
#foreach( @variants )
#{
# my $v = $_ ;
# print STDERR "VARIANT: $v\n";
# foreach (@{"variants_${v}"})
# {
# print STDERR "* $_\n;" ;
# }
#}
 
# sanity check on *_FILES macros
# too fragile for the time being,
# therefore disabled by default
if ( $experimental > 1 )
{
foreach( @files )
{
my $file = "$_" ;
my $line = ${"var_$_"} ;
$line =~ tr /\\/ /;
my @l = split(' ',$line);
my @o = () ;
foreach (@l)
{
if ( /^([^\.]+)\.([a-z]+)$/o )
{
print STDERR "$file: *.$2 in $_\n" ;
}
elsif ( /^\$\(.*\)$/o )
{
print STDERR "$file: REF: $_\n" ;
}
else
{
print STDERR "$file: UNHANDLED: $_\n" ;
}
}
}
}
 
# print STDERR "PASS 2: @buffer" ;
 
{
# PASS 3:
# * output to new Makefile
# * prettyprint newlines
 
my $nl_seen = 0 ;
foreach ( @buffer )
{
if ( /^$/o )
{
$nl_seen++ ;
print "\n" if ( $nl_seen < 2 );
}
 
{
print "\@SET_MAKE\@\n" ;
print "srcdir = \@srcdir\@\n" ;
print "top_srcdir = \@top_srcdir\@\n" ;
print "top_builddir = $top_builddir\n" ;
if ( "$subdir" )
{
print "subdir = $subdir\n";
}
else
{
print "\nACLOCAL = aclocal\n" ;
print "AUTOCONF = autoconf\n" ;
print "ACLOCAL_M4 = \$(top_srcdir)/aclocal.m4\n" ;
print "ACLOCAL_AMFLAGS = -I \@RTEMS_TOPdir\@/aclocal\n" ;
}
print "\nRTEMS_ROOT = \@RTEMS_ROOT\@\n" ;
print "PROJECT_ROOT = \@PROJECT_ROOT\@\n\n" ;
$nl_seen = 1 ;
}
 
{
print "\n" ;
print "INSTALL = \@INSTALL\@\n" if ( $install_seen > 0 );
print "INSTALL_CHANGE = \@INSTALL_CHANGE\@\n" ;
$nl_seen = 0 ;
}
 
{ # Handle installdirs related items
if ( $#installdirs >= 0 )
{
print "mkinstalldirs = \$(SHELL) \$(top_srcdir)/\@RTEMS_TOPdir\@/mkinstalldirs\n\n" ;
my $line = join( ' ',@installdirs );
&print_macro( "INSTALLDIRS =", $line );
print "\n\$(INSTALLDIRS):\n\t\@\$(mkinstalldirs) \$(INSTALLDIRS)\n\n" ;
$nl_seen = 1 ;
}
}
 
{ # pretty print a shell script fragment/make production
my @l = split(/\\\\/,$1);
if ( $#l >= 0 ) { my $i = shift @l ; print "\t$i"; }
foreach( @l ) { print "\\\n$_"; }
print "\n" ;
$nl_seen = 0 ;
}
 
{ # pretty print a make variable
&print_macro( "$1 =", ${"var_$1"} );
$nl_seen = 0 ;
}
 
{ # pretty print an addition to a make variable
&print_macro( "$1 +=", ${"var_$1+"}) ;
$nl_seen = 0 ;
}
else
{
$nl_seen = 0 ;
print "$_" ;
}
}
}
 
# Add rules for config.status generated files
if ( "$build_pgms_seen" )
{
print "%: \$(srcdir)/%.in \$(top_builddir)/config.status\n" ;
print " cd \$(top_builddir) \\\n" ;
print " && CONFIG_FILES=" ;
print "\$(subdir)/" if ( "$subdir" );
print "\$@ CONFIG_HEADERS= \$(SHELL) ./config.status\n";
}
else
{
print "Makefile: \$(srcdir)/Makefile.in \$(top_builddir)/config.status\n" ;
print "\tcd \$(top_builddir) \\\n" ;
print "\t && CONFIG_FILES=" ;
print "\$(subdir)/" if ( "$subdir" );
print "\$@ CONFIG_HEADERS= \$(SHELL) ./config.status\n";
}
 
if ( ! "$subdir" )
{
print "\n\$(ACLOCAL_M4): \@MAINTAINER_MODE_TRUE\@ configure.in\n" ;
print "\tcd \$(srcdir) && \$(ACLOCAL) \$(ACLOCAL_AMFLAGS)\n" ;
print "\nconfig.status: \$(srcdir)/configure \$(CONFIG_STATUS_DEPENDENCIES)\n" ;
print "\t\$(SHELL) ./config.status --recheck\n" ;
print "\$(srcdir)/configure: \@MAINTAINER_MODE_TRUE\@\$(srcdir)/configure.in";
print " \$(ACLOCAL_M4)\n" ;
print "\tcd \$(srcdir) && \$(AUTOCONF)\n"
}
 
exit 0 ;
 
sub print_macro($$)
{
my ($line,$input) = @_ ;
$input =~ s/\\\\/ /g;
my @l = split(' ',$input);
 
foreach (@l) {
if ( ( length($line) + length($_) ) < 76 )
{
$line .= " $_";
}
else
{
print "$line \\\n";
$line = " $_" ;
}
}
print "$line\n" ;
}
 
/310_to_320_list
0,0 → 1,545
#
# External API name
#
# $Id: 310_to_320_list,v 1.2 2001-09-27 12:02:54 chris Exp $
#
initialize_executive rtems_initialize_executive
initialize_executive_early rtems_initialize_executive_early
initialize_executive_late rtems_initialize_executive_late
shutdown_executive rtems_shutdown_executive
task_create rtems_task_create
task_ident rtems_task_ident
task_start rtems_task_start
task_restart rtems_task_restart
task_delete rtems_task_delete
task_suspend rtems_task_suspend
task_resume rtems_task_resume
task_set_priority rtems_task_set_priority
task_mode rtems_task_mode
task_get_note rtems_task_get_note
task_set_note rtems_task_set_note
task_wake_after rtems_task_wake_after
task_wake_when rtems_task_wake_when
interrupt_catch rtems_interrupt_catch
clock_set rtems_clock_set
clock_get rtems_clock_get
clock_tick rtems_clock_tick
extension_create rtems_extension_create
extension_ident rtems_extension_ident
extension_delete rtems_extension_delete
timer_create rtems_timer_create
timer_ident rtems_timer_ident
timer_cancel rtems_timer_cancel
timer_delete rtems_timer_delete
timer_fire_after rtems_timer_fire_after
timer_fire_when rtems_timer_fire_when
timer_reset rtems_timer_reset
semaphore_create rtems_semaphore_create
semaphore_ident rtems_semaphore_ident
semaphore_delete rtems_semaphore_delete
semaphore_obtain rtems_semaphore_obtain
semaphore_release rtems_semaphore_release
message_queue_create rtems_message_queue_create
message_queue_ident rtems_message_queue_ident
message_queue_delete rtems_message_queue_delete
message_queue_send rtems_message_queue_send
message_queue_urgent rtems_message_queue_urgent
message_queue_broadcast rtems_message_queue_broadcast
message_queue_receive rtems_message_queue_receive
message_queue_flush rtems_message_queue_flush
event_send rtems_event_send
event_receive rtems_event_receive
signal_catch rtems_signal_catch
signal_send rtems_signal_send
partition_create rtems_partition_create
partition_ident rtems_partition_ident
partition_delete rtems_partition_delete
partition_get_buffer rtems_partition_get_buffer
partition_return_buffer rtems_partition_return_buffer
region_create rtems_region_create
region_extend rtems_region_extend
region_ident rtems_region_ident
region_delete rtems_region_delete
region_get_segment rtems_region_get_segment
region_get_segment_size rtems_region_get_segment_size
region_return_segment rtems_region_return_segment
port_create rtems_port_create
port_ident rtems_port_ident
port_delete rtems_port_delete
port_external_to_internal rtems_port_external_to_internal
port_internal_to_external rtems_port_internal_to_external
io_initialize rtems_io_initialize
io_open rtems_io_open
io_close rtems_io_close
io_read rtems_io_read
io_write rtems_io_write
io_control rtems_io_control
fatal_error_occurred rtems_fatal_error_occurred
rate_monotonic_create rtems_rate_monotonic_create
rate_monotonic_ident rtems_rate_monotonic_ident
rate_monotonic_delete rtems_rate_monotonic_delete
rate_monotonic_cancel rtems_rate_monotonic_cancel
rate_monotonic_period rtems_rate_monotonic_period
multiprocessing_announce rtems_multiprocessing_announce
#
# Internal Names for API
#
_Initialize_Executive rtems_initialize_executive
_Initialize_Executive_early rtems_initialize_executive_early
_Initialize_Executive_late rtems_initialize_executive_late
_Shutdown_Executive rtems_shutdown_executive
_RTEMS_tasks_Create rtems_task_create
_RTEMS_tasks_Name_to_id rtems_task_ident
_RTEMS_tasks_Start rtems_task_start
_RTEMS_tasks_Restart rtems_task_restart
_RTEMS_tasks_Delete rtems_task_delete
_RTEMS_tasks_Suspend rtems_task_suspend
_RTEMS_tasks_Resume rtems_task_resume
_RTEMS_tasks_Set_priority rtems_task_set_priority
_RTEMS_tasks_Mode rtems_task_mode
_RTEMS_tasks_Get_note rtems_task_get_note
_RTEMS_tasks_Set_note rtems_task_set_note
_RTEMS_tasks_Wake_after rtems_task_wake_after
_RTEMS_tasks_Wake_when rtems_task_wake_when
_Interrupt_Catch rtems_interrupt_catch
_Clock_Set rtems_clock_set
_Clock_Get rtems_clock_get
_Clock_Tick rtems_clock_tick
_Extension_Create rtems_extension_create
_Extension_Name_to_id rtems_extension_ident
_Extension_Delete rtems_extension_delete
_Timer_Create rtems_timer_create
_Timer_Name_to_id rtems_timer_ident
_Timer_Cancel rtems_timer_cancel
_Timer_Delete rtems_timer_delete
_Timer_Fire_after rtems_timer_fire_after
_Timer_Fire_when rtems_timer_fire_when
_Timer_Reset rtems_timer_reset
_Semaphore_Create rtems_semaphore_create
_Semaphore_Name_to_id rtems_semaphore_ident
_Semaphore_Delete rtems_semaphore_delete
_Semaphore_Obtain rtems_semaphore_obtain
_Semaphore_Release rtems_semaphore_release
_Message_queue_Create rtems_message_queue_create
_Message_queue_Name_to_id rtems_message_queue_ident
_Message_queue_Delete rtems_message_queue_delete
_Message_queue_Send rtems_message_queue_send
_Message_queue_Urgent rtems_message_queue_urgent
_Message_queue_Broadcast rtems_message_queue_broadcast
_Message_queue_Receive rtems_message_queue_receive
_Message_queue_Flush rtems_message_queue_flush
_Event_Send rtems_event_send
_Event_Receive rtems_event_receive
_Signal_Catch rtems_signal_catch
_Signal_Send rtems_signal_send
_Partition_Create rtems_partition_create
_Partition_Name_to_id rtems_partition_ident
_Partition_Delete rtems_partition_delete
_Partition_Get_buffer rtems_partition_get_buffer
_Partition_Return_buffer rtems_partition_return_buffer
_Region_Create rtems_region_create
_Region_Extend rtems_region_extend
_Region_Name_to_id rtems_region_ident
_Region_Delete rtems_region_delete
_Region_Get_segment rtems_region_get_segment
_Region_Get_segment_size rtems_region_get_segment_size
_Region_Return_segment rtems_region_return_segment
_Dual_ported_memory_Create rtems_port_create
_Dual_ported_memory_Name_to_id rtems_port_ident
_Dual_ported_memory_Delete rtems_port_delete
_Dual_ported_memory_External_to_internal rtems_port_external_to_internal
_Dual_ported_memory_Internal_to_external rtems_port_internal_to_external
_IO_Initialize rtems_io_initialize
_IO_Open rtems_io_open
_IO_Close rtems_io_close
_IO_Read rtems_io_read
_IO_Write rtems_io_write
_IO_Control rtems_io_control
_Fatal_Error_occurred rtems_fatal_error_occurred
_Rate_monotonic_Create rtems_rate_monotonic_create
_Rate_monotonic_Name_to_id rtems_rate_monotonic_ident
_Rate_monotonic_Delete rtems_rate_monotonic_delete
_Rate_monotonic_Cancel rtems_rate_monotonic_cancel
_Rate_monotonic_Period rtems_rate_monotonic_period
_Multiprocessing_Announce rtems_multiprocessing_announce
#
# Status (API names)
#
SUCCESSFUL RTEMS_SUCCESSFUL
TASK_EXITTED RTEMS_TASK_EXITTED
MP_NOT_CONFIGURED RTEMS_MP_NOT_CONFIGURED
INVALID_NAME RTEMS_INVALID_NAME
INVALID_ID RTEMS_INVALID_ID
TOO_MANY RTEMS_TOO_MANY
TIMEOUT RTEMS_TIMEOUT
OBJECT_WAS_DELETED RTEMS_OBJECT_WAS_DELETED
INVALID_SIZE RTEMS_INVALID_SIZE
INVALID_ADDRESS RTEMS_INVALID_ADDRESS
INVALID_NUMBER RTEMS_INVALID_NUMBER
NOT_DEFINED RTEMS_NOT_DEFINED
RESOURCE_IN_USE RTEMS_RESOURCE_IN_USE
UNSATISFIED RTEMS_UNSATISFIED
INCORRECT_STATE RTEMS_INCORRECT_STATE
ALREADY_SUSPENDED RTEMS_ALREADY_SUSPENDED
ILLEGAL_ON_SELF RTEMS_ILLEGAL_ON_SELF
ILLEGAL_ON_REMOTE_OBJECT RTEMS_ILLEGAL_ON_REMOTE_OBJECT
CALLED_FROM_ISR RTEMS_CALLED_FROM_ISR
INVALID_PRIORITY RTEMS_INVALID_PRIORITY
INVALID_CLOCK RTEMS_INVALID_CLOCK
INVALID_NODE RTEMS_INVALID_NODE
NOT_CONFIGURED RTEMS_NOT_CONFIGURED
NOT_OWNER_OF_RESOURCE RTEMS_NOT_OWNER_OF_RESOURCE
NOT_IMPLEMENTED RTEMS_NOT_IMPLEMENTED
INTERNAL_ERROR RTEMS_INTERNAL_ERROR
PROXY_BLOCKING RTEMS_PROXY_BLOCKING
NO_MEMORY RTEMS_NO_MEMORY
STATUS_CODES_FIRST RTEMS_STATUS_CODES_FIRST
STATUS_CODES_LAST RTEMS_STATUS_CODES_LAST
#
# Status (Internal names)
#
STATUS_SUCCESSFUL RTEMS_SUCCESSFUL
STATUS_TASK_EXITTED RTEMS_TASK_EXITTED
STATUS_MP_NOT_CONFIGURED RTEMS_MP_NOT_CONFIGURED
STATUS_INVALID_NAME RTEMS_INVALID_NAME
STATUS_INVALID_ID RTEMS_INVALID_ID
STATUS_TOO_MANY RTEMS_TOO_MANY
STATUS_TIMEOUT RTEMS_TIMEOUT
STATUS_OBJECT_WAS_DELETED RTEMS_OBJECT_WAS_DELETED
STATUS_INVALID_SIZE RTEMS_INVALID_SIZE
STATUS_INVALID_ADDRESS RTEMS_INVALID_ADDRESS
STATUS_INVALID_NUMBER RTEMS_INVALID_NUMBER
STATUS_NOT_DEFINED RTEMS_NOT_DEFINED
STATUS_RESOURCE_IN_USE RTEMS_RESOURCE_IN_USE
STATUS_UNSATISFIED RTEMS_UNSATISFIED
STATUS_INCORRECT_STATE RTEMS_INCORRECT_STATE
STATUS_ALREADY_SUSPENDED RTEMS_ALREADY_SUSPENDED
STATUS_ILLEGAL_ON_SELF RTEMS_ILLEGAL_ON_SELF
STATUS_ILLEGAL_ON_REMOTE_OBJECT RTEMS_ILLEGAL_ON_REMOTE_OBJECT
STATUS_CALLED_FROM_ISR RTEMS_CALLED_FROM_ISR
STATUS_INVALID_PRIORITY RTEMS_INVALID_PRIORITY
STATUS_INVALID_CLOCK RTEMS_INVALID_CLOCK
STATUS_INVALID_NODE RTEMS_INVALID_NODE
STATUS_NOT_CONFIGURED RTEMS_NOT_CONFIGURED
STATUS_NOT_OWNER_OF_RESOURCE RTEMS_NOT_OWNER_OF_RESOURCE
STATUS_NOT_IMPLEMENTED RTEMS_NOT_IMPLEMENTED
STATUS_INTERNAL_ERROR RTEMS_INTERNAL_ERROR
STATUS_PROXY_BLOCKING RTEMS_PROXY_BLOCKING
STATUS_NO_MEMORY RTEMS_NO_MEMORY
#
# Attributes (External)
#
DEFAULT_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
NO_FLOATING_POINT RTEMS_NO_FLOATING_POINT
FLOATING_POINT RTEMS_FLOATING_POINT
LOCAL RTEMS_LOCAL
GLOBAL RTEMS_GLOBAL
FIFO RTEMS_FIFO
PRIORITY RTEMS_PRIORITY
NO_LIMIT RTEMS_NO_LIMIT
LIMIT RTEMS_LIMIT
COUNTING_SEMAPHORE RTEMS_COUNTING_SEMAPHORE
BINARY_SEMAPHORE RTEMS_BINARY_SEMAPHORE
NO_INHERIT_PRIORITY RTEMS_NO_INHERIT_PRIORITY
INHERIT_PRIORITY RTEMS_INHERIT_PRIORITY
#
# Attributes (Internal)
#
ATTRIBUTES_DEFAULTS RTEMS_DEFAULT_ATTRIBUTES
ATTRIBUTES_NO_FLOATING_POINT RTEMS_NO_FLOATING_POINT
ATTRIBUTES_FLOATING_POINT RTEMS_FLOATING_POINT
ATTRIBUTES_LOCAL RTEMS_LOCAL
ATTRIBUTES_GLOBAL RTEMS_GLOBAL
ATTRIBUTES_FIFO RTEMS_FIFO
ATTRIBUTES_PRIORITY RTEMS_PRIORITY
ATTRIBUTES_NO_LIMIT RTEMS_NO_LIMIT
ATTRIBUTES_LIMIT RTEMS_LIMIT
ATTRIBUTES_COUNTING_SEMAPHORE RTEMS_COUNTING_SEMAPHORE
ATTRIBUTES_BINARY_SEMAPHORE RTEMS_BINARY_SEMAPHORE
ATTRIBUTES_NO_INHERIT_PRIORITY RTEMS_NO_INHERIT_PRIORITY
ATTRIBUTES_INHERIT_PRIORITY RTEMS_INHERIT_PRIORITY
#
# Options (External)
#
DEFAULT_OPTIONS RTEMS_DEFAULT_OPTIONS
WAIT RTEMS_WAIT
NO_WAIT RTEMS_NO_WAIT
EVENT_ALL RTEMS_EVENT_ALL
EVENT_ANY RTEMS_EVENT_ANY
#
# Options (Internal)
#
OPTIONS_DEFAULT RTEMS_DEFAULT_OPTIONS
OPTIONS_WAIT RTEMS_WAIT
OPTIONS_NO_WAIT RTEMS_NO_WAIT
OPTIONS_EVENT_ALL RTEMS_EVENT_ALL
OPTIONS_EVENT_ANY RTEMS_EVENT_ANY
#
# Masks (External)
#
ALL_MODE_MASKS RTEMS_ALL_MODE_MASKS
PREEMPT_MASK RTEMS_PREEMPT_MASK
TIMESLICE_MASK RTEMS_TIMESLICE_MASK
ASR_MASK RTEMS_ASR_MASK
INTERRUPT_MASK RTEMS_INTERRUPT_MASK
#
# Masks (Internal)
#
MODES_ALL_MASK RTEMS_ALL_MODE_MASKS
MODES_PREEMPT_MASK RTEMS_PREEMPT_MASK
MODES_TIMESLICE_MASK RTEMS_TIMESLICE_MASK
MODES_ASR_MASK RTEMS_ASR_MASK
MODES_INTERRUPT_MASK RTEMS_INTERRUPT_MASK
#
# Modes (Internal)
#
MODES_DEFAULTS RTEMS_DEFAULT_MODES
MODES_PREEMPT RTEMS_PREEMPT
MODES_NO_PREEMPT RTEMS_NO_PREEMPT
MODES_NO_TIMESLICE RTEMS_NO_TIMESLICE
MODES_TIMESLICE RTEMS_TIMESLICE
MODES_ASR RTEMS_ASR
MODES_NO_ASR RTEMS_NO_ASR
_Modes_Interrupt_level RTEMS_INTERRUPT_LEVEL
#
# Modes (External)
#
DEFAULT_MODES RTEMS_DEFAULT_MODES
PREEMPT RTEMS_PREEMPT
NO_PREEMPT RTEMS_NO_PREEMPT
NO_TIMESLICE RTEMS_NO_TIMESLICE
TIMESLICE RTEMS_TIMESLICE
ASR RTEMS_ASR
NO_ASR RTEMS_NO_ASR
INTERRUPT_LEVEL RTEMS_INTERRUPT_LEVEL
#
# Identification (External)
#
SEARCH_ALL_NODES RTEMS_SEARCH_ALL_NODES
SEARCH_OTHER_NODES RTEMS_SEARCH_OTHER_NODES
SEARCH_LOCAL_NODE RTEMS_SEARCH_LOCAL_NODE
WHO_AM_I RTEMS_WHO_AM_I
#
# Identification (Internal)
#
OBJECTS_SEARCH_ALL_NODES RTEMS_SEARCH_ALL_NODES
OBJECTS_SEARCH_OTHER_NODES RTEMS_SEARCH_OTHER_NODES
OBJECTS_SEARCH_LOCAL_NODE RTEMS_SEARCH_LOCAL_NODE
OBJECTS_WHO_AM_I RTEMS_WHO_AM_I
#
# Miscellaneous (External API)
#
CURRENT_MODE RTEMS_CURRENT_MODE
CURRENT_PRIORITY RTEMS_CURRENT_PRIORITY
PENDING_EVENTS RTEMS_PENDING_EVENTS
NO_TIMEOUT RTEMS_NO_TIMEOUT
SELF RTEMS_SELF
PERIOD_STATUS RTEMS_PERIOD_STATUS
YIELD_PROCESSOR RTEMS_YIELD_PROCESSOR
MINIMUM_PRIORITY RTEMS_MINIMUM_PRIORITY
MAXIMUM_PRIORITY RTEMS_MAXIMUM_PRIORITY
MINIMUM_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE
#
# Miscellaneous (External API)
#
MODES_CURRENT RTEMS_CURRENT_MODE
PRIORITY_CURRENT RTEMS_CURRENT_PRIORITY
#
# Events
#
ALL_EVENTS RTEMS_ALL_EVENTS
EVENT_0 RTEMS_EVENT_0
EVENT_1 RTEMS_EVENT_1
EVENT_2 RTEMS_EVENT_2
EVENT_3 RTEMS_EVENT_3
EVENT_4 RTEMS_EVENT_4
EVENT_5 RTEMS_EVENT_5
EVENT_6 RTEMS_EVENT_6
EVENT_7 RTEMS_EVENT_7
EVENT_8 RTEMS_EVENT_8
EVENT_9 RTEMS_EVENT_9
EVENT_10 RTEMS_EVENT_10
EVENT_11 RTEMS_EVENT_11
EVENT_12 RTEMS_EVENT_12
EVENT_13 RTEMS_EVENT_13
EVENT_14 RTEMS_EVENT_14
EVENT_15 RTEMS_EVENT_15
EVENT_16 RTEMS_EVENT_16
EVENT_17 RTEMS_EVENT_17
EVENT_18 RTEMS_EVENT_18
EVENT_19 RTEMS_EVENT_19
EVENT_20 RTEMS_EVENT_20
EVENT_21 RTEMS_EVENT_21
EVENT_22 RTEMS_EVENT_22
EVENT_23 RTEMS_EVENT_23
EVENT_24 RTEMS_EVENT_24
EVENT_25 RTEMS_EVENT_25
EVENT_26 RTEMS_EVENT_26
EVENT_27 RTEMS_EVENT_27
EVENT_28 RTEMS_EVENT_28
EVENT_29 RTEMS_EVENT_29
EVENT_30 RTEMS_EVENT_30
EVENT_31 RTEMS_EVENT_31
#
# Signals
#
SIGNAL_0 RTEMS_SIGNAL_0
SIGNAL_1 RTEMS_SIGNAL_1
SIGNAL_2 RTEMS_SIGNAL_2
SIGNAL_3 RTEMS_SIGNAL_3
SIGNAL_4 RTEMS_SIGNAL_4
SIGNAL_5 RTEMS_SIGNAL_5
SIGNAL_6 RTEMS_SIGNAL_6
SIGNAL_7 RTEMS_SIGNAL_7
SIGNAL_8 RTEMS_SIGNAL_8
SIGNAL_9 RTEMS_SIGNAL_9
SIGNAL_10 RTEMS_SIGNAL_10
SIGNAL_11 RTEMS_SIGNAL_11
SIGNAL_12 RTEMS_SIGNAL_12
SIGNAL_13 RTEMS_SIGNAL_13
SIGNAL_14 RTEMS_SIGNAL_14
SIGNAL_15 RTEMS_SIGNAL_15
SIGNAL_16 RTEMS_SIGNAL_16
SIGNAL_17 RTEMS_SIGNAL_17
SIGNAL_18 RTEMS_SIGNAL_18
SIGNAL_19 RTEMS_SIGNAL_19
SIGNAL_20 RTEMS_SIGNAL_20
SIGNAL_21 RTEMS_SIGNAL_21
SIGNAL_22 RTEMS_SIGNAL_22
SIGNAL_23 RTEMS_SIGNAL_23
SIGNAL_24 RTEMS_SIGNAL_24
SIGNAL_25 RTEMS_SIGNAL_25
SIGNAL_26 RTEMS_SIGNAL_26
SIGNAL_27 RTEMS_SIGNAL_27
SIGNAL_28 RTEMS_SIGNAL_28
SIGNAL_29 RTEMS_SIGNAL_29
SIGNAL_30 RTEMS_SIGNAL_30
SIGNAL_31 RTEMS_SIGNAL_31
#
# Notepads
#
NOTEPAD_FIRST RTEMS_NOTEPAD_FIRST
NOTEPAD_0 RTEMS_NOTEPAD_0
NOTEPAD_1 RTEMS_NOTEPAD_1
NOTEPAD_2 RTEMS_NOTEPAD_2
NOTEPAD_3 RTEMS_NOTEPAD_3
NOTEPAD_4 RTEMS_NOTEPAD_4
NOTEPAD_5 RTEMS_NOTEPAD_5
NOTEPAD_6 RTEMS_NOTEPAD_6
NOTEPAD_7 RTEMS_NOTEPAD_7
NOTEPAD_8 RTEMS_NOTEPAD_8
NOTEPAD_9 RTEMS_NOTEPAD_9
NOTEPAD_10 RTEMS_NOTEPAD_10
NOTEPAD_11 RTEMS_NOTEPAD_11
NOTEPAD_12 RTEMS_NOTEPAD_12
NOTEPAD_13 RTEMS_NOTEPAD_13
NOTEPAD_14 RTEMS_NOTEPAD_14
NOTEPAD_15 RTEMS_NOTEPAD_15
NOTEPAD_LAST RTEMS_NOTEPAD_LAST
#
# Multiprocessing
#
MIN_PKTSIZE RTEMS_MINIMUM_PACKET_SIZE
MIN_HETERO_CONV RTEMS_MINIMUN_HETERO_CONVERSION
#
# Name and ID External
#
get_node rtems_get_node
get_index rtems_get_index
build_name rtems_build_name
name_to_characters rtems_name_to_characters
#
# Name and ID Internal
#
_Objects_Get_node rtems_get_node
_Objects_Get_index rtems_get_index
_Objects_Build_name rtems_build_name
_Objects_Name_to_characters rtems_name_to_characters
#
# clock_get
#
CLOCK_GET_TOD RTEMS_CLOCK_GET_TOD
CLOCK_GET_SECONDS_SINCE_EPOCH RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH
CLOCK_GET_TICKS_SINCE_BOOT RTEMS_CLOCK_GET_TICKS_SINCE_BOOT
CLOCK_GET_TICKS_PER_SECOND RTEMS_CLOCK_GET_TICKS_PER_SECOND
CLOCK_GET_TIME_VALUE RTEMS_CLOCK_GET_TIME_VALUE
#
# Status Code Support Routines (External) -- NO CHANGES
#
#
# Status Code Support Routines (Internal)
#
_Status_Is_successful rtems_is_status_successful
_Status_Is_equal rtems_are_statuses_equal
#
# Time Conversion Support Routines (External) -- NO CHANGES
#
#
# Time Conversion Support Routines (Internal)
#
_TOD_Milliseconds_to_microseconds RTEMS_MILLISECONDS_TO_MICROSECONDS
_TOD_Milliseconds_to_ticks RTEMS_MILLISECONDS_TO_MICROSECONDS
#
# MP packet
#
MP_PACKET_INTERNAL_THREADS RTEMS_MP_PACKET_INTERNAL_THREADS
MP_PACKET_RTEMS_TASKS RTEMS_MP_PACKET_TASKS
MP_PACKET_MESSAGE_QUEUE RTEMS_MP_PACKET_MESSAGE_QUEUE
MP_PACKET_SEMAPHORE RTEMS_MP_PACKET_SEMAPHORE
MP_PACKET_PARTITION RTEMS_MP_PACKET_PARTITION
MP_PACKET_REGION RTEMS_MP_PACKET_REGION
MP_PACKET_EVENT RTEMS_MP_PACKET_EVENT
MP_PACKET_SIGNAL RTEMS_MP_PACKET_SIGNAL
#
#
#
IO_Major_control rtems_device_major_number
IO_Minor_control rtems_device_minor_number
#
# Configuration Info
#
Configuration_Table rtems_configuration_table
Configuration_Initialization_tasks_table rtems_initialization_tasks_table
Configuration_Driver_address_table rtems_driver_address_table
Configuration_Extension_table rtems_extensions_table
rtems_tasks_create_extension rtems_task_create_extension
rtems_tasks_start_extension rtems_task_start_extension
rtems_tasks_restart_extension rtems_task_restart_extension
rtems_tasks_delete_extension rtems_task_delete_extension
rtems_tasks_switch_extension rtems_task_switch_extension
rtems_tasks_begin_extension rtems_task_begin_extension
rtems_tasks_exitted_extension rtems_task_exitted_extension
rtems_fatal_extension rtems_fatal_extension
Configuration_MPCI_table rtems_mpci_table
Configuration_Multiprocessing_table rtems_multiprocessing_table
CPU_Table rtems_cpu_table
#
Clock_Get_options rtems_clock_get_options
Clock_Time_value rtems_clock_time_value
MP_packet_Prefix rtems_packet_prefix
MP_packet_Classes rtems_mp_packet_classes
TOD_Control rtems_time_of_day
ISR_Vector rtems_vector_number
Watchdog_Interval rtems_interval
Watchdog_Service rtems_timer_service_routine_entry
Attributes_Control rtems_attribute
Modes_Control rtems_mode
Options_Control rtems_option
Priority_Control rtems_task_priority
PRIORITY_MINIMUM RTEMS_MINIMUM_PRIORITY
PRIORITY_MAXIMUM RTEMS_MAXIMUM_PRIORITY
Event_sets_Control rtems_event_set
ASR_Signal_set_control rtems_signal_set
Status_Codes rtems_status_code
RTEMS_TASKS_YIELD_PROCESSOR RTEMS_YIELD_PROCESSOR
RATE_MONOTONIC_PERIOD_STATUS RTEMS_PERIOD_STATUS
WATCHDOG_FOREVER RTEMS_NO_TIMEOUT
STACK_MINIMUM_SIZE RTEMS_MINIMUM_STACK_SIZE
#
ASR_Handler rtems_asr_entry
Thread_Entry rtems_task_entry
#
disable_intr rtems_interrupt_disable
enable_intr rtems_interrupt_enable
flash_intr rtems_interrupt_flash
 
/configure.in
0,0 → 1,24
#
# $Id: configure.in,v 1.2 2001-09-27 12:02:54 chris Exp $
#
 
AC_PREREQ(2.13)
AC_INIT(rtems-polish.sh)
RTEMS_TOP(../..)
AC_CONFIG_AUX_DIR(../..)
 
AC_CANONICAL_HOST
 
AM_INIT_AUTOMAKE(rtems-tools-update,$RTEMS_VERSION,no)
AM_MAINTAINER_MODE
 
RTEMS_PATH_KSH
RTEMS_PATH_PERL
 
AM_CONDITIONAL(PERL,test -n "$PERL")
 
RTEMS_TOOLPATHS
# Explicitly list all Makefiles here
AC_OUTPUT(
Makefile
)
/update.in
0,0 → 1,216
#!@KSH@ -p
#
# $Id: update.in,v 1.2 2001-09-27 12:02:54 chris Exp $
#
# Either bash or ksh will be ok for this; requires 'test -ot'
# (-p above just says to not parse $ENV file; makes it faster for
# those of us who set $ENV)
#
# Update RTEMS applications for the API changes from 3.1.0 to 3.2.0
#
# NOTE
#
# This is potentially a very dangerous program.
 
# progname=`basename $0`
progname=${0##*/} # fast basename hack for ksh, bash
 
USAGE=\
"
usage: $progname [ -vs ] [ -b base_directory ] [-p file] [-f] [files...]
-v -- verbose
-p -- file with replacement instructions
-s -- skip prompt for backup verification
-f -- do files at end of line
 
base_directory is the root directory of the source code to update. It
defaults to the current directory.
 
This program updates C, H, and .inl files.
"
 
fatal() {
if [ "$1" ]
then
echo >&2
echo $* >&2
echo >&2
fi
echo "$USAGE" 1>&2
exit 1
}
 
#
# KLUDGE to figure out at runtime how to echo a line without a
# newline.
#
count=`echo "\\c" | wc -c`
if [ ${count} -ne 0 ] ; then
EARG="-n"
EOL=""
else
EARG=""
EOL="\\c"
fi
 
#
# Function to make sure they do a backup
#
 
WARNING=\
"
 
*******************************************************************************
*******************************************************************************
*******************************************************************************
**** ****
**** WARNING!!! WARNING!!! WARNING!!! ****
**** ****
**** ALL SOURCE CODE SHOULD BE BACKED UP BEFORE RUNNING THIS PROGRAM!! ****
**** ****
**** WARNING!!! WARNING!!! WARNING!!! ****
**** ****
*******************************************************************************
*******************************************************************************
*******************************************************************************
 
"
 
verify_backup()
{
echo "$WARNING"
continue="yes"
while [ $continue = "yes" ]
do
echo ${EARG} "Do you wish to update the source tree at this time [y|n]? " ${EOL}
read answer
case $answer in
[yY]*)
continue="no"
;;
[nN]*)
echo
echo "Exitting at user request"
echo
exit 0
;;
esac
done
}
 
#
# Default tools to use...
#
# NOTE: The GNU versions of both of these are faster.
#
find_prog=find
xargs_prog=xargs
 
#
# process the options
#
 
verbose=""
suffix=""
mode=""
base_directory=.
do_files="no"
do_prompt="yes"
replacement_file="${RTEMS_ROOT}/update-tools/310_to_320_list"
 
while getopts sfp:b:v OPT
do
case "$OPT" in
v)
verbose="yes";;
s)
do_prompt="no";;
b)
base_directory=${OPTARG};;
p)
replacement_file=${OPTARG};;
f)
do_files="yes";;
*)
fatal
esac
done
 
let $((shiftcount = $OPTIND - 1))
shift $shiftcount
 
args=$*
 
#
# Make sure they have done a backup
#
 
if [ ${do_prompt} = "yes" ]
then
verify_backup
fi
 
#
# Validate the base directory
#
 
if [ ! -d $base_directory ]
then
fatal "${base_directory} does not exist"
fi
 
#
# Validate the replacement file
#
 
if [ ! -r $replacement_file ]
then
fatal "${replacement_file} does not exist or is not readable"
fi
 
 
#
# Verify enough of the RTEMS environment variables are set
#
 
if [ ! -d "${RTEMS_ROOT}" ]
then
fatal "RTEMS_ROOT environment variable is not initialized"
fi
 
#
# Update the files
#
 
generate_list()
{
if [ ${do_files} = "yes" ]
then
for i in $args
do
echo $i
done
else
${find_prog} ${base_directory} \( -name "*.[ch]" -o -name "*.inl" \) -print
fi
}
 
generate_list | ${xargs_prog} |
while read line
do
${RTEMS_ROOT}/update-tools/word-replace -p ${replacement_file} ${line}
if [ $? -ne 0 ]
then
exit 1
fi
for file in ${line}
do
mv ${file}.fixed ${file}
done
done
 
exit 0
 
# Local Variables: ***
# mode:ksh ***
# End: ***
/Makefile.am
0,0 → 1,36
##
## $Id: Makefile.am,v 1.2 2001-09-27 12:02:54 chris Exp $
##
 
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
 
## NOTE: It doesn't make much sense to install these files
 
CLEANFILES = update word-replace
 
if PERL
# All files in this directory depend on having perl.
# Do not handle them if perl is missing.
 
noinst_SCRIPTS = acpolish ampolish cipolish rtems-polish.sh word-replace \
update
 
noinst_DATA = 310_to_320_list
 
update: $(srcdir)/update.in $(top_builddir)/config.status
@cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status; \
chmod 755 $@
word-replace: $(srcdir)/word-replace.in $(top_builddir)/config.status
@cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status; \
chmod 755 $@
 
endif
 
EXTRA_DIST = 310_to_320_list update.in word-replace.in acpolish ampolish \
cipolish rtems-polish.sh
 
include $(top_srcdir)/../../automake/host.am
/word-replace.in
0,0 → 1,89
#!@PERL@
#
# $Id: word-replace.in,v 1.2 2001-09-27 12:02:54 chris Exp $
#
 
eval "exec @PERL@ -S $0 $*"
if $running_under_some_shell;
 
require 'getopts.pl';
&Getopts("p:vh"); # help, pattern file, verbose,
 
if ($opt_h || ! $opt_p) {
print STDERR <<NO_MORE_HELP;
word-replace
 
Replace *words* with patterns. Pattern file specifies which patterns
to replace on each line. All patterns are wrapped with perl \\b regexp
specifiers.
 
Usage: $0 [-v] -p pattern-file files to replace
 
-v -- possibly more verbose
-p file -- pattern file
-h -- help
 
anything else == this help message
 
Pattern file looks like this:
 
# Example:
# ignores all lines with beginning with # or not exactly 2 fields
_Dorky_Name rtems_dorky_name # comments, and blank lines are cool
_Dorky_Name2 rtems_dorky_name2 # comments, and blank lines are cool
NO_MORE_HELP
exit 0;
}
 
$verbose = $opt_v;
$pattern_file = $opt_p;
 
# make standard outputs unbuffered (so the '.'s come out ok)
$oldfh = select(STDERR); $| = 1; select($oldfh);
$oldfh = select(STDOUT); $| = 1; select($oldfh);
 
# pull in the patterns
open(PATTERNS, "<$pattern_file") ||
die "could not open $pattern_file: $!, crapped out at";
 
foreach (<PATTERNS>)
{
chop;
s/#.*//;
next if /^$/;
($orig, $new, $junk, @rest) = split;
next if ( ! $orig || ! $new || $junk); # <2 or >2 patterns
die "pattern appears 2x: '$orig' in '$pattern_file'--" if defined($patterns{$orig});
$patterns{$orig} = $new;
}
close PATTERNS;
 
# walk thru each line in each file
foreach $file (@ARGV)
{
print "$file\t";
 
open (INFILE, "<$file") ||
die "could not open input file $file: $!";
 
$outfile = $file . ".fixed";;
open (OUTFILE, ">$outfile") ||
die "could not open output file $outfile: $!";
 
while (<INFILE>)
{
study; # maybe make s/// faster
foreach $key (keys %patterns)
{
if ( s/\b$key\b/$patterns{$key}/ge )
{
print ".";
}
}
print OUTFILE $_;
}
print "\n";
close INFILE;
close OUTFILE;
}
 
/cipolish
0,0 → 1,247
#!/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
#
 
# $Id: cipolish,v 1.2 2001-09-27 12:02:54 chris Exp $
 
use strict ;
 
my @vars = () ;
my @buffer = () ;
my %var_ ;
 
# find relative up-path to VERSION
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 ) ;
 
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 variable_seen( "RTEMS_PROG_CC_FOR_TARGET" ) )
and ( not variable_seen( "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($$)
{
my $pre = $_[0] ;
my $file= $_[1] ;
 
my $top = "." ;
if (not "$pre") { $pre = "." ; }
 
for ( my $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" ;
}
 
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,'/');
 
$len = $i;
$pwd = substr($pwd,0,$len);
$i = rindex($pwd,'/');
$subdir = substr($pwd,$i+1,$len - 1);
$top_builddir = ".." ;
 
while( -d "$top_builddir" )
{
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 variable_seen($)
{
my $label = "$_[0]" ;
my $res = defined $var_{"$label"};
#print STDERR "SEEN: $label ->$res<\n" ;
return $res ;
}
 
sub define_variable($$)
{
my ($label,@value) = @_ ;
 
if ( not variable_seen("$label") )
{
# print STDERR "DEFINING $label\n" ;
push @vars, "$label" ;
}
 
foreach my $i ( @{value} )
{
push @{$var_{"$label"}}, $i ;
}
}
 
/ampolish
0,0 → 1,531
#!/usr/bin/perl
 
package main ;
 
use strict ;
 
#
# Perl script to beautify and enhance RTEMS automake Makefile.ams
#
# Reads from stdin and writes to stdout
#
# usage:
# <path-to>/ampolish <Makefile.am >Makefile.am~
# mv Makefile.am~ Makefile.am
#
 
my @vars ;
my @conditions = ( "" ) ;
my @buffer = ();
my %var_ ;
 
define_variable( "\$(AUTOMAKE_OPTIONS)", ( "foreign", "1.4" ) );
define_variable( "\$(VPATH)", ( "\@srcdir\@" ) );
 
# find relative up-path to configure.in
my $rtems_cfg = find_file(".","configure.in");
 
# find relative up-path from configure.in to VERSION
my $rtems_top = find_file("$rtems_cfg","VERSION");
 
if ( "$rtems_top" eq "." ) { $rtems_top = "" ; }
else { $rtems_top .= "/" ; }
 
{
# PASS1:
# read input file and concatenate multiple lines into single lines.
 
my @ibuf = () ;
 
while( <STDIN> )
{ # consume header
last if ( /^[^#].*$/ ) ;
push @ibuf, "$_" ;
}
 
 
 
do
{
if ( /^(#.*)$/o )
{ # preserve comments
push @ibuf, "$_" ;
}
elsif ( /^(\t.*)\\[\s]*$/o )
{ # multilines for scripts
 
while( <STDIN> )
{
if ( /^(.*)\\[\s]*$/o )
{
 
}
else
{
$line .= "$_" ;
push @ibuf, $line ;
last ;
}
}
}
elsif ( /^(.*)\\[\s]*$/o )
{ # multilines
my $line = "$1" ;
while( <STDIN> )
{
if ( /^(.*)\\[\s]*$/o )
{
$line .= "$1" ;
}
else
{
$line .= "$_" ;
$line =~ s%[\s]+% %g ;
push @ibuf, "$line\n" ;
last ;
}
}
}
else
{
push @ibuf, "$_" ;
}
} while ( <STDIN> ) ;
@buffer = @ibuf ;
}
 
{
# PASS2:
# fix obsolete constructs
my @ibuf = () ;
 
foreach ( @buffer )
{
# tr /\{\}/\(\)/ ;
 
if ( /^(TMP|PRE)INSTALL_FILES[\s]*=(.*)$/o )
{ # force "+="
push @ibuf, "$1INSTALL_FILES +=$2\n" ;
}
elsif ( /^(VPATH|EXTRA_DIST)[\s]*\+=(.*)$/o )
{ # force "="
push @ibuf, "$1 = $2\n" ;
}
elsif ( /^[\s]*ACLOCAL[\s]*=[\s]*\@ACLOCAL\@.*$/o )
{ # remove the line
}
elsif ( /^[\s]*(ACLOCAL_AMFLAGS)[\s\t]*[\+]*=[\s]*(.*)[\s]*$/o )
{ # remove the line
}
elsif ( /^[\s]*(AM_CFLAGS)[\s\t]*[\+]*=[\s]*\$\(CFLAGS_OS_V\)[\s]*$/o )
{ # remove the line
}
elsif ( /^[\s]*debug-am:.*$/o )
{ # remove the line
}
elsif ( /^[\s]*all(\-am):(.*)$/o )
{ # replace the line
push @ibuf, "all-local:$2\n" ;
}
elsif ( /^[\s]*profile-am:.*$/o )
{ # remove the line
}
elsif ( /^[\s]*include[\s\t]*\$\(RTEMS_ROOT\)\/make\/lib.cfg[\s]*$/o )
{
push @ibuf, "include \$(top_srcdir)/${rtems_top}automake/lib.am\n" ;
}
elsif ( /^(.*[^\s])[\s]*$/o )
{ # remove trailing spaces
push @ibuf, "$1\n" ;
}
else
{
push @ibuf, "$_" ;
}
}
@buffer = @ibuf ;
}
 
# print STDERR "<tmp>\n", @buffer, "</tmp>\n" ;
 
{
my @ibuf = () ;
foreach ( @buffer )
{
if ( /^#(.*)$/o )
{
push @ibuf, "#$1\n" ;
}
elsif ( /^[\s]*if[\s\t]+([a-zA-Z0-9_]+)[\s\t]*$/o )
{
push @conditions, "\@" . $1 . "_TRUE\@" ;
push @ibuf, "if $1\n" ;
}
elsif ( /^[\s]*else[\s\t]*$/o )
{
@conditions[$#conditions] =~ s/_TRUE\@$/_FALSE\@/;
push @ibuf, "else\n" ;
}
elsif ( /^[\s]*endif[\s\t]*$/o )
{
pop @conditions ;
push @ibuf, "endif\n" ;
}
 
{
push @ibuf, "$_" ;
}
elsif ( /^[\s]*(VPATH)[\s\t]*([\+]*)=[\s]*(.*)[\s]*$/o )
{
my $lh = "\$($1)" ;
my @rh = split( /:/,"$3");
if ( $#conditions > 0 )
{
print STDERR "WARNING: $1 must not be set inside of conditionals!\n"
}
define_variable( "$lh", @rh );
 
}
elsif ( /^[\s]*(AUTOMAKE_OPTIONS)[\s\t]*([\+]*)=[\s]*(.*)$/o )
{
my $lh = "\$($1)" ;
my @rh = &split_vars("$3");
 
if ( $#conditions > 0 )
{
print STDERR "WARNING: $1 must not be set inside of conditionals!\n"
}
 
define_variable( "$lh", @rh );
}
elsif ( /^[\s]*([a-zA-Z0-9_]+)[\s\t]*([\+]*)=[\s]*(.*)$/o )
{
my $lh = join ('',@conditions) . "\$($1)" ;
my @rh = &split_vars("$3");
my $seen = variable_seen( "$lh" ) ;
 
if ( $#conditions > 0 )
{
define_variable( "\$($1)", () );
}
 
define_variable( "$lh", @rh );
 
if ( not $seen )
{
 
}
}
elsif ( /^[\s]*include[\s\t]*\$\(top_srcdir\)[\.\/]*automake\/(.*)\.am$/o )
{
if ( "$1" eq "lib" )
{
push @ibuf, "include \$(top_srcdir)/${rtems_top}automake/$1.am\n" ;
}
elsif ( "$1" eq "local" )
{
$main::seen_local = 1 ;
}
elsif ( "$1" eq "host" )
{
$main::seen_host = 1 ;
}
}
elsif ( /^[\s]*include[\s\t]*(.*)$/o )
{
push @ibuf, "include $1\n" ;
}
elsif ( /^\t(.*)$/o )
{
push @ibuf, "\t$1\n" ;
}
elsif ( /^(.*)\:(.*)$/o )
{
push @ibuf, "$1:$2\n" ;
}
elsif ( /^[\s]*$/o )
{
push @ibuf, "\n" ;
}
else
{
die "ERROR: Don't know how to handle <$_>" ;
}
} # for
@buffer = @ibuf ;
} # while
 
die "Conditional stack corrupted" if ( $#conditions != 0 );
 
foreach( @vars )
{
purge( \@{$var_{"$_"}} );
}
 
# print STDERR "<tmp>\n", @buffer, "</tmp>\n" ;
 
 
{
my @ibuf = () ;
foreach( @buffer )
{
if ( /^#.*$/o )
{
push @ibuf, "$_" ;
}
 
{
my $l = $var_{"\$(AUTOMAKE_OPTIONS)"} ;
push @ibuf, "\nAUTOMAKE_OPTIONS = @{$l}\n" ;
if ( "$rtems_cfg" eq "." )
{
push @ibuf, "ACLOCAL_AMFLAGS = -I \$(RTEMS_TOPdir)/aclocal\n" ;
}
if ( defined( @{$var_{"\$(VPATH)"}} ) )
{
if ( $#{$var_{"\$(VPATH)"}} > 0 )
{
my $l = join (':',@{$var_{"\$(VPATH)"}}) ;
push @ibuf, "\nVPATH = $l\n" ;
}
}
push @ibuf, "\n" ;
}
 
{
print_var(\@ibuf, "$3 $1=", $var_{"$2\$($3)"}) ;
}
elsif ( /^\t.*$/o )
{
&print_script(\@ibuf, "$_");
}
elsif ( /^[\s]*if[\s]+([a-zA-Z0-9_]+)[\s\t]*$/o )
{
push @conditions, "\@$1_TRUE\@" ;
push @ibuf, "if $1\n" ;
}
elsif ( /^[\s]*else[\s]*$/o )
{
@conditions[$#conditions] =~ s/_TRUE\@$/_FALSE\@/;
push @ibuf, "else\n" ;
}
elsif ( /^[\s]*endif[\s]*$/o )
{
pop @conditions ;
push @ibuf, "endif\n" ;
}
else
{
print_line(\@ibuf,$_);
}
}
 
if ( variable_seen("\$(SUBDIRS)") )
{
push @ibuf, "include \$(top_srcdir)/${rtems_top}automake/subdirs.am\n" ;
}
 
if ( defined( $main::seen_host ) )
{
push @ibuf, "include \$(top_srcdir)/${rtems_top}automake/host.am\n" ;
}
else
{
push @ibuf, "include \$(top_srcdir)/${rtems_top}automake/local.am\n" ;
}
 
@buffer = @ibuf ;
}
 
#print STDERR "<tmp>\n", @buffer, "</tmp>\n" ;
 
{ ## 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 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 ( my $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" ;
}
 
sub variable_seen($)
{
my $label = "$_[0]" ;
my $res = defined $var_{"$label"};
#print STDERR "SEEN: $label ->$res<\n" ;
return $res ;
}
 
sub define_variable($$)
{
my ($label,@value) = @_ ;
 
if ( not variable_seen("$label") )
{
#print STDERR "DEFINING: $label\n" ;
push @vars, "$label" ;
}
 
foreach my $i ( @{value} )
{
push @{$var_{"$label"}}, $i ;
}
}
 
# Strip off duplicate entries from a list
sub purge($)
{
my $list = $_[0] ; # Reference to list !
my (@tmp) = () ;
 
foreach my $l ( @{$list} )
{
my $i = 1 ;
foreach my $t (@tmp)
{
if ( $t eq $l )
{
$i = 0 ;
last ;
}
}
push @tmp,$l if ($i) ;
}
 
@{$list} = @tmp ;
}
 
#
# Break the right hand side of a variable assignment into separate chunks
#
sub split_vars($)
{
my $line = $_[0] ;
my (@buf) = split(//,"$line") ;
 
my $begin = 0 ;
my @res = () ;
 
my $depth = 0 ;
my $state = 0 ;
 
my $len = $#buf + 1 ;
for ( my $i = 0 ; $i < $len ; $i++ )
{
my $c = @buf[$i] ;
if ( $state == 0 )
{
if ( "$c" ne " " )
{ # token
$begin = $i ;
$state++ ;
}
if ( "$c" eq "\$" )
{ # variable
$depth++ ;
}
}
elsif ( $state == 1 )
{
if ( ( "$c" eq "\)" ) or ( "$c" eq "\}" ) )
{ # variable
$depth-- ;
}
elsif ( ("$c" eq " " ) and ( $depth == 0 ) )
{
push @res, substr($line,$begin,$i-$begin);
$state-- ;
}
elsif ( "$c" eq "\$" )
{ # variable
$depth++ ;
}
}
else
{
die "split_vars: unknown mode\n" ;
}
}
 
if ( $state > 0 )
{
push @res, substr($line,$begin,$len-$begin);
$state = 0
}
return @res ;
}
 
sub print_var($$$)
{
my ($ibuf,$line,$l) = @_ ; # $l .. reference to list
 
foreach (@{$l}) {
if ( ( length($line) + length($_) ) < 76 )
{
$line .= " $_";
}
else
{
push @{$ibuf}, "$line \\\n";
$line = " $_" ;
}
}
push @{$ibuf}, "$line\n" ;
}
 
sub print_line($$)
{
my ($ibuf,$input) = @_ ;
my @l = split( / /, $input );
my $line = shift @l ;
 
foreach my $i (@l) {
if ( ( length($line) + length($i) ) < 76 )
{
$line .= " $i";
}
else
{
push @{$ibuf}, "$line \\\n";
$line = " $i" ;
}
}
push @{$ibuf}, "$line" ;
}
 
sub print_script($$)
{
my ($ibuf,$input) = @_ ;
 
push @{$ibuf}, $input ;
}
/README
0,0 → 1,7
#
# $Id: README,v 1.2 2001-09-27 12:02:54 chris Exp $
#
 
This directory contains tools which aid in upgrading from RTEMS 3.1.0
to RTEMS 3.2.0.
 

powered by: WebSVN 2.1.0

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