From 9d2e8e2caae0e84c549a930bd81455feec0273ce Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 15 Sep 2023 08:10:32 -0400 Subject: [PATCH] new make dev target rename old to make prof --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5688430464..e8b6a19fb0 100644 --- a/Makefile +++ b/Makefile @@ -43,12 +43,16 @@ tmp/configure-stamp: Build/TestConfig.hs Build/Configure.hs mkdir -p tmp touch tmp/configure-stamp +# Build with stack if it was used to build before, otherwise cabal. +dev: + @if [ -d .stack-work ]; then BUILDER=stack make; else make; fi + # Non-optimised build for development, with profiling enabled (for memory # profiling). # -# This leaves cabal.project.local configured for a dev build, -# so just running make will continue to do dev builds. -dev: +# This leaves cabal.project.local configured for a prof build, +# so just running make will continue to do prof builds. +prof: $(BUILDER) configure -f"-Production" \ --enable-executable-dynamic --enable-profiling rm cabal.project.local~* 2>/dev/null || true