From 8169c04b382e48e039bc22275452a52cb2c54b0b Mon Sep 17 00:00:00 2001 From: lotherk Date: Tue, 17 Nov 2026 16:55:45 +0000 Subject: [PATCH] mcde: a cross build makes no test programs; check-buildtools stopped on 28 build/logs/userland-2026-11-17f.log:22437: the 25 test programs of libDtChat, dtchat-demo and McdeSys's test_audio/test_netwatch were noinst_PROGRAMS, so the package build compiled them for NetBSD and tools/check-buildtools.sh took them for build tools. configure.ac has MCDE_CROSS now; in a cross build they are check_PROGRAMS (dtchat-demo EXTRA_PROGRAMS), in a native one noinst as before, so tools/mcde-tests.sh still finds them in build/mcde-host. autoreconf -fi of the tree: exit 0, the Makefile.in lines are @MCDE_CROSS_TRUE@check_PROGRAMS / @MCDE_CROSS_FALSE@noinst_PROGRAMS. --- AGENTS.md | 6 +++++- configure.ac | 7 +++++++ lib/McdeSys/Makefile.am | 7 ++++++- lib/libDtChat/Makefile.am | 11 +++++++++-- programs/dtchat/Makefile.am | 6 ++++++ 5 files changed, 33 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 9ff02361..1d89be92 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -808,7 +808,11 @@ tests installs. downgrades; `MCDE_DIALECT_CFLAGS` for a build that ignores CFLAGS); no build system needs to know it. - Tests: `make check` (`test_sysinfo`, `test_menumodel`, `test_displays`, - `test_items`, `test_panes`, `test_profiles`). + `test_items`, `test_panes`, `test_profiles`). A test program is + `check_PROGRAMS`; one that `tools/mcde-tests.sh` runs from the native build + is `noinst_PROGRAMS` only `if !MCDE_CROSS` (configure.ac): in the cross + build for the package it is a target binary nothing runs, and + `tools/check-buildtools.sh` stops `make userland` on it (2026-11-17). ## What may be changed, and how diff --git a/configure.ac b/configure.ac index 4ec3ac50..20b0e3ee 100644 --- a/configure.ac +++ b/configure.ac @@ -645,6 +645,13 @@ dnl the adapter is simply not built. AC_PATH_PROG([GO], [go], [no]) AM_CONDITIONAL([MCDE_GO], [test "$GO" != "no"]) +dnl MCDE: a cross build (pkgsrc for NetBSD on Linux) builds no test programs +dnl with `make': they are binaries of the target that nothing runs, and +dnl tools/check-buildtools.sh rightly stops on them (build/logs/ +dnl userland-2026-11-17f.log:22437). A native build keeps building them, so +dnl tools/mcde-tests.sh finds them in build/mcde-host. +AM_CONDITIONAL([MCDE_CROSS], [test "$cross_compiling" = "yes"]) + dnl MCDE: V4L2 for dtchat's camera on Linux (media_capture.c). NetBSD's dnl video(4) has another API; there the test pattern is used until it is dnl written. diff --git a/lib/McdeSys/Makefile.am b/lib/McdeSys/Makefile.am index d9bc4f38..53c18122 100644 --- a/lib/McdeSys/Makefile.am +++ b/lib/McdeSys/Makefile.am @@ -34,8 +34,13 @@ libMcdeSys_la_LDFLAGS = -version-info 1:0:0 # what the system tells about itself, for a look by hand: make check runs it check_PROGRAMS = test_sysinfo test_netmount test_updatesource test_processes test_job test_netinput test_sysload test_disk_events -# built by make mcde-host as well, so tools/mcde-tests.sh finds it there +# built by make mcde-host as well, so tools/mcde-tests.sh finds it there; +# a cross build only for `make check' (configure.ac, MCDE_CROSS) +if MCDE_CROSS +check_PROGRAMS += test_audio test_netwatch +else noinst_PROGRAMS = test_audio test_netwatch +endif test_sysinfo_SOURCES = test_sysinfo.c test_sysinfo_CPPFLAGS = -I$(top_srcdir)/include test_sysinfo_LDADD = libMcdeSys.la diff --git a/lib/libDtChat/Makefile.am b/lib/libDtChat/Makefile.am index b3a6cd15..1f39f9ec 100644 --- a/lib/libDtChat/Makefile.am +++ b/lib/libDtChat/Makefile.am @@ -18,12 +18,19 @@ libDtChat_la_LIBADD = libDtChatIpc.la $(CRYPTOLIB) $(LIBTLS) $(OPUSLIB) $(VPXLIB libDtChat_la_LDFLAGS = -version-info 1:0:0 # Built by make mcde-host as well, so tools/mcde-tests.sh finds them in -# build/mcde-host; make check still builds and runs them. -noinst_PROGRAMS = test_json test_frame test_loop test_store test_conv test_text test_irc \ +# build/mcde-host; make check still builds and runs them. A cross build +# builds them only for `make check': for the package they are target +# binaries nothing runs (configure.ac, MCDE_CROSS). +DTCHAT_TESTS = test_json test_frame test_loop test_store test_conv test_text test_irc \ test_identity test_peers test_local test_filexfer test_pair test_fuzz \ test_i18n test_audio_opus test_media_packet test_media_call test_video_vp8 \ test_video_packet test_video_render test_media_sync test_capture \ test_adapter test_instance fake_adapter +if MCDE_CROSS +check_PROGRAMS = $(DTCHAT_TESTS) +else +noinst_PROGRAMS = $(DTCHAT_TESTS) +endif test_json_SOURCES = test_json.c test_json_CPPFLAGS = -I$(top_srcdir)/include test_json_LDADD = libDtChatIpc.la diff --git a/programs/dtchat/Makefile.am b/programs/dtchat/Makefile.am index a625c69f..35521758 100644 --- a/programs/dtchat/Makefile.am +++ b/programs/dtchat/Makefile.am @@ -1,7 +1,13 @@ MAINTAINERCLEANFILES = Makefile.in bin_PROGRAMS = dtchat dtchat-headless dtchat-irc dtchat-telegram +# the demo adapter dtchat finds next to itself in a build tree; not +# installed, so a cross build (the package) does not build it at all +if MCDE_CROSS +EXTRA_PROGRAMS = dtchat-demo +else noinst_PROGRAMS = dtchat-demo +endif # the manual pages of MCDE are documentation (PLIST: ${PLIST.docs}); a # --disable-docs build installed this one alone, and pkgsrc's PLIST check