help-gnu-utils
[Top][All Lists]
Advanced

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

Re: How to make files from a primary and secondary dir


From: Guy Harrison
Subject: Re: How to make files from a primary and secondary dir
Date: Tue, 29 Jun 2004 18:23:40 +0100
User-agent: KNode/0.7.2

Joakim Ekström wrote:

> I have a complete set of source files in a directory called "orig".
> Another version of the source is placed in the "new" directory,
> but only files that differs from "orig" are placed in "new".
> 
>   /new/Makefile
>   /new/foo.c (may or may not be present)
>   /new/foo.h (may or may not be present)
> 
>   /orig/foo.c
>   /orig/foo.h
> 
> I would like to have a Makefile that primarily
> takes the files in the "new" directory, if present.
> If a file is not present in "new",
> the file in "orig" should be used instead.
> 
> How should a Makefile be written to build the source in "new"?
> 
> (I checked out http://www.gnu.org/software/make/manual/make.html
> and have tried with VPATH and -I , but I cant seem to get it to work.)

There's a tool 'lndir' which harks from building X. Often it exists
standalone (or you can build it as such). That would allow a solution that
always uses "new": should the file not exist, invoke 'lndir' to symlink to
it within "orig".

Perhaps 'cvs' is a better ultimate choice however?

-- 
Guy Harrison


reply via email to

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