Closed endrift closed 3 years ago
-printf isn't available on macOS find I'm afraid.
% make -j4
find: -printf: unknown primary or operator
I swear I checked this on FreeBSD first, but apparently not since it doesn't exist there either.
https://github.com/switchbrew/switch-examples/commit/fc98393d50e7896fcc8d59295516c2d1640f043f does the job. Tested on macOS/linux/windows and I presume it will work on FreeBSD too. Would be grateful if you'd check when you have time.
As the commit log says, this breaks out the
MAKEFILES
variable instead into a list of directories that have Makefiles in them, which allows for a multi-target rule over the set of those directories. Without this, make -j cannot build more than one subdirectory at a time, which was somewhat frustrating to me. It also lets you say, e.g.,make audio/echo
to just build theaudio/echo
example while in the root directory.This doesn't attempt to apply the same cleanup to the
clean
target since cleaning is much faster and I didn't want to get fiddly with more string substitutions; it didn't seem worth it to clean up that loop too.