diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-04-19 06:19:52 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-04-19 06:19:52 -0700 |
commit | 2c9edd94dbb46a8ce69c3aaf04bedb9c09a5b0d2 (patch) | |
tree | 3332c8cae624e6693090f55c380a1a435379ddcb /parser.h | |
parent | 307ddfe0bbb4ad7997cccbda5abb750b599b10be (diff) | |
download | txr-2c9edd94dbb46a8ce69c3aaf04bedb9c09a5b0d2.tar.gz txr-2c9edd94dbb46a8ce69c3aaf04bedb9c09a5b0d2.tar.bz2 txr-2c9edd94dbb46a8ce69c3aaf04bedb9c09a5b0d2.zip |
Makefile: detect when y.tab.h doesn't change.
When we touch the parser.y file, yacc regenerates
y.tab.h. Then everything which depends on that is
rebuilt. However, this is not necessary if the parser.y
change doesn't actually modify the contents of y.tab.h.
A build system based on file hashes wouldn't have this
problem, but make works strictly with modification
timestamps.
* Makefile (y.tab.c): Preserve the old y.tab.h, if
it exists, as y.tab.h.old. Then if the new y.tab.h
is exactly the same according to cmp, restore the
old y.tab.h in its place.
(clean): Remove y.tab.h.old.
Diffstat (limited to 'parser.h')
0 files changed, 0 insertions, 0 deletions