KeyWorksRW / ttBld

Creates a makefile and Ninja build scripts from a simple YAML file (.srcfiles.yaml)
Other
2 stars 0 forks source link

Change build directory structure #70

Open KeyWorksRW opened 5 years ago

KeyWorksRW commented 5 years ago

Description:

The current system is very Windows-centric, and is going to cause problems for any project designed to be cross-platform. Instead of creating a single Build/ directory, we should instead create a directory for each platform, create sub-directories for the scripts and object files, and move .srcfiles into each platform build directory:

This also means our makefile generation needs to change to support various platforms. We'll need to support a msw=1 (default), mac=1, and unx=1 which in turn add the correct ending to the **bld**XXX folder.

Issue Type:

Randalphwa commented 5 years ago

It's worth noting that while we are moving .srcfiles into the various bldXXX directories, we need to assume the current directory is up one which is where the makefile will be located. I.e., given src/bldMSW/.srcfiles all relative paths should be for src not src/bldMSW. That also means the ninja scripts will continue to be designed to run from the directory up one from the bld directory. With src as the current directory, the command line would still be something like ninja -f bldMSW/clangBuild64.ninja.

Randalphwa commented 5 years ago

While it makes the code more complicated, I'm inclined to add the new directories as options while retaining the ability to create in our current build/ directory. The user can use one of the options that will be added when issue #71 is implemented (there may be UI for this at some point as well). Additionally, at any time the user can create one of the bldXXX directories and move the .srcfiles into that directory where it will continue to work fine without needing changes.

The build/ is useful for non cross platform projects which can either be the base project or even a .private project. That includes all of the KeyHelp projects which are Windows only.