From 3676b91a6e59b11b89744ea9ddb9361dbbf9ddcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Louren=C3=A7o?= Date: Sun, 19 Nov 2023 17:28:24 +0000 Subject: [PATCH] Fixed makefile for printing timmings using l3benchmark --- Makefile | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e1187145..ec2f1229 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,13 @@ SILENT:=-interaction=batchmode SYNCTEX:=1 TEXVERSIONS=$(shell ls /usr/local/texlive/ | fgrep -v texmf-local) +TIMES=$(shell printf "TIMMINGS for last run:" ;\ + fgrep "TIME process" -A 1 *.log | while read a; do \ + read b; read c; \ + S=`echo $$a | cut -d ' ' -f3 | cut -d '=' -f 1`; \ + T=`echo $$b | cut -d ':' -f 2 | cut -d ' ' -f 2`; \ + printf "\n%12s = %7.2f s" "$$S" "$$T"; \ + done | tr '\n ' '\1\2') B:=template F:=-time -shell-escape -synctex=$(SYNCTEX) -output-format=pdf -file-line-error $(FLAGS) @@ -41,12 +48,12 @@ $(T): $(S) .PHONY: pdf pdf: $(S) $(L) -pdf $(SILENT) $(B) - Scripts/times.sh + @echo $(TIMES) | tr '\1@\2' '\n\t ' .PHONY: xe lua xe lua: $(S) $(L) -pdf$@ $(SILENT) $(B) - Scripts/times.sh + @echo $(TIMES) | tr '\1@\2' '\n\t ' .PHONY: v view v view: $(T) @@ -55,7 +62,7 @@ v view: $(T) .PHONY: vv verb verbose vv verb verbose: $(L) -pdf $(B) - Scripts/times.sh + @echo $(TIMES) | tr '\1@\2' '\n\t ' .PHONY: $(TEXVERSIONS) $(TEXVERSIONS): @@ -109,6 +116,16 @@ bump3: Scripts/newversion.sh 3 # $(MAKE) publish +.PHONY: times +times: + @echo $(TIMES) | tr '\1@\2' '\n\t ' +# fgrep "TIME process" -A 1 *.log | while read a; do \ +# read b; read c; \ +# S=`echo $$a | cut -d ' ' -f3 | cut -d '=' -f 1`; \ +# T=`echo $$b | cut -d ':' -f 2`; \ +# echo TIME $$S =$$T; \ +# done + commit: git cam "Version $(VERSION)." git checkout main