[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Enhancement request: Watch source files for changes
From: |
Noah Slater |
Subject: |
Enhancement request: Watch source files for changes |
Date: |
Sat, 24 Jan 2009 19:53:29 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hey,
I have been using make to regenerate output documents as I write them in a
source format. This might involve writing in AsciiDoc and having make pick up
changes, generating a HTML page for me to preview my work.
To aid the writing process I usually create a shell script like this:
#!/bin/sh -e
while true; do
make 2>&1 | grep -vi "nothing to be done" || true
sleep 1
done
This means that as I write, and save the file, my HTML is generated for me.
When I think about it, there are many other situations where I can imagine it
would be useful to have make watch the input files for changes, updating the
output files when is appropriate.
I would like to request an enhancement for GNU Make in the form of:
-w, --watch Watch input files for changes and regenerate output files.
Of course, it's a bit more complex than that because we have .PHONY rules and
all sorts of other things. I don't think this is a problem though. If this
feature is implemented as a simple loop at the top of the make, in the same vein
as my shell script, then if the user has elected to enable this feature they are
presumably requesting that .PHONY targets should be remade each time.
Thanks,
--
Noah Slater, http://tumbolia.org/nslater
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Enhancement request: Watch source files for changes,
Noah Slater <=