help-make
[Top][All Lists]
Advanced

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

Re: Copying png images from source to build directory?


From: Gerhard Fiedler
Subject: Re: Copying png images from source to build directory?
Date: Fri, 23 Oct 2009 08:14:10 -0200
User-agent: 40tude_Dialog/2.0.15.1

C Y wrote:

> Can anyone help me with what I'm hoping is a fairly straightforward
> problem: 
> 
> I need to copy png files from a source directory location to an
> out-of-directory build location, e.g. 
> 
> src/images/image.png 
> 
> to 
> 
> build/images/image.png 
> 
> but can't figure out how to create a make rule to do this.  The
> background is I'm doing docbook building and need the images to be in
> the location expected by the docbook files to generate pdf output -
> obviously it works in-source-directory building but not out of dir. 
> 
> So far, all my attempts to write a make rule that simply copies the
> images from source directory to build directory have failed.  I am
> currently hacking around it by naming all my images with a .docpng
> prefix and defining a build rule, but this is not really acceptable
> from a scaling standpoint as large numbers of images may need to be
> added, edited and maintained in the future. 
> 
> Can anybody suggest a good solid way to do this with make? 

What's wrong with a rule that copies .png files from the src to the
build directory? As long as you have the .png files defined as
prerequisites of a file you're building, this will work. you'll have to
use /something/ to define them as prerequisites: either manually
maintaining a list in a makefile, or a naming convention, or copying all
the .png files in the given src directory, or running a script to
extract the information from another file and creating a file for
including in a makefile, ...

Gerhard





reply via email to

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