Skip to content

Commit

Permalink
[docs] Restore section about build strategy (#1284)
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano authored Jun 29, 2023
1 parent 673c93e commit d40ec61
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/src/build_tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ If your build fails with some errors, look at the [Build Troubleshooting](@ref)

*If you have additional tips, please submit a PR with suggestions.*

## Build strategy

What BinaryBuilder does is to create a tarball containing all files that are found inside the `${prefix}` directory at the end of the build and which don't come from the dependencies listed in the build recipe.
Thus, what you want to do in a build script is to install the relevant files under the appropriate directories in `${prefix}` (see the [Automatic environment variables](@ref) section): the libraries in `${libdir}`, the binary executables in `${bindir}`, etc...
Most packages come with a build system to automate this process (GNU Autoconf, CMake, Meson, a plain Makefile, etc...), but sometimes you may need to manually move the files as appropriate.

## Initiating different shell commands based on target

Sometimes, you need to adapt build scripts based on the target platform. This can be done within the shell script. Here is an example from [`OpenBLAS`](https://github.com/JuliaPackaging/Yggdrasil/blob/685cdcec9f0f0a16f7b90a1671af88326dcf5ab1/O/OpenBLAS/build_tarballs.jl):
Expand Down

0 comments on commit d40ec61

Please sign in to comment.