diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 18 | ||||
-rwxr-xr-x | gen-other-modules.sh | 32 | ||||
-rwxr-xr-x[-rw-r--r--] | git-annex.cabal.template.sh | 20 |
4 files changed, 62 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore index 1de0aaf72..74c0e672a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ test configure Build/SysConfig.hs git-annex +git-annex.cabal git-annex.1 git-annex-shell.1 git-union-merge.1 @@ -98,16 +98,20 @@ docs: $(mans) clean: rm -rf tmp $(bins) $(mans) test configure *.tix .hpc $(sources) \ - doc/.ikiwiki html dist $(clibs) + doc/.ikiwiki html dist $(clibs) git-annex.cabal # Workaround for cabal sdist not running Setup hooks, so I cannot # generate a file list there. -sdist: clean - @make $(mans) - @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 -not -type d -print | perl -ne 'print unless length >= 100')!i" < git-annex.cabal.orig > git-annex.cabal - @cabal sdist - @mv git-annex.cabal.orig git-annex.cabal +sdist: clean $(mans) + # Could make this a .PHONY, but it needs to be rerun each time, + # unless we want to list a *lot* of dependencies. + ./git-annex.cabal.template.sh > git-annex.cabal + # Complains about not running 'configure' first, but adding + # + # cabal configure + # + # does not help. + cabal sdist # Upload to hackage. hackage: sdist diff --git a/gen-other-modules.sh b/gen-other-modules.sh new file mode 100755 index 000000000..3c50d91e7 --- /dev/null +++ b/gen-other-modules.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Generate module list for 'Other-Modules:' field in git-annex.cabal. +# This would be simpler if the code were under ./src. + +find Annex Annex.hs \ + Backend Backend.hs \ + Build \ + Checks.hs \ + CmdLine.hs \ + Command Command.hs \ + Common Common.hs \ + Config.hs \ + Crypto.hs \ + Git Git.hs \ + GitAnnex.hs \ + GitAnnexShell.hs \ + Init.hs \ + Limit.hs \ + Locations.hs \ + Logs \ + Messages Messages.hs \ + Option.hs \ + Remote Remote.hs \ + Seek.hs \ + Setup.hs \ + Types Types.hs \ + Upgrade Upgrade.hs \ + Usage.hs \ + Utility \ + -name '*.hs' \ +| sed -r -e 's!.hs!!' -e 's!/!.!g' diff --git a/git-annex.cabal.template.sh b/git-annex.cabal.template.sh index c15167831..46eaad745 100644..100755 --- a/git-annex.cabal.template.sh +++ b/git-annex.cabal.template.sh @@ -1,3 +1,9 @@ +#!/bin/bash + +# Template for git-annex.cabal: the 'Other-Module:' fields are +# dynamically generated. + +cat <<EOF Name: git-annex Version: 3.20120605 Cabal-Version: >= 1.8 @@ -7,7 +13,6 @@ Author: Joey Hess Stability: Stable Copyright: 2010-2012 Joey Hess License-File: GPL -Extra-Source-Files: use-make-sdist-instead Homepage: http://git-annex.branchable.com/ Build-type: Custom Category: Utility @@ -25,6 +30,9 @@ Description: versioned files, which is convenient for maintaining documents, Makefiles, etc that are associated with annexed files but that benefit from full revision control. +Extra-Source-Files: + git-annex.1 git-annex-shell.1 + INSTALL README CHANGELOG NEWS GPL Flag S3 Description: Enable S3 support @@ -36,7 +44,10 @@ Executable git-annex pcre-light, extensible-exceptions, dataenc, SHA, process, json, HTTP, base == 4.5.*, monad-control, transformers-base, lifted-base, IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance - Other-Modules: Utility.Touch + Other-Modules: + Utility.Touch + -- Auto-generated list of all Haskell modules: +`./gen-other-modules.sh | xargs -n1 -i echo ' '{}` C-Sources: Utility/libdiskfree.c Extensions: CPP @@ -53,8 +64,13 @@ Test-Suite test base == 4.5.*, monad-control, transformers-base, lifted-base, IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance C-Sources: Utility/libdiskfree.c + Other-Modules: + Utility.Touch + -- Auto-generated list of all Haskell modules: +`./gen-other-modules.sh | xargs -n1 -i echo ' '{}` Extensions: CPP source-repository head type: git location: git://git-annex.branchable.com/ +EOF |