[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
51-drop-stamp-hin-support.patch
From: |
Akim Demaille |
Subject: |
51-drop-stamp-hin-support.patch |
Date: |
Sun, 28 Oct 2001 14:52:05 +0100 |
Index: ChangeLog
>From Akim Demaille <address@hidden>
* automake.in (@common_sometimes, &handle_configure): No longer
use stamp-hin.
* lib/am/remake-hdr.am: Adjust.
* tests/confh.test: There is no stamp.hin.
Index: automake.in
--- automake.in Fri, 26 Oct 2001 19:21:39 +0200 akim
+++ automake.in Fri, 26 Oct 2001 21:56:55 +0200 akim
@@ -217,7 +217,7 @@ sub target_hook ($$$$)
my @common_sometimes =
(
'aclocal.m4', 'acconfig.h', 'config.h.top',
- 'config.h.bot', 'stamp-h.in', 'stamp-vti'
+ 'config.h.bot', 'stamp-vti'
);
# Copyright on generated Makefile.ins.
@@ -3695,33 +3695,34 @@ sub handle_configure
my @distclean_config;
foreach my $spec (@config_headers)
{
- my ($out, @ins) = split_config_file_spec ($spec);
$hdr_index += 1;
- my $header_dir = dirname ($out);
+ # $CONFIG_H_PATH: config.h from top level.
+ my ($config_h_path, @ins) = split_config_file_spec ($spec);
+ my $config_h_dir = dirname ($config_h_path);
# If the header is in the current directory we want to build
# the header here. Otherwise, if we're at the topmost
# directory and the header's directory doesn't have a
# Makefile, then we also want to build the header.
- if ($relative_dir eq $header_dir
- || ($relative_dir eq '.' && ! &is_make_dir ($header_dir)))
+ if ($relative_dir eq $config_h_dir
+ || ($relative_dir eq '.' && ! &is_make_dir ($config_h_dir)))
{
my ($cn_sans_dir, $stamp_dir);
- if ($relative_dir eq $header_dir)
+ if ($relative_dir eq $config_h_dir)
{
- $cn_sans_dir = basename ($out);
+ $cn_sans_dir = basename ($config_h_path);
$stamp_dir = '';
}
else
{
- $cn_sans_dir = $out;
- if ($header_dir eq '.')
+ $cn_sans_dir = $config_h_path;
+ if ($config_h_dir eq '.')
{
$stamp_dir = '';
}
else
{
- $stamp_dir = $header_dir . '/';
+ $stamp_dir = $config_h_dir . '/';
}
}
@@ -3742,11 +3743,11 @@ sub handle_configure
# Header defined and in this directory.
my @files;
- if (-f $out . '.top')
+ if (-f $config_h_path . '.top')
{
push (@files, "$cn_sans_dir.top");
}
- if (-f $out . '.bot')
+ if (-f $config_h_path . '.bot')
{
push (@files, "$cn_sans_dir.bot");
}
@@ -3759,21 +3760,14 @@ sub handle_configure
push (@files, '$(top_srcdir)/acconfig.h');
}
- my $stamp_name = "stamp-h$hdr_index";
- my $out_dir = dirname ($in0_sans_dir);
-
+ my $stamp = "${stamp_dir}stamp-h${hdr_index}";
$output_rules .=
file_contents ('remake-hdr',
- ('FILES' => "@files",
- 'CONFIG_HEADER' => $cn_sans_dir,
- 'CONFIG_HEADER_IN' => $in0_sans_dir,
- 'CONFIG_HEADER_FULL' => $out,
- 'STAMP' => "$stamp_dir$stamp_name",
- 'SRC_STAMP' => "$out_dir/$stamp_name"));
-
- create ("$relative_dir/$out_dir/$stamp_name.in");
- require_file ($config_header_location, $FOREIGN,
- "$out_dir/$stamp_name.in");
+ ('FILES' => "@files",
+ 'CONFIG_H' => $cn_sans_dir,
+ 'CONFIG_HIN' => $in0_sans_dir,
+ 'CONFIG_H_PATH' => $config_h_path,
+ 'STAMP' => "$stamp"));
push @distclean_config, $cn_sans_dir;
}
Index: lib/am/remake-hdr.am
--- lib/am/remake-hdr.am Thu, 25 Oct 2001 20:21:44 +0200 akim
+++ lib/am/remake-hdr.am Fri, 26 Oct 2001 19:31:13 +0200 akim
@@ -20,7 +20,7 @@
## Explicitly look in srcdir for benefit of non-GNU makes.
-%CONFIG_HEADER%: %STAMP%
+%CONFIG_H%: %STAMP%
## Recover from removal of CONFIG_HEADER
@if test ! -f $@; then \
rm -f %STAMP%; \
@@ -28,27 +28,16 @@
else :; fi
-%STAMP%: $(srcdir)/%CONFIG_HEADER_IN% $(top_builddir)/config.status
+%STAMP%: $(srcdir)/%CONFIG_HIN% $(top_builddir)/config.status
@rm -f %STAMP%
- cd $(top_builddir) && $(SHELL) ./config.status %CONFIG_HEADER_FULL%
+ cd $(top_builddir) && $(SHELL) ./config.status %CONFIG_H_PATH%
-## SRC_STAMP takes into account a possible subdir where CONFIG_HEADER_IN is
-$(srcdir)/%CONFIG_HEADER_IN%: %MAINTAINER-MODE% $(srcdir)/%SRC_STAMP%.in
-## Recover from removal of CONFIG_HEADER_IN
- @if test ! -f $@; then \
- rm -f $(srcdir)/%SRC_STAMP%.in; \
- $(MAKE) $(srcdir)/%SRC_STAMP%.in; \
- else :; fi
-
-
-$(srcdir)/%SRC_STAMP%.in: $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) %FILES%
- @rm -f $(srcdir)/%SRC_STAMP%.in $(srcdir)/%SRC_STAMP%.inT
-## We used to try to get a real timestamp here. But the fear is that
-## that will cause unnecessary cvs conflicts
- @echo timestamp > $(srcdir)/%SRC_STAMP%.inT 2> /dev/null
+$(srcdir)/%CONFIG_HIN%: %MAINTAINER-MODE% $(top_srcdir)/%CONFIGURE-AC%
$(ACLOCAL_M4) %FILES%
cd $(top_srcdir) && $(AUTOHEADER)
-## 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.
- @mv $(srcdir)/%SRC_STAMP%.inT $(srcdir)/%SRC_STAMP%.in
+## Autoheader has the bad habit of not changing the time stamp if
+## config.hin is unchanged, which breaks Make targets. Since what
+## must not changed gratuitiously is config.h, which is already handled
+## by config.status, there is no reason to make things complex for
+## config.hin.
+ touch $(srcdir)/%CONFIG_HIN%
Index: tests/confh.test
--- tests/confh.test Wed, 24 Oct 2001 19:20:59 +0200 akim
+++ tests/confh.test Sat, 27 Oct 2001 09:55:38 +0200 akim
@@ -8,8 +8,6 @@
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-PACKAGE=nonesuch
-VERSION=nonesuch
AM_CONFIG_HEADER(include/config.h)
AC_OUTPUT(Makefile include/Makefile)
END
@@ -32,8 +30,6 @@
p
n
}' -e '/^DIST_COMMON =/ p' Makefile.in | grep acconfig.h) || exit 1
-
-grep 'stamp-h1\.in:.*acconfig.h' include/Makefile.in || exit 1
# Make sure re-running automake in a different way generates same
# Makefile.in.
- 51-drop-stamp-hin-support.patch,
Akim Demaille <=