Search code examples
jam

Create Folder using Jam


I'm using jam in my project to automate building in Visual Studio.

I'm trying to move subdirectories and files from $folder to $folder1. $folder is containing a project $folder1 is empty.

I use File to copy files.

I try to copy files like this:

File ($folder1) : ($folder) ; //works

File ($folder1)\\subdir : ($folder)\\subdir //don't work

//etc...

But $folder1 is empty and does not contain a folder structure so File ($folder1)\\subdir : ($folder)\\subdir doesn't do anything because $folder1 is empty.

Is there way in Jam to create a folder depending if it exists or not?


Solution

  • I solved it by using MkDir

    https://swarm.workshop.perforce.com/view/guest/perforce_software/jam/src/Jambase.html

    It's important that you add the target as a Depends

    Depends rule : $(1) ;
    
    MkDir $(1) ;