Open godfriedt opened 2 months ago
Hi, I encountered this problem before on macOS (see Issue #5) and thought I had fixed it, but I guess Macs don't use the GNU time command at all. I don't have a Mac to test on, so
@$(TIME) --format=$(TIME_FORMAT) -- $(COMPILE)
to @$(COMPILE)
.$(TIME) --format=$(TIME_FORMAT) --
to a Mac-compatible timing command, if you know it, orgtime
, which is GNU-compatible like the time command on my system. In the makefile, replace TIME = /usr/bin/time
with TIME = /usr/local/bin/gtime
. I got this from a helpful AI generated response on Google.The error message "usr/bin/time illegal option" means that you are trying to use an option with the time command that is not supported on macOS. The time command on macOS is a BSD-like command that does not accept all of the same options as the GNU time command.
If you need to use an option that is not supported by the macOS time command, you can use the gtime command instead. The gtime command is a GNU-compatible time command that is available on macOS through Homebrew. To install gtime, open Terminal and run the following command:
brew install gtime
I don't know how to make the time command work across the three major OSes. If you figure out a good cross-platform solution, please let me know.