> Martin v. Löwis <[hidden email]> added the comment:
> What do you mean by "sanity check on the syntax"? The current Makefile
> rule to build importlib.h already checks the syntax of _bootstrap.py, and
> fails if there is a syntax error
My point is: ISTM that everything is already as it should be, I can see no problem in the status quo. If there is a problem, can you please rephrase it? If you want a shell script just to have one, here is one
When you do a fresh checkout, Python/importlib.h comes after Lib/importlib/_bootstrap.py and Python/freeze_importlib.py in a lexicographical sort which leads to it have a newer timestamp and thus not triggering a new build of the file.
This is why Martin suggested at some point using hg status or something from a script to properly detect if something has changed that would warrant rebuilding.
I'm working on a "hg touch" extension which is able to bring the time stamps back in correct order after a checkout. One would either do "make touch" after an update, or register that extension as a post-update action in .hg/hgrc. It will be controlled by a versioned .hgtouch file, that uses make(1) dependency syntax.