help-make
[Top][All Lists]
Advanced

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

Rule to copy files from two sources


From: Yannick Patois
Subject: Rule to copy files from two sources
Date: Fri, 28 Oct 2005 13:56:52 +0200
User-agent: Mozilla Thunderbird 1.0.7-1.4.1.SL3 (X11/20051013)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I have a directory generic/ where there is a set of xml files (ending in
.xml). Another directory update/ contains a few xml files some with the
same name as in generic/. I would like to copy files from generic/ in
todate/ until the same file already exists in update/ (in that case I
want that one).

I wrote some kind of hack using VPATH and renanmng the destination file
as .xml1 to create a rule. I didnt understand how to do it otherwise.
Unfortunatly, I would like to have files named in .xml and not .xml1, is
there a simple way to do so?

Thanks for any help.

Here is what I've done so far:
<<<<<Makefile in directory todate/

XMLFILES0:= $(wildcard ../generic/*.xml)
XMLFILES := $(patsubst ../generic/%.xml,%.xml1,$(XMLFILES0))

xml: $(XMLFILES)

vpath %.xml  ../xml/update:../generic

%.xml1 :: %.xml
        cp  $< $@
>>>>>

It works, but in the destination directory files ends up in .xml1 and
not xml... How can I solve this?

Thanks.

        Yannick

- --
 _/ Yannick Patois _________________ Address (home) __________________
| irc(undernet): Garp on #france25+ | 1, rue de Bale                   |
| http://garp.feelingsurfer.net/    | 67100 Strasbourg                 |
| Tel-home: +(33)(0)3 88 84 88 16   | FRANCE                           |
| Le Portail des Copains : http://rezo.net                             |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org

iD8DBQFDYhIEZY3s/IVpRFIRAvGqAJ4nD2BCNINHuObrjnin03cSYIU45wCggO48
bXySRnoJjEgGcMSwkgwWv1A=
=vOj+
-----END PGP SIGNATURE-----




reply via email to

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