help-make
[Top][All Lists]
Advanced

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

Need help coping files to a directory


From: Adam Bennett
Subject: Need help coping files to a directory
Date: Wed, 26 Mar 2008 16:22:00 -0700
User-agent: Thunderbird 2.0.0.0 (Windows/20070326)

Hello all.

I'm new to make and need some help.  My make file creates a few files, 
(shared libraries and executables), and I want to write a target that 
copies said files into a separate directory.  A pretty simple need.  I 
gather that I could manually declare rules like:

somedir/foobar: foobar
    cp foobar somedir

somedir/dog: dog
    cp dog somedir

copythefiles: somedir/foobar somedir/dog

But I don't like repeating myself.  What I'd really like is to have a 
rule pattern like:

somedir/%: $*
    cp $* somedir

copythefiles: somedir/foobar somedir/dog

This doesn't seem to work.  If I invoke "make copythefiles" I also 
expect it to take appropriate actions to build foobar and dog but this 
does not seem to be happening.

Am I going about this wrongly?  Help is much appreciated.
- Adam



Videx Inc. 1105 N. E. Circle Blvd. Corvallis OR 97330 (541) 758-0521
CONFIDENTIAL COMMUNICATION: The email message and any attachments are intended 
only for the addressee.  They may be privileged, confidential, and protected 
from disclosure. If you are not the intended recipient, any dissemination, 
distribution, or copying is expressly prohibited.  If you received this email 
message in error, please notify the sender immediately by replying to this 
e-mail message or by telephone





reply via email to

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