[Remind-Fans] daemon mode - include file update

Christoph Scheurer christoph.scheurer at web.de
Thu Mar 19 02:44:06 EDT 2009


Hi,

I just realized that you made a change to the rule which will not work the way
I had in mind:

> > REMIND_INCLUDES = $(wildcard *)
> > 
> > reminders: $(REMIND_INCLUDES)
> > 	@touch main 

For the initial example I had assumed that the main reminders file is called
"reminders", i.e. you run "remind reminders" or have DOT_REMINDERS=reminders .
In the case that your main reminders file is called "main" the rule should
read instead:

main: $(filter-out $@, $(REMIND_INCLUDES))
 	@touch $@

That way all the dependencies (right of the colon) are tested whether any of
them is newer than the target (left of the colon, $@ is replaced by that name)
and only if that condition is met, the rule (following line(s)) is run. That
way the main reminders file is only touch'ed if really necessary and remind
has to reload everything also only if anything has been modified.

If the target is not an existing file (your modification) then the rule is a
so-called phony rule and is executed every time you run make, which is not the
desired effect.

If you use the environment variable DOT_REMINDERS you could also have make
substitute that for the target name.

Kind regards,

Ch. Scheurer

-- 
Christoph Scheurer                                  GnuPG key Id: 0x6128C6B6



More information about the Remind-fans mailing list