summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 9ff12d8..75a2042 100644
--- a/Makefile
+++ b/Makefile
@@ -58,8 +58,12 @@ aconfig.h: MCONFIG
# Adding "configure" to the dependencies serializes this with running
# autoconf, because there are apparently race conditions between
-# autoconf and autoheader.
-aconfig.h.in: configure.in configure aclocal.m4
+# autoconf and autoheader. And worse than that, even when autoconf
+# cleanly returns first, autoheader will truncate the timestamp of
+# aconfig.h.in to second resolution, so on a filesystem with subsecond
+# resolution it can appear older than configure (which isn't truncated).
+# So make it an order-only prerequisite to avoid looping regenerating it.
+aconfig.h.in: configure.in aclocal.m4 | configure
rm -f aconfig.h.in aconfig.h
autoheader