Makefile: Support newer versions of cabal that use the new-build system.
Unfortunately, cabal puts the binary in a very complicated path and does not provide any good way to get it out, leaving no good choice except to use find. It may be possible to use cabal (new-)install --symlink-bindir, and ask it to symlink to pwd, but with my older version of cabal, that does not work. The stack branch will probably also break once it uses a newer cabal, didn't try to deal with that.
This commit is contained in:
parent
17b3c66a61
commit
3d00a8a1dc
2 changed files with 7 additions and 2 deletions
|
@ -24,6 +24,7 @@ git-annex (8.20200221) UNRELEASED; urgency=medium
|
|||
* initremote, enableremote: Set remote.name.skipFetchAll when
|
||||
the remote cannot be fetched from by git, so git fetch --all
|
||||
will not try to use it.
|
||||
* Makefile: Support newer versions of cabal that use the new-build system.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Wed, 19 Feb 2020 12:48:58 -0400
|
||||
|
||||
|
|
8
Makefile
8
Makefile
|
@ -44,10 +44,14 @@ tmp/configure-stamp: Build/TestConfig.hs Build/Configure.hs
|
|||
|
||||
git-annex: tmp/configure-stamp
|
||||
$(BUILDER) build $(BUILDERCOMMONOPTIONS) $(BUILDEROPTIONS)
|
||||
if [ "$(BUILDER)" = stack ]; then \
|
||||
@if [ "$(BUILDER)" = stack ]; then \
|
||||
ln -sf $$(stack path $(BUILDERCOMMONOPTIONS) --dist-dir)/build/git-annex/git-annex git-annex; \
|
||||
else \
|
||||
ln -sf dist/build/git-annex/git-annex git-annex; \
|
||||
if [ -d dist-newstyle ]; then \
|
||||
ln -sf $$(find dist-newstyle/ -executable -type f |grep 'git-annex$$') git-annex; \
|
||||
else \
|
||||
ln -sf dist/build/git-annex/git-annex git-annex; \
|
||||
fi; \
|
||||
fi
|
||||
|
||||
git-annex-shell: git-annex
|
||||
|
|
Loading…
Reference in a new issue