tueda / makefile4latex

A GNU Makefile for typesetting LaTeX documents.
MIT License
26 stars 3 forks source link

Configuring the timer interval in make watch #30

Closed tueda closed 2 years ago

tueda commented 3 years ago

Currently, make watch tries to typeset every second. The interval is hardcoded: https://github.com/tueda/makefile4latex/blob/751bd75daab016012a9f565838db7972f7c8b4d3/Makefile#L1281

Though it is not a POSIX feature, the sleep command on Linux or macOS accepts a real number as the interval, e.g., 0.1. It may be useful if the user can specify the interval by a variable, let's say, sleep_interval.

tueda commented 2 years ago

Variable (or possibly environment variable) MAKEFILE4LATEX_WAIT_COMMAND has been added. Example:

MAKEFILE4LATEX_WAIT_COMMAND = sleep 0.1  # GNU coreutils
MAKEFILE4LATEX_WAIT_COMMAND = perl -MTime::HiRes=sleep -e sleep -e 0.1  # perl >= 5.7.3