all: test lib DEPLOY_DEST ?= vps:/var/www/naproche.org/ RSYNC_FLAGS ?= -az --delete-delay --itemize-changes --exclude=".DS_Store" TYPED_LIBRARY_ROOT := library/everything.tex # The active aggregate covers the complete production library graph. .PHONY: lib lib: stack build @set -e; \ store_dir="$$(mktemp -d "$${TMPDIR:-/tmp}/felix-lib.XXXXXX")"; \ trap 'rm -rf "$$store_dir"' EXIT; \ printf 'Verifying %s\n' "$(TYPED_LIBRARY_ROOT)"; \ time stack exec zf -- --store "$$store_dir/store.sqlite" \ --log "$(TYPED_LIBRARY_ROOT)" -t 20 .PHONY: dump dump: stack build @dump_dir="$(DUMP_DIR)"; \ if test -z "$$dump_dir"; then \ dump_dir="$$(mktemp -d "$${TMPDIR:-/tmp}/felix-dump.XXXXXX")"; \ fi; \ printf 'Writing dump to %s\n' "$$dump_dir"; \ time stack exec zf -- --fresh --log library/everything.tex -t 17 --dump "$$dump_dir" .PHONY: build build: stack build .PHONY: test golden test: stack test golden: stack test --test-arguments "--accept" .PHONY: publish publish: rsync $(RSYNC_FLAGS) html/ $(DEPLOY_DEST) .PHONY: profile profile: stack --work-dir .stack-work-profile build --profile --ghc-options "-fprof-auto -fprof-cafs" stack --work-dir .stack-work-profile exec --profile zf -- debug/formalizations_with_section_20_up_to_euclidean_metric_theorem.tex +RTS -s -p ghc-prof-flamegraph zf.prof .PHONY: profilenominal profilenominal: stack --work-dir .stack-work-profile build --profile --ghc-options "-fprof-auto -fprof-cafs" stack --work-dir .stack-work-profile exec --profile zf -- debug/formalizations_with_section_20_up_to_euclidean_metric_theorem.tex --nominal +RTS -s -p ghc-prof-flamegraph zf.prof .PHONY: profilemem profilemem: stack --work-dir .stack-work-profile build --profile --ghc-options "-fprof-auto -fprof-cafs" stack --work-dir .stack-work-profile exec --profile zf -- debug/formalizations_with_section_20_up_to_euclidean_metric_theorem.tex +RTS -hc -RTS hp2ps zf.hp gs -q -dNOPAUSE -dBATCH -sOutputFile=temp.ps -sDEVICE=ps2write -c "<> setpagedevice" -- zf.ps && mv temp.ps zf.ps .PHONY: profileparser profileparser: stack --work-dir .stack-work-profile build --profile --ghc-options "-fprof-auto -fprof-cafs" stack --work-dir .stack-work-profile exec --profile zf -- debug/formalizations_with_section_20_up_to_euclidean_metric_theorem.tex --parseonly +RTS -p ghc-prof-flamegraph zf.prof