Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ runtime.*.liblouis/runtimes/

# Rider / ReSharper per-user settings
*.DotSettings.user

# Worktrees created by spawned Claude Code sessions
.claude/worktrees/
21 changes: 21 additions & 0 deletions PACKAGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion build/build_runtime_macos_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 15 additions & 2 deletions build/build_runtime_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading