Scott Dixon | 13 Feb 2011 06:51
Picon

copy directory

Why is it so hard to simply copy a directory using Jam? I just want to cp -R but after 5 hours of trying everything from MakeLocate, to TextFile, to custom rules and actions I still cannot get Jam to copy a directory. Can anybody point to some samples? Is there a way to use Makefiles or bash scripts from jamfiles so I can just cp -R?

cheers,
-scott

_______________________________________________
jamming mailing list  -  jamming <at> maillist.perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming
Sanel Zukan | 13 Feb 2011 13:21
Picon

Re: copy directory

Hi,

Jam's dependency handling can be confusing at the beginning and
comparing to e.g. make, where dependency handling is usually handled by make
itself, here it is handled by developer, which quickly becomes quite handy for
constructing fast builds.

Here is CopyDir rule that will do your job:

rule CopyDir {
  Depends $(<) : $(>) ;
  Depends all : $(<) ;
}

actions CopyDir {
  cp -R $(>) $(<) ;
}

CopyDir "destination" : "target" ;

Best regards,
Sanel

On Sun, Feb 13, 2011 at 6:51 AM, Scott Dixon <scottd.nerd <at> gmail.com> wrote:
> Why is it so hard to simply copy a directory using Jam? I just want to cp -R
> but after 5 hours of trying everything from MakeLocate, to TextFile, to
> custom rules and actions I still cannot get Jam to copy a directory. Can
> anybody point to some samples? Is there a way to use Makefiles or bash
> scripts from jamfiles so I can just cp -R?
>
> cheers,
> -scott
>
> _______________________________________________
> jamming mailing list  -  jamming <at> maillist.perforce.com
> http://maillist.perforce.com/mailman/listinfo/jamming
>
>

_______________________________________________
jamming mailing list  -  jamming <at> maillist.perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming


Gmane