bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #109406] autoheader creates config.h.in file with wrong timestamp


From: Bruno Haible
Subject: [sr #109406] autoheader creates config.h.in file with wrong timestamp
Date: Sun, 29 Oct 2017 11:45:23 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0

URL:
  <http://savannah.gnu.org/support/?109406>

                 Summary: autoheader creates config.h.in file with wrong
timestamp
                 Project: Autoconf
            Submitted by: haible
            Submitted on: Sun 29 Oct 2017 04:45:21 PM CET
                Category: None
                Priority: 5 - Normal
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

autoheader creates the config.h.in file with a timestamp that is not the
current time, but the latest full second before the current time. This causes
trouble later with the Automake-generated rule that tests whether config.h.in
needs to be rebuilt.

How to reproduce:

- Use gnulib as of 2017-09-28.

- $ ./gnulib-tool --create-testdir --dir=testdir1 --single-configure
get-rusage-as get-rusage-data
  (or any other small set of modules)
This command prints what it does:
executing aclocal -I glm4
executing autoconf
executing autoheader
executing automake --add-missing --copy
As you can see, it generates aclocal.m4, configure, config.h.in, Makefile.in
in this order.

- $ cd testdir1

- $ ls -lrt --full-time
total 408
-rw-rw-r-- 1 bruno bruno    150 2017-10-29 16:03:57.054242537 +0100
Makefile.am
-rw-rw-r-- 1 bruno bruno   6695 2017-10-29 16:03:57.574244759 +0100
configure.ac
-rw-rw-r-- 1 bruno bruno  23189 2017-10-29 16:03:58.000000000 +0100
config.h.in
-rw-rw-r-- 1 bruno bruno  42980 2017-10-29 16:03:58.182247356 +0100
aclocal.m4
-rwxrwxr-x 1 bruno bruno 279904 2017-10-29 16:03:58.734249714 +0100 configure
-rw-rw-r-- 1 bruno bruno  36669 2017-10-29 16:03:59.674253730 +0100
Makefile.in
drwxrwxr-x 2 bruno bruno   4096 2017-10-29 16:03:59.754254071 +0100 gllib
drwxrwxr-x 2 bruno bruno   4096 2017-10-29 16:03:59.798254260 +0100 glm4
drwxrwxr-x 2 bruno bruno   4096 2017-10-29 16:03:59.862254533 +0100 build-aux
drwxrwxr-x 2 bruno bruno   4096 2017-10-29 16:03:59.898254687 +0100 gltests

As you can see, config.h.in is now OLDER than aclocal.m4 and configure.

- $ ./configure

- $ make

Here the Automake generate rule kicks in:

$(srcdir)/config.h.in:  $(am__configure_deps)
        ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
        rm -f stamp-h1
        touch $@

This rule compares the timestamps of config.h.in and aclocal.m4 (in
particular), finds that config.h.in is too old, thus regenerates it:

$ make
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash
/media/develdata/devel/GNULIB/gnulib-git/testdir1/build-aux/missing
autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/bash ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
...

The effect is:
* Useless commands get executed.
* Noise gets added to the "make" output.
* The junk directory autom4te.cache, that I took care to remove before, has
now been recreated. Arghh!


Versions of software implied:
- autoheader 2.69
- perl 5.22.1
- all on Ubuntu 16.04




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/support/?109406>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]