summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-02-21 13:55:41 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-02-21 13:55:41 -0400
commit3dc6aa3f53dc17573996a3ceae32f80dfd9e7094 (patch)
treebc322da268f304c0c7324d6816e49367a6cbd4e2 /Makefile
parent5c71414c88ec116be7ef78d4806d0ab4bdcfa4a3 (diff)
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
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 5 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index ec5fcf246..edef0c6ec 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)"