Attached is my change to support this.

On Wed, Aug 5, 2009 at 2:44 PM, David Fox <[email protected]> wrote:

> I think it was just a local version of hlibrary.mk that had that feature.
>
>
> On Wed, Aug 5, 2009 at 2:13 PM, David Fox <[email protected]> wrote:
>
>> This wouldn't matter if haddock didn't take an incredibly long time for
>> some of my packages.  It used to be that haddock wouldn't run if there was
>> no binary package with the suffix -doc in the control file, but with the
>> current haskell-devscripts (or hlibrary.mk?) it seems to run regardless.
>>
>
>
--- hlibrary.mk~	2009-07-24 06:24:10.000000000 -0700
+++ hlibrary.mk	2009-08-05 15:08:04.000000000 -0700
@@ -23,6 +23,7 @@
 CABAL_EXECS = $(shell sed 's/\r$$//' *.cabal | sed -n 's/^[Ee]xecutable[ \t:][ \t:]*\(.*\)\s*/\1/p')
 
 ENABLE_PROFILING = $(shell egrep -qe '^Package: libghc6-.*-prof$$' debian/control && echo --enable-library-profiling; exit 0)
+ENABLE_DOC = $(shell egrep -qe '^Package: .*-doc$$' debian/control && echo 1; exit 0)
 
 DEB_COMPRESS_EXCLUDE += .haddock
 
@@ -92,7 +93,7 @@
 
 build-haddock-stamp:
 	mv dist-ghc6 dist
-	[ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock $(DEB_HADDOCK_OPTS)
+	[ ! -x /usr/bin/haddock -o \"$(ENABLE_DOC)\" != \"1\" ] || $(DEB_SETUP_BIN_NAME) haddock $(DEB_HADDOCK_OPTS)
 	mv dist dist-ghc6
 	touch build-haddock-stamp
 

Reply via email to