Keeping jamfiles in a different directory to source

Added by Ben Hymers almost 11 years ago

First of all, thanks very much Josh for making JamPlus available; I've been wanting to try Jam for a long time but have always been put off by the lack of coherence. Brilliant move!

Anyway, my question is this: Is is possible to store jamfiles in a different directory to that of the source? I'd like to add Jam in alongside the other build scripts I currently have for my project, like so:

trunk/
  src/
  scripts/
    msvc/
    ant/
    jam/
      jamfile.jam

So far, however, all examples and tutorials for Jam and JamPlus I have found seem to suggest there needs to be a jamfile in the project root, each directory containing source, and everything in-between, which seems quite inflexible!

Is that the case, or have I just not read enough?


Replies (3)

RE: Keeping jamfiles in a different directory to source - Added by Joshua Jensen almost 11 years ago

I do apologize for this extremely late response. I thought I had a watch set properly in here to monitor new messages, but I was mistaken.

Yes, it is possible to store Jamfiles in a different directory to that of the source. In the 0.2rc1 build and in the Git repository, you'll find a tests/source_and_jamfiles_separate/ project. It illustrates how you can do what you have described above.

I am still feverishly working on documentation, which I hope to have in good working order by the 0.2 release. You'll find the documentation in the Docs/html/ directory.

Thanks!

Josh

RE: Keeping jamfiles in a different directory to source - Added by Ben Hymers almost 11 years ago

Brilliant, thanks Josh! That's exactly what I was after.

Also, good job on the documentation so far, it's helped me understand Jam far better than any other document on the web has. I even managed to dig into the Jambase and fiddle it to build on a console (no idea how much I'm allowed to say so I shan't even name the platform) without too much effort!

RE: Keeping jamfiles in a different directory to source - Added by Joshua Jensen almost 11 years ago

I got sick toward the tail end of last week and everything ground to a halt.

Well, as I mentioned, the documentation is largely Perforce's with the new JamPlus features and some extra examples thrown into the middle of it. I did put together the (network) file cache documentation tonight, and that's entirely JamPlus's, so there is something to my credit.

I do wish we could pull together and publish JamPlus support for the game consoles. As you found, it is certainly doable, but with everyone's input, it could be done much cleaner than I have it right now. In any case, I don't see how publishing a few compiler flags hurts anything, but you know Microsoft and Sony and Nintendo. NDAs rule over convenience anyday.

Josh

(1-3/3)