[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dependency tracking of pre processed Assembler files
From: |
Ralf Wildenhues |
Subject: |
Re: Dependency tracking of pre processed Assembler files |
Date: |
Sat, 14 Oct 2006 07:10:03 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Updated patches (added test for no-dependencies), plus an additional
typo in the manual. OK?
Cheers,
Ralf
2006-10-14 Ralf Wildenhues <address@hidden>
* automake.in (%_macro_for_cond): New variable.
(cond_stack_if): Use it for better error message about
missing dependency tracking conditionals.
* tests/asm2.test: New test, modeled after asm.test.
* tests/Makefile.am: Adjust.
Report by Ralf Corsepius.
* doc/automake.texi (Options): `no-dependencies' is similar
to `--ignore-deps', not `--include-deps'.
* m4/as.m4 (AM_PROG_AS): If `no-dependencies', do not invoke
_AM_DEPENDENCIES.
* tests/nodep2.test: New test.
* tests/Makefile.am: Adjust.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1632
diff -u -r1.1632 automake.in
--- automake.in 10 Oct 2006 21:34:11 -0000 1.1632
+++ automake.in 14 Oct 2006 05:08:28 -0000
@@ -5722,6 +5722,19 @@
}
+my %_am_macro_for_cond =
+ (
+ AMDEP => "one of the compiler tests\n"
+ . " AC_PROG_CC, AC_PROG_CXX, AC_PROG_CXX, AC_PROG_OBJC,\n"
+ . " AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC",
+ am__fastdepCC => 'AC_PROG_CC',
+ am__fastdepCCAS => 'AM_PROG_AS',
+ am__fastdepCXX => 'AC_PROG_CXX',
+ am__fastdepGCJ => 'AM_PROG_GCJ',
+ am__fastdepOBJC => 'AC_PROG_OBJC',
+ am__fastdepUPC => 'AM_PROG_UPC'
+ );
+
# $COND
# cond_stack_if ($NEGATE, $COND, $WHERE)
# --------------------------------------
@@ -5729,8 +5742,22 @@
{
my ($negate, $cond, $where) = @_;
- error $where, "$cond does not appear in AM_CONDITIONAL"
- if ! $configure_cond{$cond} && $cond !~ /^TRUE|FALSE$/;
+ if (! $configure_cond{$cond} && $cond !~ /^TRUE|FALSE$/)
+ {
+ my $text = "$cond does not appear in AM_CONDITIONAL";
+ my $scope = US_LOCAL;
+ if (exists $_am_macro_for_cond{$cond})
+ {
+ my $mac = $_am_macro_for_cond{$cond};
+ $text .= "\n The usual way to define `$cond' is to add ";
+ $text .= ($mac =~ / /) ? $mac : "`$mac'";
+ $text .= "\n to `$configure_ac' and run `aclocal' and `autoconf'
again.";
+ # These warnings appear in Automake files (depend2.am),
+ # so there is no need to display them more than once:
+ $scope = US_GLOBAL;
+ }
+ error $where, $text, uniq_scope => $scope;
+ }
push (@cond_stack, make_conditional_string ($negate, $cond));
Index: doc/automake.texi
===================================================================
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.150
diff -u -r1.150 automake.texi
--- doc/automake.texi 28 Aug 2006 16:04:24 -0000 1.150
+++ doc/automake.texi 14 Oct 2006 05:08:34 -0000
@@ -8501,7 +8501,7 @@
@item @option{no-dependencies}
@cindex Option, @option{no-dependencies}
@opindex no-dependencies
-This is similar to using @option{--include-deps} on the command line,
+This is similar to using @option{--ignore-deps} on the command line,
but is useful for those situations where you don't have the necessary
bits to make automatic dependency tracking work
(@pxref{Dependencies}). In this case the effect is to effectively
Index: m4/as.m4
===================================================================
RCS file: /cvs/automake/automake/m4/as.m4,v
retrieving revision 1.10
diff -u -r1.10 as.m4
--- m4/as.m4 9 Jan 2005 14:46:21 -0000 1.10
+++ m4/as.m4 14 Oct 2006 05:08:34 -0000
@@ -1,12 +1,12 @@
# Figure out how to run the assembler. -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
+# serial 5
# AM_PROG_AS
# ----------
@@ -17,5 +17,5 @@
test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
-_AM_DEPENDENCIES([CCAS])
+_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
])
cvs diff: Diffing tests
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.609
diff -u -r1.609 Makefile.am
--- tests/Makefile.am 30 Aug 2006 20:35:56 -0000 1.609
+++ tests/Makefile.am 14 Oct 2006 05:08:34 -0000
@@ -55,6 +55,7 @@
ar.test \
ar2.test \
asm.test \
+asm2.test \
autohdr.test \
autohdr2.test \
autohdr3.test \
@@ -371,6 +372,7 @@
nodef.test \
nodef2.test \
nodep.test \
+nodep2.test \
nodepcomp.test \
nodist.test \
nodist2.test \
--- /dev/null 2006-10-09 01:10:44.864355000 +0200
+++ tests/asm2.test 2006-10-14 07:07:58.000000000 +0200
@@ -0,0 +1,138 @@
+#! /bin/sh
+# Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Test of basic preprocessed assembly functionality
+
+. ./defs || exit 1
+
+set -e
+
+cat > Makefile.am << 'END'
+noinst_PROGRAMS = maude
+maude_SOURCES = maude.S
+END
+
+: > maude.s
+
+# Should fail because we need CC and CCAS.
+echo 1
+cat > configure.in << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_SUBST(CCASFLAGS)
+AC_OUTPUT(Makefile)
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep AM_PROG_AS stderr
+
+# On fast machines the autom4te.cache created during the above run of
+# $AUTOMAKE is likely to have the same time stamp as the configure.in
+# created below; thus causing traces for the old configure.in to be
+# used. We could do `$sleep', but it's faster to erase the
+# directory. (Erase autom4te*.cache, not autom4te.cache, because some
+# bogus installations of Autoconf use a versioned cache.)
+rm -rf autom4te*.cache
+
+# We still need CCAS.
+echo 2
+cat > configure.in << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_PROG_CC
+AC_SUBST(CCASFLAGS)
+AC_OUTPUT(Makefile)
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep CCAS stderr
+grep AM_PROG_AS stderr
+
+rm -rf autom4te*.cache
+
+# We need CCASFLAGS.
+echo 3
+cat > configure.in << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+CCAS='$(CC)'
+AC_SUBST(CCAS)
+AC_PROG_CC
+AC_OUTPUT(Makefile)
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep CCASFLAGS stderr
+grep AM_PROG_AS stderr
+
+rm -rf autom4te*.cache
+
+# We need dependency tracking.
+echo 4
+cat > configure.in << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+CCAS='$(CC)'
+AC_SUBST(CCAS)
+AC_PROG_CC
+AC_SUBST(CCASFLAGS)
+AC_OUTPUT(Makefile)
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep AM_PROG_AS stderr
+
+rm -rf autom4te*.cache
+
+# We have every needed, expect a success.
+echo 5
+cat > configure.in << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+CCAS='$(CC)'
+AC_SUBST(CCAS)
+AC_PROG_CC
+_AM_DEPENDENCIES(CCAS)
+AC_SUBST(CCASFLAGS)
+AC_OUTPUT(Makefile)
+END
+
+$ACLOCAL
+$AUTOMAKE
+
+rm -rf autom4te*.cache
+
+# We have every needed, expect a success.
+echo 6
+cat > configure.in << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AM_PROG_AS
+AC_OUTPUT(Makefile)
+END
+
+$ACLOCAL
+$AUTOMAKE
+
+exit 0
--- /dev/null 2006-10-09 01:10:44.864355000 +0200
+++ tests/nodep2.test 2006-10-14 07:07:58.000000000 +0200
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 2006 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Another test to make sure no-dependencies option does the right thing.
+
+. ./defs || exit 1
+
+set -e
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES = a.c b.cpp c.m d.S e.java f.upc
+END
+
+cat > configure.in << 'END'
+AC_INIT([nodep2], [1], address@hidden)
+AM_INIT_AUTOMAKE([no-dependencies])
+AC_CONFIG_FILES([Makefile])
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_OBJC
+AM_PROG_AS
+AM_PROG_GCJ
+AM_PROG_UPC
+AC_OUTPUT
+END
+
+: > a.c
+: > b.cpp
+: > c.m
+: > d.S
+: > e.java
+: > f.upc
+
+$ACLOCAL
+$AUTOMAKE
+
+grep DEPMODE Makefile.in && exit 1
+: