emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Not overwriting unchanged source code files when tangling


From: Nick Dokos
Subject: Re: [O] Not overwriting unchanged source code files when tangling
Date: Tue, 22 Nov 2011 16:43:17 -0500

Allen S. Rout <address@hidden> wrote:

> On 11/19/2011 01:32 PM, Holger Hoefling wrote:
> > Hi everyone,
> >
> > I wanted to thank everyone for their helpful suggestions and wanted to
> > share the best solutions I heard of and found.
> >
> > One solution is to include a rule in the makefile for every sourcecode
> > file that that copies it and only updates the copy if something has
> > changed (see Nick's email below).
> >
> 
> Or tangle to one directory, and then copy to another;  then there's
> one rule for all of the transitions.
> 
> 
> work/%: tangle/%
>       @cmp --silent  $< $@ || ( echo "Updating $@" ; cp $< $@ )
> 
> I liked Nick's "cmp" invocation; I started out with diff. :)
> 

I first saw it in Kernighan and Pike's "Unix Programming Environment"
(1984!).  I'm sure the trick went back even further.

Nick





reply via email to

[Prev in Thread] Current Thread [Next in Thread]