On Wed, 18 Mar 2009 10:32:13 +0100
Christoph Scheurer <[email protected]> wrote:

> > > You could touch it from a cron job so ...
> If you use a directory with your main reminders file and all the
> included files you can express the dependencies easily with a
> Makefile in the same directory and have a cron-job (or even remind in
> daemon-mode itself) run make to update the main reminders file
> on-demand with a rule like this:
> 
> REMIND_INCLUDES = $(wildcard remind-*)
> 
> reminders: $(REMIND_INCLUDES)
>       @touch $@


Hallo Christoph,
This is ingenious!

The main file and its include files are in the same folder but don't
follow a particular naming convention.


REMIND_INCLUDES = $(wildcard *)

reminders: $(REMIND_INCLUDES)
        @touch main 

changes the date of the main reminder file to the date of the newest
include if it is newer than main.

It throws up an error though (which I suppose I could simply ignore but
it's a bit untidy):
"make: Circular reminders <- reminders dependency dropped."

Presumably this happens because main is dependency as well as target.
Is there a way to exclude main from the include list?

If I wanted to run the makefile from remind, would I have to set up a
reminder which is scheduled to RUN make every five minutes or so? I
prefer this solution to a cron job as this would keep everything in one
place.

--


Best Regards from Scotland,

Tarlika Elisabeth Schmitz
_______________________________________________
Remind-fans mailing list
[email protected]
http://lists.whatexit.org/mailman/listinfo/remind-fans

Reply via email to