Scott Smedley <[EMAIL PROTECTED]> writes:
> 
> > make[3]: Leaving directory `/home/tibbs/fvwm/doc'
> > cp ./index.html index.html
> > cp: `./index.html' and `index.html' are the same file
> > make[2]: *** [index.html] Error 1
> 
> I need some help. I can't work out how to get make to do what I want.
> 
> I want to support both in-tree & out-of-tree builds.
> 
> In my case, for an in-tree build nothing needs to be done. For an
> out-of-tree build, a file has to be copied to the build directory.
> 
> I used to use this:
> 
> all:
>       @for f in $(doc_DATA) ; do \
>               [ ! -f $$f ] && cp -p $(srcdir)/$$f $$f; \
>       done ; true
> 
> This had the desired effect except (in out-of-tree builds) make wouldn't
> update the out-of-tree file(s) whenever the source file changed. So I
> changed it to this (doc_DATA is just a bunch of .html files, by the way):
> 
> all: $(doc_DATA)
> 
> %.html: $(srcdir)/$@

This doesn't look right at all.
There's a % in the target but no matching % in the dependency.
For the rule to fire I think there needs to be one.

> Any pointers would be muchly appreciated.

Don't know if that will help, I know my understanding is imperfect.

-- 
Dan Espen                           E-mail: [EMAIL PROTECTED]

Reply via email to