aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 0bc02dc35..afd2de99e 100644
--- a/Makefile
+++ b/Makefile
@@ -87,4 +87,12 @@ clean:
rm -rf doc/.ikiwiki html dist
find . \( -name \*.o -or -name \*.hi \) -exec rm {} \;
+# Workaround for cabal sdist not running Setup hooks, so I cannot
+# generate a file list there.
+sdist: clean
+ @if [ ! -e git-annex.cabal.orig ]; then cp git-annex.cabal git-annex.cabal.orig; fi
+ @sed -e "s!\(Extra-Source-Files: \).*!\1$(shell find . -name .git -prune -or -not -name \\*.orig -type f -print)!i" < git-annex.cabal.orig > git-annex.cabal
+ @cabal sdist
+ @mv git-annex.cabal.orig git-annex.cabal
+
.PHONY: $(bins) test install