diff --git a/.gitignore b/.gitignore index 86c063c..cedb7b8 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,6 @@ runtime.*.liblouis/runtimes/ # Rider / ReSharper per-user settings *.DotSettings.user + +# Worktrees created by spawned Claude Code sessions +.claude/worktrees/ diff --git a/PACKAGING.md b/PACKAGING.md index a1ae783..1bfe967 100644 --- a/PACKAGING.md +++ b/PACKAGING.md @@ -119,6 +119,27 @@ mean x86: Both were still present in liblouis 3.38.0, so expect them to survive an upstream bump. +### Only the library is built + +The build runs `make -C gnulib` then `make -C liblouis`, not a top level `make`. The tree also +contains `tools/`, `tables/`, `man/`, `doc/`, `tests/`, `python/` and `windows/`, none of which +reach a package. + +The reason is not only speed. A failure under `tools/` does not stop a top level `make`: the +`win-arm64` build once emitted eight link errors there and still exited 0, which hid a real problem +in several thousand lines of log. Building only what is shipped means any failure is about the +thing being shipped. It also removes libtool's `could not determine the host path` warnings, which +come from the wrapper scripts it generates around uninstalled executables and were pure noise: 48 +of them in a full build, none now. + +gnulib has to be named explicitly and built first. liblouis links `gnulib/libgnu.la`, and make does +not build a sibling directory on demand — `make -C liblouis` alone stops with `No rule to make +target '../gnulib/libgnu.la'`. + +Skipping `tables/` is safe because the two tables generated there with m4, `nl-chardefs.uti` and +`nl-NL-g0.utb`, are also shipped pre-generated in the release tarball, so `LibLouis.NET.Tables` +still stages a complete set. + ### Self-contained Windows binaries The Windows targets are built with `-static-libgcc`. Without it, 32-bit mingw links against diff --git a/build/build_runtime_macos_packages.sh b/build/build_runtime_macos_packages.sh index c2f81dd..960275f 100755 --- a/build/build_runtime_macos_packages.sh +++ b/build/build_runtime_macos_packages.sh @@ -28,7 +28,12 @@ build_runtime_nuget_macos() { export CPPFLAGS="-arch $arch" ./configure --enable-ucs4 --enable-year2038 --host="$host" - make -j"$(cpu_count)" + + # Only the library is packaged; see build_runtime_packages.sh. gnulib has to be built + # first and by name, because liblouis links against gnulib/libgnu.la and make will not + # build a sibling directory on demand. + make -j"$(cpu_count)" -C gnulib + make -j"$(cpu_count)" -C liblouis target_dir="$REPO_ROOT/runtime.$rid.liblouis/runtimes/$rid/native" mkdir -p "$target_dir" diff --git a/build/build_runtime_packages.sh b/build/build_runtime_packages.sh index 5d616b9..3b1c688 100755 --- a/build/build_runtime_packages.sh +++ b/build/build_runtime_packages.sh @@ -75,10 +75,23 @@ build_runtime_nuget() { *) jobs=$(cpu_count) ;; esac + # Only the library is packaged, so only the library is built. The tree also contains + # tools/, tables/, man/, doc/, tests/, python/ and windows/, none of which reach a package. + # + # This is not just speed. A failure in tools/ does not stop the top level make - the + # win-arm64 build once emitted eight link errors there and still exited 0, which buried a + # real problem in the log. Building only what is shipped means any failure is about the + # thing being shipped. It also removes libtool's "could not determine the host path" + # warnings, which come from wrapper scripts generated around uninstalled executables. + # + # gnulib first and explicitly: liblouis links against gnulib/libgnu.la, and make will not + # build a sibling directory on demand - it stops with "No rule to make target". if [ -n "$extra_cflags" ]; then - make -j"$jobs" CFLAGS="$extra_cflags" + make -j"$jobs" -C gnulib CFLAGS="$extra_cflags" + make -j"$jobs" -C liblouis CFLAGS="$extra_cflags" else - make -j"$jobs" + make -j"$jobs" -C gnulib + make -j"$jobs" -C liblouis fi target_dir="$REPO_ROOT/runtime.$rid.liblouis/runtimes/$rid/native"