remove dependency of version.h on .git/* to avoid errors
authorRich Felker <dalias@aerifal.cx>
Wed, 4 Dec 2013 23:00:19 +0000 (18:00 -0500)
committerRich Felker <dalias@aerifal.cx>
Wed, 4 Dec 2013 23:00:19 +0000 (18:00 -0500)
the wildcard function in GNU make includes dangling symlinks; if any
exist under the .git directory, they would get added as dependencies,
causing make to exit with an error due to lacking a rule to build the
missing file.

as far as I can tell, git operations which should force version.h to
be rebuilt must all touch the mtime of the top-level .git directory.

Makefile

index 69ab304..0ab0bfd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -80,7 +80,7 @@ include/bits/alltypes.h.in: include/bits
 include/bits/alltypes.h: include/bits/alltypes.h.in include/alltypes.h.in tools/mkalltypes.sed
        sed -f tools/mkalltypes.sed include/bits/alltypes.h.in include/alltypes.h.in > $@
 
-src/internal/version.h: $(wildcard VERSION .git .git/*)
+src/internal/version.h: $(wildcard VERSION .git)
        printf '#define VERSION "%s"\n' "$$(sh tools/version.sh)" > $@
 
 src/internal/version.lo: src/internal/version.h