craftr-build / craftr-build-4.x

Frontend for the Craftr build framework.
https://craftr-build.github.io/craftr/
Other
60 stars 14 forks source link

Add build subcommand to merge export and ninja step #23

Closed NiklasRosenstein closed 8 years ago

NiklasRosenstein commented 8 years ago

Currently, there are two ways to build a project. You can derive the output build directory from code, but that can sometimes be rather complicated depending on your needs and dependent modules might not take this build directory into account.

The preferred way now is to use the current working directory as the build output directory, but each module should use a folder that is named after its module name (so that no conflicts in eg. object files can occur between modules).

You usually don't want to mess up your working tree with the stuff, so you instead create a build directory inside it and run craftr from there.

mkdir build && cd build
craftr -c .. export && ninja

A convenient subcommand should be added to merge these steps and that can be called from the working directory rather than the build directory.

craftr build

There should be options to specifiy the build directory name, and whether the ninja build file should be exported even if it already exists.

winksaville commented 8 years ago

NICE, one question can the build directory be outside. i.e. will these work:

craftr ../build-versatilepb
craftr ../build-posix
NiklasRosenstein commented 8 years ago

Yes, that will work with no further ado. :smile: Edit: Though it would be

craftr build ../build-posix
winksaville commented 8 years ago

Cool, I'll give it a try. I'm glad to see you've found some time for Craftr.

On Wed, Nov 18, 2015 at 7:28 AM Niklas Rosenstein notifications@github.com wrote:

Yes, that will work with no further ado. [image: :smile:]

— Reply to this email directly or view it on GitHub https://github.com/craftr-build/craftr/issues/23#issuecomment-157749103.