On 2011-07-19 03:58, Nick Sabalausky wrote:
3. Orb invokes the build process to build foo (BTW, how is that "how to
build" commandline string specified in the orbspec? The closest thing I see
is the "build" field, but it looks like that's just the name of the tool
used. An actual command line string is going to be needed.)
Yes, it's the name of the build tool to invoke. By default it has
support for a couple of build tools and knows how to invoke them. Example:
To invoke Make it would just be "make". To invoke DSSS it would be "dsss
build".
In addition to that the "build" field accepts a variable argument list
with arguments to the build tool. Example:
build :make, "-f foo.mak"
Would invoke "make -f foo.mak".
One of the known build tools is "shell" which basically lets you run
arbitrary commands. Example:
build :shell, "./build_my_app.sh"
build :shell, "rdmd --build-only main.d".
What about projects that don't use "{project_root}" as the include
directory? My projects, for instance, typically use "{project_root}/src".
Actually I don't think this will be a problem. The working directory
when installing a package will look the same as the project directory
where you created the package.
Example:
1. You have all source files in "{project_root}/src". When you build the
package, from "{project_root}", it will create a "src" directory in the
package and all you source files will be in this directory.
2. When the package is to be installed the package manager extracts the
package and you will have the "src" folder in the working directory/a
temp directory.
3. The package manager will execute the build command from the working
directory. So the build system you have chosen just needs to find the
"src" folder relative to the working directory.
Lets take Make as an example, because it's a tool that exists and we
know how it works. Either you have the makefile in the working directory
(the original place was the project root). Or it will be in the "src"
directory.
This is how the orbspec will look like when the makefile is in the root
folder:
build :make
Or when the makefile is in the "src" folder:
build :make, "-f src/makefile"
--
/Jacob Carlborg