c3d / db48x

RPL runtime for the DM42 calculator, in the spirit of HP48/49/50
http://48calc.org
GNU Lesser General Public License v3.0
114 stars 14 forks source link

MacOS build: wc does not have "-L" option #1281

Open cdmackay opened 1 month ago

cdmackay commented 1 month ago

make sim is failing on MacOS 13.7, because its wc does not support the -L option used.

…
cp doc/*.png help/
mkdir -p help/img
grep -b '^#' help/db48x.md | sort -k2 -t: > help/db48x.idx
[ "$(cat help/db48x.idx | wc -L)" -lt 80 ]
wc: illegal option -- L
usage: wc [-clmw] [file ...]
/bin/sh: line 0: [: : integer expression expected
make: *** [help/db48x.idx] Error 2
cdmackay commented 1 month ago

I note that my Debian Linux systems get their wc — which does support -L — via coreutils, but the MacOS Homebrew coreutils does not contain wc.

c3d commented 3 weeks ago

Are you OK with just removing that line from your Makefile if you are running on an old version of macOS?

The intent of this line is to check that the index file entries fit in the internal buffer of the calculator. Any title larger than 80 characters would not fit on the screen of the machine anyway. It is only necessary if you modify the .md files used to generate the help (and more specifically if you add new titles). This check matters to me, but it should not matter to someone not doing releases.

cdmackay commented 3 weeks ago

Thanks very much. I removed that line, but the make now fails further on, for an unrelated issue:

make: *** No rule to make target recorder/recorder.h', needed byrecorder/config.h'. Stop.

I could log an issue for that too. Or do you consider MacOS 13.x too old to support? Unfortunately, my system is constrained to that version, by policy.

cdmackay commented 2 weeks ago

Opened new issue #1316