pkgsrc stops make userland at the first installed file the PLIST does not list, after hours of build (McdeLock.pm, Thumb.h, 0010.language, DtScrn.t.pm, userland-2026-11-14n.log:26326). This installs the native build into a fresh temporary DESTDIR (not build/mcde-root, where make install never removes old files) and names every file under dt/ that neither PLIST lists, in seconds. Compared: only dt/; both PLISTs, the Motif one read as if under dt/ (the native build makes its own Motif there, x11/mcde-motif ships it into the prefix); libraries without their version; without documentation (-docs, pkgsrc-cross.mk.conf:238) and the four files the recipe moves to share/doc. Measured: the current PLIST: 3208 names, ok. Controls from history: the PLIST beforefe8abbd1bbgives exactly the six files that commit added; before2e062c4590it gives McdeLock.pm and the same six. (First versions gave 241 and 4 false positives: the Motif PLIST sits in the prefix, not under dt/, and the recipe moves four docs.) The rule is in ext/src/mcde/AGENTS.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
80 lines
2.9 KiB
Bash
Executable File
80 lines
2.9 KiB
Bash
Executable File
#!/bin/sh
|
|
# License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree.
|
|
#
|
|
# mcde-linux.sh -- build MCDE natively on the (Linux) build host, for development
|
|
#
|
|
# usage: tools/mcde-linux.sh [install [SUBDIR ...] | check SUBDIR ... | plist | SUBDIR ...]
|
|
# (make mcde-linux [MCDE_DIRS="install programs/dtfile"])
|
|
# plist: tools/mcde-plist-check.sh -- every file this tree installs is in
|
|
# the PLIST (no build; needs the build `make mcde-linux' made)
|
|
#
|
|
# MCDE runs on Linux as well as on NetBSD (ext/src/mcde/AGENTS.md), so the host
|
|
# that builds Makronix can build and run it directly: fast turns for work on
|
|
# the desktop, screenshots under Xvfb. This is not how Makronix gets MCDE --
|
|
# that is pkgsrc (ext/src/mcde/pkgsrc) -- and nothing here goes into a set.
|
|
#
|
|
# The working tree of ext/src/mcde (with uncommitted edits, without pkgsrc/) is
|
|
# copied to build/mcde-linux; autogen.sh and configure run again when
|
|
# configure.ac or a Makefile.am is newer than config.status; then make, in the
|
|
# whole tree or only in the SUBDIRs given (e.g. programs/dtfile). The result
|
|
# is installed only with "install": make install into build/mcde-root/dt, so
|
|
# that the programs find their data types, icons and app-defaults when run from
|
|
# there (under Xvfb, for screenshots).
|
|
#
|
|
# The last line of the output is "mcde-linux exit=N".
|
|
|
|
set -u
|
|
|
|
TOP=$(cd "$(dirname "$0")/.." && pwd)
|
|
SRC=$TOP/ext/src/mcde
|
|
B=$TOP/build/mcde-linux
|
|
JOBS=${JOBS:-8}
|
|
|
|
finish() { echo "mcde-linux exit=$1"; exit "$1"; }
|
|
|
|
mkdir -p "$B"
|
|
rsync -a --exclude=/pkgsrc "$SRC/" "$B/" || finish 1
|
|
|
|
cd "$B" || finish 1
|
|
if [ ! -f config.status ] ||
|
|
[ -n "$(find . -name configure.ac -newer config.status -o \
|
|
-name Makefile.am -newer config.status | head -1)" ]; then
|
|
./autogen.sh || finish 1
|
|
# every system path below build/: this host may run a CDE of its own
|
|
# (/etc/pam.d/dtlogin, /etc/dt), and a development build never touches it
|
|
R=$TOP/build/mcde-root
|
|
./configure --prefix="$R/dt" --sysconfdir="$R/etc" \
|
|
--localstatedir="$R/var" --with-config-dir="$R/etc/dt" \
|
|
--with-logfiles-dir="$R/var/dt" --with-pamdir="$R/etc/pam.d" \
|
|
--with-calendar-dir="$R/var/spool/calendar" ||
|
|
finish 1
|
|
fi
|
|
|
|
if [ $# -eq 0 ]; then
|
|
nice -n 19 make -j"$JOBS" || finish $?
|
|
elif [ "$1" = install ] && [ $# -eq 1 ]; then
|
|
nice -n 19 make -j"$JOBS" || finish $?
|
|
make install || finish $?
|
|
elif [ "$1" = plist ] && [ $# -eq 1 ]; then
|
|
# not a build: do the files this tree installs appear in the PLIST of
|
|
# ext/src/mcde/pkgsrc (what pkgsrc's check would stop on, hours later)?
|
|
"$TOP/tools/mcde-plist-check.sh"
|
|
finish $?
|
|
elif [ "$1" = check ]; then
|
|
shift
|
|
for d in "$@"; do
|
|
make -C "$d" check || finish $?
|
|
done
|
|
elif [ "$1" = install ]; then
|
|
shift
|
|
for d in "$@"; do
|
|
nice -n 19 make -j"$JOBS" -C "$d" || finish $?
|
|
make -C "$d" install || finish $?
|
|
done
|
|
else
|
|
for d in "$@"; do
|
|
nice -n 19 make -j"$JOBS" -C "$d" || finish $?
|
|
done
|
|
fi
|
|
finish 0
|