Conversation
|
There are non-linux OSes running GNU time. How about using |
|
@unleashed then those users can contribute that feature, right? :) This is improving it significantly for macOS users. |
|
It's not a feature, but doing this right: you want to avoid using GNU time's features if you don't have GNU time. We'd also be better off providing a similar behaviour if possible/easy instead of disabling it. Here we want to store the timing data to be shown at the end of the process - so if Something like |
|
@unleashed but no one cares about this feature on Darwin. First person that comes and cares can do that. |
Due to differences between bsd time and gnu time command, this commits uses a different strategy for saving the overall time depending on the time command.
0fbc53f to
69a786b
Compare
|
@unleashed @mikz Updated the PR, please review, now we check if the time command supports --version (gnu) and choose between two different strategies. |
| shift # get rid of the '-c' supplied by make. | ||
|
|
||
| \time -o bench.txt -a -f "[%E] : $*" -- sh -c "$*" | ||
| if command time --version > /dev/null 2>&1 |
There was a problem hiding this comment.
Unfortunately this does not work in zsh.
$ command time --version
time: illegal option -- -
usage: time [-lp] command.I'm for dropping this feature altogether and let people opt in by setting on SHELL instead of this being in the Makefile:
Line 3 in 2aef665
There was a problem hiding this comment.
@mikz this should be interpreted by /bin/sh not zsh, working fine for me, with zsh.
|
bors r+ |
Build succeeded |
Due to differences between bsd time and gnu time command,
the current makefile files to run under Darwin.
This commit disables writing "bench.txt" for non linux systems.