[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-
From: |
Ralf Wildenhues |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-10-152-g441ec0a |
Date: |
Tue, 17 Jun 2008 22:17:25 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=441ec0a6081852ccd02cf6c3e2515f4605a44f5a
The branch, master has been updated
via 441ec0a6081852ccd02cf6c3e2515f4605a44f5a (commit)
from 30105086b1ee8176f5e7a5304a1ecf5ee6e60e3f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 441ec0a6081852ccd02cf6c3e2515f4605a44f5a
Author: Ralf Wildenhues <address@hidden>
Date: Wed Jun 18 00:16:25 2008 +0200
Fix conditional rules competing with config.status rules.
* automake.in (handle_configure): Teach targets about the
conditional config.status rule.
* tests/cond39.test: Adjust test to expose this.
Signed-off-by: Ralf Wildenhues <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 ++++
automake.in | 9 ++++++-
tests/cond39.test | 57 ++++++++++++++++++++++++++++++++++++++++------------
3 files changed, 56 insertions(+), 15 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 927437d..0742b75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2008-06-18 Ralf Wildenhues <address@hidden>
+ Fix conditional rules competing with config.status rules.
+ * automake.in (handle_configure): Teach targets about the
+ conditional config.status rule.
+ * tests/cond39.test: Adjust test to expose this.
+
For AC_CONFIG_LINKS(X,X), do not clean X in a non-VPATH build.
* automake.in (rewrite_inputs_into_dependencies): Do distribute
inputs where input and output name are equal. This relies on
diff --git a/automake.in b/automake.in
index dc431fe..c49045f 100755
--- a/automake.in
+++ b/automake.in
@@ -4201,8 +4201,13 @@ sub handle_configure ($$$@)
next if (substitute_ac_subst_variables $local) =~ /\$/;
my $condstr = '';
- $condstr = $ac_config_files_condition{$lfile}->subst_string
- if ($ac_config_files_condition{$lfile});
+ my $cond = $ac_config_files_condition{$lfile};
+ if (defined $cond)
+ {
+ $condstr = $cond->subst_string;
+ Automake::Rule::define ($local, $configure_ac, RULE_AUTOMAKE, $cond,
+ $ac_config_files_location{$file});
+ }
$output_rules .= ($condstr . $local . ': '
. '$(top_builddir)/config.status '
. "@rewritten_inputs\n"
diff --git a/tests/cond39.test b/tests/cond39.test
index 93f0363..1431ed1 100755
--- a/tests/cond39.test
+++ b/tests/cond39.test
@@ -23,24 +23,44 @@
. ./defs
set -e
+mkdir sub
+
cat >>configure.in <<'END'
AC_PROG_CC
AM_CONDITIONAL([COND], [test "$COND" = true])
AM_COND_IF([COND], [],
- [AC_CONFIG_FILES([prog], [chmod 755 prog])])
+ [AC_CONFIG_FILES([prog1], [chmod 755 prog1])
+ AC_CONFIG_FILES([sub/prog2], [chmod 755 sub/prog2])])
+AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
END
cat >Makefile.am <<'END'
+SUBDIRS = sub
if COND
-bin_PROGRAMS = prog
-prog_SOURCES = prog.c
+bin_PROGRAMS = prog1
+prog1_SOURCES = prog.c
else
-# FIXME: the next line is still needed to get automake to output the
-# bin_PROGRAMS above in the right condition only.
-prog:
-bin_SCRIPTS = prog
-CLEANFILES = prog
+bin_SCRIPTS = prog1
+CLEANFILES = prog1
+endif
+
+sure-exist:
+ test -f prog1 || test -f prog1$(EXEEXT)
+ test -f sub/prog2 || test -f sub/prog2$(EXEEXT)
+
+sure-not-exist:
+ test ! -f prog1 && test ! -f prog1$(EXEEXT)
+ test ! -f sub/prog2 && test ! -f sub/prog2$(EXEEXT)
+END
+
+cat >sub/Makefile.am <<'END'
+if COND
+bin_PROGRAMS = prog2
+prog2_SOURCES = prog.c
+else
+bin_SCRIPTS = prog2
+CLEANFILES = prog2
endif
END
@@ -48,12 +68,15 @@ cat >prog.c <<'END'
int main () { return 42; }
END
-cat >prog.in <<'END'
+cat >prog1.in <<'END'
#! /bin/sh
bindir='@bindir@'
echo "hi, this is $0, and bindir is $bindir"
END
+cp prog.c sub
+cp prog1.in sub/prog2.in
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
@@ -62,17 +85,25 @@ $AUTOMAKE --add-missing
$MAKE 2>stderr
cat stderr
grep 'overriding commands' stderr && exit 1
-./prog && exit 1
+$MAKE sure-exist
+./prog1 && exit 1
+./sub/prog2 && exit 1
$MAKE clean
+$MAKE sure-not-exist
$MAKE
-./prog && exit 1
+$MAKE sure-exist
+./prog1 && exit 1
+./sub/prog2 && exit 1
$MAKE distclean
./configure COND=false
$MAKE 2>stderr
cat stderr
grep 'overriding commands' stderr && exit 1
-./prog
+./prog1
+./sub/prog2
$MAKE clean
+$MAKE sure-not-exist
$MAKE
-./prog
+./prog1
+./sub/prog2
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-10-152-g441ec0a,
Ralf Wildenhues <=