]> git.lizzy.rs Git - plan9front.git/commit
syscall: fix build problem caused by stale tab.h
authorkvik <kvik@a-b.xyz>
Wed, 23 Sep 2020 15:17:52 +0000 (17:17 +0200)
committerkvik <kvik@a-b.xyz>
Wed, 23 Sep 2020 15:17:52 +0000 (17:17 +0200)
commit2968225196d6078203e88d26572a51216f545c1d
treed2e074d4d65dd9c030a5731cb0839d38d3db09f2
parent23de6808f70552beeb4b3a3374543f7aaf31c4c8
syscall: fix build problem caused by stale tab.h

Recently the script which generates tab.h and the code including it got
incompatibly changed.  People reported problems involving syntax errors
when trying to rebuild the system following a sysupdate.

The problem was with the script being embedded within a mkfile rule,
meaning that mk didn't notice it changing and therefore didn't rebuild
the target file.  For people who were rebuilding the system this meant
that the old tab.h got included, causing syntax errors.

This patch moves the codegen script into a file and tells mk about this
new dependency, so that tab.h will get rebuilt for everyone.  I also
took an opportunity to rewrite the script, hopefuly making it easier to
follow.
sys/src/cmd/syscall/mkfile
sys/src/cmd/syscall/mktab.awk [new file with mode: 0755]