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
This commit is contained in:
Joey Hess 2017-02-21 13:55:41 -04:00
parent 69f7b8af48
commit 3af9f5ed1a
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -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)"