[PATCH] build: Remove ampolish3
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Dec 13 08:43:15 UTC 2018
Update #3254.
---
ampolish3 | 274 -------------------------
c/src/aclocal/project-root.m4 | 2 -
c/src/aclocal/rtems-ampolish.m4 | 10 -
c/src/lib/libbsp/powerpc/mvme3100/configure.ac | 4 -
cpukit/aclocal/rtems-ampolish.m4 | 10 -
cpukit/configure.ac | 2 -
6 files changed, 302 deletions(-)
delete mode 100755 ampolish3
delete mode 100644 c/src/aclocal/rtems-ampolish.m4
delete mode 100644 cpukit/aclocal/rtems-ampolish.m4
diff --git a/ampolish3 b/ampolish3
deleted file mode 100755
index 67f2d23cab..0000000000
--- a/ampolish3
+++ /dev/null
@@ -1,274 +0,0 @@
-#! /usr/bin/env perl
-#
-# Copyright (C) 2005, 2006 Ralf Corsépius, Ulm, Germany
-#
-# Permission to use, copy, modify, and distribute this software
-# is freely granted, provided that this notice is preserved.
-
-# Helper script to generate pre/tmpinstall rules for RTEMS Makefile.am.
-#
-# Usage: ampolish3 Makefile.am > preinstall.am
-#
-# Reads a Makefile.am from stdin and writes corresponding
-# pre/tmpinstall rules to stdout.
-
-sub replace($);
-sub print_dirstamp($$$);
-
-# Predefined directory mappings:
-#
-# final-installation directory => temp installation directory
-my %dirmap = (
- '$(includedir)' => '$(PROJECT_INCLUDE)',
- '$(libdir)' => '$(PROJECT_LIB)',
- '$(project_libdir)' => '$(PROJECT_LIB)',
- '$(project_includedir)' => '$(PROJECT_INCLUDE)'
- );
-
-# Conventions on automake primaries:
-#
-# *_HEADERS -> preinstall
-# noinst*_HEADERS -> noinst
-# noinst_*_LIBRARIES -> noinst
-# project_*_LIBRARIES -> tmpinstall
-# *_LIBRARIES -> ignore (no preinstallation)
-# dist_project_*_DATA -> preinstall (linkcmds, etc)
-# project_*_DATA -> tmpinstall (*.o, *.a)
-# dist_*_DATA -> ignore (no preinstallation)
-# *SCRIPTS -> ignore (no preinstallation)
-# noinst_*_PROGRAMS -> noinst
-# project_*_PROGRAMS -> tmpinstall
-# *_PROGRAMS -> ignore (no preinstallation)
-
-## 1st pass: read in file
-my @buffer1 = () ;
-my %seen = ();
-my %predefs = ();
-
-{
- my $mode = 0 ;
- my $line = '';
-
- while ( <> )
- {
- if ( $mode == 0 )
- {
- if ( /^([a-zA-Z0-9_]+\s*[\+]?[:=].*)\\$/o )
- {
- $line = "$1" ;
- $mode = 1;
- } else {
- push @buffer1, $_ ;
- }
- } elsif ( $mode == 1 ) {
- if ( /^(.*)\\$/o ) {
- $line .= $1;
- } else {
- $line .= $_ ;
- push @buffer1, $line ;
- $line = '';
- $mode = 0 ;
- }
- }
- }
-}
-
-#foreach my $l ( @buffer1 ) { print STDERR "1:<$l>"; }
-
-# Filter out all Makefile code not relevant here
-my @buffer2 = ();
-foreach my $l ( @buffer1 ) {
- if ( $l=~ /^\t.*$/o )
- { #ignore: Production of a make rule.
- } elsif ( $l =~ /^\s*([a-zA-Z0-9_]*dir)\s*\=\s*(.*)\s*$/o )
- { # dirs
- push @buffer2, "$l";
- $dirmap{"\$\($1\)"} = replace($2);
- } elsif ( $l =~ /^\s*noinst_(.*)\s*[\+]?\=(.*)$/o )
- {
- #ignore: noinst_* are not relevant here.
- } elsif ( $l =~ /^\s*(nodist_|dist_|)(project_|)([a-zA-Z0-9_]+)_(HEADERS|LIBRARIES|DATA|SCRIPTS|PROGRAMS)\s*([\+]?\=)\s*(.*)/o )
- {
- if ( ( "$5" eq '=' ) ) {
- my $v = $dirmap{"\$\($3dir\)"};
- if ( $v =~ /\$\(PROJECT_[^\)]+\)$/ )
- {
- $predefs{"$v"} = 1;
- }
- }
- foreach my $f ( split(' ',$6) ) {
- push @buffer2, "$1$2$3_$4 +=$f\n";
- }
- } elsif ( $l =~ /^\s*(if|else|endif)\s*.*$/o )
- { # conditionals
- push @buffer2, "$l";
- }
-
- # Check if Makefile.am already contains CLEANFILES or DISTCLEANFILES
- if ( $l =~ /^\s*(CLEANFILES|DISTCLEANFILES|SUBDIRS)\s*\=.*$/o )
- {
- $predefs{"$1"} = 1;
- }
-}
-
-if ( $predefs{"\$(PROJECT_INCLUDE)"} ){
- unshift @buffer2, "includedir = \$(includedir)\n";
-}
-if ( $predefs{"\$(PROJECT_LIB)"} ){
- unshift @buffer2, "libdir = \$(libdir)\n";
-}
-
-# foreach my $l ( @buffer2 ) { print STDERR "2:<$l>"; }
-
-my @buffer3 = ();
-
-foreach my $l ( @buffer2 ) {
- if ( $l =~ /^\s*([a-zA-Z0-9_]*dir)\s*\=\s*(.*)\s*$/o )
- { # dirs
- my $v = $dirmap{"\$\($1\)"};
- print_dirstamp(\@buffer3,$v,"PREINSTALL_DIRS");
- $seen{"PREINSTALL_DIRS"} = 1;
- } elsif ( $l =~ /^\s*(nodist_|dist_|)(project_|)([a-zA-Z0-9_]+)_HEADERS\s*\+\=(.*)/o )
- { # preinstall
- my $v = $dirmap{"\$\($3dir\)"};
- my $f = $4;
- my $x ; my $i = rindex($f,'/');
- if ($i < 0) { $x="$f";
- } else { $x = substr($f,$i+1);
- }
- push @buffer3,
- "$v/$x: $f $v/\$(dirstamp)\n",
- "\t\$(INSTALL_DATA) \$< $v/$x\n",
- "PREINSTALL_FILES += $v/$x\n\n";
- $seen{"PREINSTALL_FILES"} = 1;
- } elsif ( $l =~ /^\s*(nodist_|dist_|)(project_)([a-zA-Z0-9_]+)_LIBRARIES\s*\+\=(.*)/o )
- { # tmpinstall
- my $v = $dirmap{"\$\($3dir\)"};
- my $f = $4;
- my $x ; my $i = rindex($f,'/');
- if ($i < 0) { $x="$f";
- } else { $x = substr($f,$i+1);
- }
- push @buffer3,
- "$v/$x: $f $v/\$(dirstamp)\n",
- "\t\$(INSTALL_DATA) \$< $v/$x\n",
- "TMPINSTALL_FILES += $v/$x\n\n";
- $seen{"TMPINSTALL_FILES"} = 1;
- } elsif ( $l =~ /^\s*(nodist_|dist_|)([a-zA-Z0-9_]+)_LIBRARIES\s*\+\=(.*)/o )
- { # ignore
- } elsif ( $l =~ /^\s*(dist_)(project_)([a-zA-Z0-9_]+)_DATA\s*\+\=(.*)/o )
- { # preinstall
- my $v = $dirmap{"\$\($3dir\)"};
- my $f = $4;
- my $x ; my $i = rindex($f,'/');
- if ($i < 0) { $x="$f";
- } else { $x = substr($f,$i+1);
- }
- push @buffer3,
- "$v/$x: $f $v/\$(dirstamp)\n",
- "\t\$(INSTALL_DATA) \$< $v/$x\n",
- "PREINSTALL_FILES += $v/$x\n\n";
- $seen{"PREINSTALL_FILES"} = 1;
- } elsif ( $l =~ /^\s*(nodist_|)(project_)([a-zA-Z0-9_]+)_DATA\s*\+\=(.*)/o )
- { # tmpinstall
- my $v = $dirmap{"\$\($3dir\)"};
- my $f = $4;
- my $x ; my $i = rindex($f,'/');
- if ($i < 0) { $x="$f";
- } else { $x = substr($f,$i+1);
- }
- push @buffer3,
- "$v/$x: $f $v/\$(dirstamp)\n",
- "\t\$(INSTALL_DATA) \$< $v/$x\n",
- "TMPINSTALL_FILES += $v/$x\n\n";
- $seen{"TMPINSTALL_FILES"} = 1;
- } elsif ( $l =~ /^\s*(dist_|)([a-zA-Z0-9_]+)_DATA\s*\+\=(.*)/o )
- { # ignore
- } elsif ( $l =~ /^\s*(nodist_|dist_|)([a-zA-Z0-9_]+)_SCRIPTS\s*\+\=(.*)/o )
- { # ignore
- } elsif ( $l =~ /^\s*(nodist_|dist_|)(project_)([a-zA-Z0-9_]+)_PROGRAMS\s*\+\=(.*)/o )
- { # tmpinstall
- my $v = $dirmap{"\$\($3dir\)"};
-
- my $f = $4;
- my $x ; my $i = rindex($f,'/');
- if ($i < 0) { $x="$f";
- } else { $x = substr($f,$i+1);
- }
- push @buffer3,
- "$v/$x: $f $v/\$(dirstamp)\n",
- "\t\$(INSTALL_PROGRAM) \$< $v/$x\n",
- "TMPINSTALL_FILES += $v/$x\n\n";
- $seen{"TMPINSTALL_FILES"} = 1;
- } elsif ( $l =~ /^\s*(nodist_|dist_|)([a-zA-Z0-9_]+)_PROGRAMS\s*\+\=(.*)/o )
- { # ignore
- } elsif ( $l =~ /^\s*(if|else|endif)\s*.*$/o )
- { # conditionals
- push @buffer3, "$l";
- }
-}
-
-# foreach my $l ( @buffer3 ) { print STDERR "3:<$l>"; }
-
-my $output;
-$output .= "## Automatically generated by ampolish3 - Do not edit\n\n";
-$output .= "if AMPOLISH3\n";
-$output .= "\$(srcdir)/preinstall.am: Makefile.am\n";
-$output .= "\t\$(AMPOLISH3) \$(srcdir)/Makefile.am > \$(srcdir)/preinstall.am\n";
-$output .= "endif\n\n";
-
-foreach my $k ( sort keys %seen )
-{
- if ( $k =~ /PREINSTALL_FILES/o ) {
- $output .= "all-am: \$(PREINSTALL_FILES)\n\n";
-
- $output .= "$k =\n";
- $output .= "CLEANFILES ";
- if ( $predefs{"CLEANFILES"} ) { $output .= "+"; }
- $output .= "= \$($k)\n";
- $predefs{"CLEANFILES"} = 1;
- } elsif ( $k =~ /TMPINSTALL_FILES/o ) {
-
- $output .= "all-local: \$(TMPINSTALL_FILES)\n\n";
-
- $output .= "$k =\n";
- $output .= "CLEANFILES ";
- if ( $predefs{"CLEANFILES"} ) { $output .= "+"; }
- $output .= "= \$($k)\n";
- $predefs{"CLEANFILES"} = 1;
- } elsif ( $k =~ /.*DIRS/o ) {
- $output .= "$k =\n";
- $output .= "DISTCLEANFILES ";
- if ( $predefs{"DISTCLEANFILES"} ) { $output .= "+"; }
- $output .= "= \$($k)\n";
- $predefs{"DISTCLEANFILES"} = 1;
- }
- $output .= "\n";
-}
-
-# Pretty printing
-$output .= join ( '', @buffer3 );
-$output =~ s/\nelse\n+endif/\nendif/g;
-$output =~ s/\n\n+endif/\nendif/g;
-$output =~ s/\nif [a-zA-Z0-9_!]+\n+endif//g;
-print STDOUT $output;
-
-exit 0;
-
-sub replace($)
-{
- my ($v) = @_;
- foreach my $i ( sort keys %dirmap )
- {
- $v =~ s/\Q$i/$dirmap{$i}/g;
- }
- return $v;
-}
-
-sub print_dirstamp($$$)
-{
- my ($obuf,$file,$inst) = @_ ;
- push @{$obuf}, "$file/\$(dirstamp):\n\t\@\$\(MKDIR_P\) $file\n" ;
- push @{$obuf}, "\t\@: \> $file/\$(dirstamp)\n" ;
- push @{$obuf}, "$inst += $file/\$(dirstamp)\n\n" ;
-}
diff --git a/c/src/aclocal/project-root.m4 b/c/src/aclocal/project-root.m4
index a3f5cd3684..dc9ba597bf 100644
--- a/c/src/aclocal/project-root.m4
+++ b/c/src/aclocal/project-root.m4
@@ -1,6 +1,4 @@
AC_DEFUN([RTEMS_PROJECT_ROOT],
[dnl
AC_REQUIRE([RTEMS_TOP])
-AC_REQUIRE([RTEMS_AMPOLISH3])
])
-
diff --git a/c/src/aclocal/rtems-ampolish.m4 b/c/src/aclocal/rtems-ampolish.m4
deleted file mode 100644
index feb9ad20ee..0000000000
--- a/c/src/aclocal/rtems-ampolish.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-AC_DEFUN([RTEMS_AMPOLISH3],
-[
-AC_REQUIRE([AM_INIT_AUTOMAKE])
-AC_PATH_PROG([PERL],[perl],[])
-AC_SUBST(AMPOLISH3,["\$(PERL) ${am_aux_dir}/ampolish3"])
-AM_CONDITIONAL([AMPOLISH3],
-[test x"$USE_MAINTAINER_MODE" = x"yes" \
- && test -n "${PERL}"])
-])
-
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/configure.ac b/c/src/lib/libbsp/powerpc/mvme3100/configure.ac
index 2bf0e4082b..8b9a04f096 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/configure.ac
+++ b/c/src/lib/libbsp/powerpc/mvme3100/configure.ac
@@ -17,10 +17,6 @@ RTEMS_CHECK_TOOL(NM,nm,no)
AS=$CC
AM_PROG_AS
-dnl AC_PATH_PROG([AMPOLISH3],[ampolish3],[])
-dnl AM_CONDITIONAL([AMPOLISH3],[test x"$USE_MAINTAINER_MODE" = x"yes" \
-dnl && test -n "$AMPOLISH3"])
-
RTEMS_BSPOPTS_SET_DATA_CACHE_ENABLED([*],[1])
RTEMS_BSPOPTS_HELP_DATA_CACHE_ENABLED
diff --git a/cpukit/aclocal/rtems-ampolish.m4 b/cpukit/aclocal/rtems-ampolish.m4
deleted file mode 100644
index 6088dddb6b..0000000000
--- a/cpukit/aclocal/rtems-ampolish.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-AC_DEFUN([RTEMS_AMPOLISH3],
-[
-AC_REQUIRE([AM_MAINTAINER_MODE])
-AC_PATH_PROG([PERL],[perl],[])
-AC_SUBST(AMPOLISH3,["\$(PERL) ${am_aux_dir}/ampolish3"])
-AM_CONDITIONAL([AMPOLISH3],
-[test x"$USE_MAINTAINER_MODE" = x"yes" \
- && test -n "${PERL}"])
-])
-
diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index f257db3f7f..61f2335905 100644
--- a/cpukit/configure.ac
+++ b/cpukit/configure.ac
@@ -376,8 +376,6 @@ AM_CONDITIONAL([CPU_SPARC],[test $RTEMS_CPU = "sparc"])
AM_CONDITIONAL([CPU_V850],[test $RTEMS_CPU = "v850"])
AM_CONDITIONAL([CPU_X86_64],[test $RTEMS_CPU = "x86_64"])
-RTEMS_AMPOLISH3
-
# Explicitly list all Makefiles here
AC_CONFIG_FILES([
Doxyfile
--
2.16.4
More information about the devel
mailing list