From 3af9f5ed1a54f1df12f85f613826040e5e855817 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 21 Feb 2017 13:55:41 -0400 Subject: [PATCH] remove Build/SysConfig.hs target The problem with that target was, if a target like git-annex that depended on it failed for some reason, make would delete Build/SysConfig.hs, since it knows it's an intermediate file. But, since stack only builds that file once, that caused all subsequent make git-annex builds to fail. Also, this avoids a double stack build when building with stack. Since stack has no configure stage, and the Build/SysConfig.hs target was about running the configure stage, the only way to only build once is to combine the targets like this. This should work better on the autobuilders that build with stack. This commit was sponsored by NSF-funded DataLad project --- Makefile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index ec5fcf2462..edef0c6eca 100644 --- a/Makefile +++ b/Makefile @@ -14,15 +14,11 @@ endif build: $(all) -Build/SysConfig.hs: Build/TestConfig.hs Build/Configure.hs +git-annex: if [ "$(BUILDER)" = ./Setup ]; then ghc --make Setup; fi - if [ "$(BUILDER)" = stack ]; then \ - $(BUILDER) build $(BUILDEROPTIONS); \ - else \ + if [ "$(BUILDER)" != stack ]; then \ $(BUILDER) configure --ghc-options="$(shell Build/collect-ghc-options.sh)"; \ fi - -git-annex: Build/SysConfig.hs $(BUILDER) build $(BUILDEROPTIONS) if [ "$(BUILDER)" = stack ]; then \ ln -sf $$(find .stack-work/ -name git-annex -type f | grep build/git-annex/git-annex | tail -n 1) git-annex; \ @@ -112,7 +108,7 @@ Build/InstallDesktopFile: Build/InstallDesktopFile.hs $(GHC) --make $@ -Wall -fno-warn-tabs Build/EvilSplicer: Build/EvilSplicer.hs $(GHC) --make $@ -Wall -fno-warn-tabs -Build/Standalone: Build/Standalone.hs Build/SysConfig.hs +Build/Standalone: Build/Standalone.hs git-annex $(GHC) --make $@ -Wall -fno-warn-tabs Build/OSXMkLibs: Build/OSXMkLibs.hs $(GHC) --make $@ -Wall -fno-warn-tabs @@ -123,8 +119,8 @@ Build/MakeMans: Build/MakeMans.hs LINUXSTANDALONE_DEST=tmp/git-annex.linux linuxstandalone: - $(MAKE) git-annex linuxstandalone-nobuild -linuxstandalone-nobuild: Build/Standalone Build/LinuxMkLibs + $(MAKE) git-annex linuxstandalone-image +linuxstandalone-image: Build/Standalone Build/LinuxMkLibs rm -rf "$(LINUXSTANDALONE_DEST)" mkdir -p tmp cp -R standalone/linux/skel "$(LINUXSTANDALONE_DEST)"