[Top][All Lists]
[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
Re: [O] Not overwriting unchanged source code files when tangling, Holger Hoefling, 2011/11/18
- Re: [O] Not overwriting unchanged source code files when tangling, Nick Dokos, 2011/11/18
- Re: [O] Not overwriting unchanged source code files when tangling, Holger Hoefling, 2011/11/18
- Re: [O] Not overwriting unchanged source code files when tangling, Nick Dokos, 2011/11/18
- Re: [O] Not overwriting unchanged source code files when tangling, Holger Hoefling, 2011/11/19
- Re: [O] Not overwriting unchanged source code files when tangling, Holger Hoefling, 2011/11/19
- Re: [O] Not overwriting unchanged source code files when tangling, Allen S. Rout, 2011/11/22
- Re: [O] Not overwriting unchanged source code files when tangling,
Nick Dokos <=
Re: [O] Not overwriting unchanged source code files when tangling, cberry, 2011/11/19
Re: [O] Not overwriting unchanged source code files when tangling, Achim Gratz, 2011/11/18
Re: [O] Not overwriting unchanged source code files when tangling, Rustom Mody, 2011/11/19