From d40ec617d131a1787851559ef1a9f04efce19f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Thu, 29 Jun 2023 23:08:28 +0100 Subject: [PATCH] [docs] Restore section about build strategy (#1284) --- docs/src/build_tips.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/src/build_tips.md b/docs/src/build_tips.md index f7d4edd4a..d0a057c50 100644 --- a/docs/src/build_tips.md +++ b/docs/src/build_tips.md @@ -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):