[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
43-fyi-config-status-2-50.patch
From: |
Akim Demaille |
Subject: |
43-fyi-config-status-2-50.patch |
Date: |
Fri, 26 Oct 2001 11:39:07 +0200 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* automake.in (&handle_configure): Use the config.status 2.50
invocation syntax for config files and headers.
autoheader needs the name of the file to create, not from what it
must be created, hence CONFIG_HEADER_FULL is $one_name, not
$one_fullname.
* lib/am/configure.am, lib/am/remake-hdr.am: Likewise.
* tests/confsub.test (SUBDIRS): Adjust to the new config.status
invocation.
Strengthen: Use the non-default config.hin source.
Strengthen: Make sure config.h is properly updated when config.hin
is changed.
Index: automake.in
--- automake.in Wed, 24 Oct 2001 20:33:38 +0200 akim
+++ automake.in Thu, 25 Oct 2001 18:18:44 +0200 akim
@@ -3782,7 +3782,7 @@ sub handle_configure
('FILES' => join (' ', @files),
'CONFIG_HEADER' => $cn_sans_dir,
'CONFIG_HEADER_IN' => $ch_sans_dir,
- 'CONFIG_HEADER_FULL' => $one_fullname,
+ 'CONFIG_HEADER_FULL' => $one_name,
'STAMP' => "$stamp_dir$stamp_name",
'SRC_STAMP' => "$out_dir/$stamp_name"));
@@ -3836,30 +3836,26 @@ sub handle_configure
my @actual_other_files = ();
foreach my $lfile (@other_input_files)
{
- my ($file, $local);
- my (@inputs, @rewritten_inputs);
- my ($need_rewritten);
+ my $file;
+ my @inputs;
if ($lfile =~ /^([^:]*):(.*)$/)
{
# This is the ":" syntax of AC_OUTPUT.
$file = $1;
@inputs = split (':', $2);
- $need_rewritten = 1;
}
else
{
# Normal usage.
$file = $lfile;
@inputs = $file . '.in';
- $need_rewritten = 0;
}
# Automake files should not be stored in here, but in %MAKE_LIST.
prog_error ("$lfile in address@hidden")
if -f $file . '.am';
- $local = basename ($file);
- @rewritten_inputs = rewrite_inputs_into_dependencies (1, @inputs);
+ my $local = basename ($file);
# Make sure the dist directory for each input file is created.
# We only have to do this at the topmost level though. This
@@ -3902,16 +3898,15 @@ sub handle_configure
next;
}
+ my @rewritten_inputs = rewrite_inputs_into_dependencies (1, @inputs);
$output_rules .= ($local . ': '
. '$(top_builddir)/config.status '
- . join (' ', @rewritten_inputs) . "\n"
+ . "@rewritten_inputs\n"
. "\t"
- . 'cd $(top_builddir) && CONFIG_FILES='
+ . 'cd $(top_builddir) && '
+ . '$(SHELL) ./config.status '
. ($relative_dir eq '.' ? '' : '$(subdir)/')
- . '$@' . ($need_rewritten
- ? (':' . join (':', @inputs))
- : '')
- . ' CONFIG_HEADERS= CONFIG_LINKS= $(SHELL)
./config.status'
+ . '$@'
. "\n");
push (@actual_other_files, $local);
Index: lib/am/configure.am
--- lib/am/configure.am Tue, 07 Aug 2001 20:20:45 +0200 akim
+++ lib/am/configure.am Wed, 24 Oct 2001 20:40:43 +0200 akim
@@ -28,9 +28,7 @@
## This rule remakes the Makefile.
%MAKEFILE%: %MAINTAINER-MODE% %MAKEFILE-IN% %MAKEFILE-DEPS%
$(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=%CONFIG-MAKEFILE% $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE%
Index: lib/am/remake-hdr.am
--- lib/am/remake-hdr.am Mon, 05 Mar 2001 22:33:22 +0100 akim
+++ lib/am/remake-hdr.am Thu, 25 Oct 2001 18:18:49 +0200 akim
@@ -28,9 +28,8 @@
## We used to try to get a real timestamp here. But the fear is that
## that will cause unnecessary cvs conflicts
@echo timestamp > %STAMP%T 2> /dev/null
- cd $(top_builddir) \
- && CONFIG_FILES= CONFIG_HEADERS=%CONFIG_HEADER_FULL% \
- $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status %CONFIG_HEADER_FULL%
+
## Creating the timestamp first, and moving it later, helps ensure that
## it will be older than the header file, avoiding needless triggering
## of the rebuild rule.
Index: tests/confsub.test
--- tests/confsub.test Sat, 20 Oct 2001 12:23:13 +0200 akim
+++ tests/confsub.test Thu, 25 Oct 2001 18:14:08 +0200 akim
@@ -1,16 +1,14 @@
#! /bin/sh
# Test to make sure config.h can be in subdir.
+# Also, make sure config.h is properly rebuilt.
. $srcdir/defs || exit 1
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(subdir/config.h)
-PACKAGE=nonesuch
-VERSION=nonesuch
-AC_PROG_CC
+AM_CONFIG_HEADER(subdir/config.h:subdir/config.hin)
AC_OUTPUT(Makefile subdir/Makefile)
END
@@ -20,14 +18,27 @@
mkdir subdir
cat > subdir/Makefile.am << 'END'
-bin_PROGRAMS = fred
END
-: > subdir/config.h.in
+echo 'Before.' > subdir/config.hin
$ACLOCAL || exit 1
$AUTOMAKE || exit 1
# Make sure subdir Makefile.in doesn't itself look in the subdir.
-(grep 'subdir/config.h' subdir/Makefile.in | grep -v CONFIG_HEADERS) && exit 1
+# One line is allowed though:
+#
+# cd $(top_builddir) && $(SHELL) ./config.status subdir/config.h
+(fgrep 'subdir/config.h' subdir/Makefile.in |
+ fgrep -v 'cd $(top_builddir)') && exit 1
+
+autoconf || exit 1
+./configure || exit 1
+fgrep 'Before.' subdir/config.h
+
+sleep 1
+echo 'After.' > subdir/config.hin
+make || exit 1
+fgrep 'After.' subdir/config.h || exit 1
+
exit 0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 43-fyi-config-status-2-50.patch,
Akim Demaille <=