On 2024-06-16 21:35, Jacob Bachmeyer wrote: > I think we might best be able to avoid this by using AC_CONFIG_COMMANDS_POST > to touch config.status if neccessary, instead of trying to decide > whether to sleep before writing config.status.
If the problem is simply that we want to avoid the situation where "make" considers config.status to be out of date wrt. configure, or something similar with any other pair of files, then this should be solveable fairly easily with a pattern like this (but see below): AC_CONFIG_COMMANDS_POST([cat >conftest.mk <<'EOF' configure: config.status false EOF while ${MAKE-make} -f conftest.mk >/dev/null 2>&1 do touch config.status done]) In my own experience the above pattern is portable. It works with HP-UX make. It works with a "touch" that truncates timestamps. In the common case where configure is sufficiently old the loop condition will always be false and there is no delay. It won't guarantee that config.status has a strictly newer timestamp than configure (except on HP-UX), but it sounds like that's fine. One missing element is that there is no limit, which would be a bit of a problem if the clock skew is severe (e.g., if configure's mtime is years or even minutes in the future), so something extra is probably desirable to bound the amount of time this runs to something practical. Cheers, Nick