bug-autoconf
[Top][All Lists]
Advanced

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

suggested rule for remaking config.h is wrong


From: Peter Eisentraut
Subject: suggested rule for remaking config.h is wrong
Date: Tue, 23 Apr 2013 23:18:21 -0400

In the manual section "Automatic Remaking", the following rule is
suggested:

     config.h: stamp-h
     stamp-h: config.h.in config.status
             ./config.status

This actually doesn't work so well.  It should be

     config.h: stamp-h ;
     stamp-h: config.h.in config.status
             ./config.status

If you look at the makefiles generated by Automake, it agrees.

I have attached a small test case.  Here is what happens if you write
the rules the first way:

$ touch config.status
$ make
./config.status
$ make
cc    -c -o test.o test.c

Here is what happens if you write the rules the second way:

$ touch config.status
$ make
./config.status
cc    -c -o test.o test.c

This is with GNU Make 3.81.

The rule for config.h.in: stamp-h.in is probably similarly affected, but
I don't have verification for that.

Attachment: make-testcase.tar.gz
Description: application/compressed-tar


reply via email to

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