[Pkg-haskell-commits] darcs: haskell-devscripts: Allow building of documentation when when package has no Haskell modules

David Fox dsf at seereason.com
Tue Mar 31 17:25:42 UTC 2015


Tue Mar 31 17:16:05 UTC 2015  David Fox <dsf at seereason.com>
  * Allow building of documentation when when package has no Haskell modules

    M ./hlibrary.mk -3 +4

Tue Mar 31 17:16:05 UTC 2015  David Fox <dsf at seereason.com>
  * Allow building of documentation when when package has no Haskell modules
diff -rN -u old-haskell-devscripts/hlibrary.mk new-haskell-devscripts/hlibrary.mk
--- old-haskell-devscripts/hlibrary.mk	2015-03-31 17:25:42.734416444 +0000
+++ new-haskell-devscripts/hlibrary.mk	2015-03-31 17:25:42.774416501 +0000
@@ -146,7 +146,8 @@
 build/libghc-$(CABAL_PACKAGE)-prof build/libghc-$(CABAL_PACKAGE)-dev:: build-ghc-stamp check-ghc-stamp
 
 build-haddock-stamp:
-	[ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock --builddir=dist-ghc $(DEB_HADDOCK_OPTS)
+	[ ! -x /usr/bin/haddock ] || $(DEB_SETUP_BIN_NAME) haddock --builddir=dist-ghc $(DEB_HADDOCK_OPTS) || \
+	  echo "Haddock failed (no modules?), creating empty documentation package."
 	touch build-haddock-stamp
 
 build/haskell-$(CABAL_PACKAGE)-doc build/libghc-$(CABAL_PACKAGE)-doc:: configure-ghc-stamp build-haddock-stamp
@@ -168,7 +169,7 @@
 DEB_LINTIAN_OVERRIDES_FILE = debian/libghc-$(CABAL_PACKAGE)-dev.lintian-overrides
 
 install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc debian/extra-depends
-	cd debian/tmp-inst-ghc ; find usr/lib/haskell-packages/ghc/lib/ \
+	cd debian/tmp-inst-ghc ; mkdir -p usr/lib/haskell-packages/ghc/lib ; find usr/lib/haskell-packages/ghc/lib/ \
 		\( ! -name "*_p.a" ! -name "*.p_hi" \) \
 		-exec install -Dm 644 '{}' ../$(notdir $@)/'{}' ';'
 	pkg_config=`$(DEB_SETUP_BIN_NAME) register --builddir=dist-ghc --gen-pkg-config | tr -d ' \n' | sed -r 's,^.*:,,'`; \
@@ -187,7 +188,7 @@
 	dh_haskell_shlibdeps -p$(notdir $@)
 
 install/libghc-$(CABAL_PACKAGE)-prof:: debian/tmp-inst-ghc install/libghc-$(CABAL_PACKAGE)-dev debian/extra-depends
-	cd debian/tmp-inst-ghc ; find usr/lib/haskell-packages/ghc/lib/ \
+	cd debian/tmp-inst-ghc ; mkdir -p usr/lib/haskell-packages/ghc/lib ; find usr/lib/haskell-packages/ghc/lib/ \
 		! \( ! -name "*_p.a" ! -name "*.p_hi" \) \
 		-exec install -Dm 644 '{}' ../$(notdir $@)/'{}' ';'
 	dh_haskell_provides -p$(notdir $@)




More information about the Pkg-haskell-commits mailing list