Consistently put www. on the front of haskell.org in URLs
[ghc-hetmet.git] / libraries / Makefile
index 7cf8238..ab5337f 100644 (file)
@@ -95,9 +95,9 @@ ibindir             = $$topdir
 ilibdir             = $$topdir
 ilibexecdir         = $$topdir
 idatadir            = $$topdir
-idocdir             = $$topdir/doc/libraries/$$pkgid
-iinterfacedir       = $$topdir/doc/libraries/$$pkgid
-ihtmldir            = $$httptopdir/doc/libraries/$$pkgid
+idocdir             = $$topdir/doc/libraries/$$pkg
+iinterfacedir       = $$topdir/doc/libraries/$$pkg
+ihtmldir            = $$httptopdir/doc/libraries/$$pkg
 html_installed_root = $(prefix)/doc/libraries
 else
 # On non-Windows we can just give absolute paths all the time, and
@@ -107,9 +107,9 @@ ibindir             = $(bindir)
 ilibdir             = $(libdir)
 ilibexecdir         = $(libexecdir)
 idatadir            = $(datadir)
-idocdir             = $(docdir)/libraries/$$pkgid
-iinterfacedir       = $(htmldir)/libraries/$$pkgid
-ihtmldir            = $(htmldir)/libraries/$$pkgid
+idocdir             = $(docdir)/libraries/$$pkg
+iinterfacedir       = $(htmldir)/libraries/$$pkg
+ihtmldir            = $(htmldir)/libraries/$$pkg
 html_installed_root = $(htmldir)/libraries
 endif
 
@@ -133,6 +133,10 @@ CONFIGURE_OPTS += --enable-split-objs
 CONFIGURE_STAMP_EXTRAS := $(CONFIGURE_STAMP_EXTRAS)-splitting
 endif
 
+ifneq "$(HSCOLOUR)" ""
+CONFIGURE_OPTS += --with-hscolour=$(HSCOLOUR)
+endif
+
 BOOTSTRAP_LIBS = Cabal filepath
 BOOTSTRAP_STAMPS = $(addprefix stamp/bootstrapping.,$(BOOTSTRAP_LIBS))
 BOOTSTRAP_INC_1_UP = -DCABAL_VERSION=1,3 $(addprefix -i../bootstrapping.,$(BOOTSTRAP_LIBS))
@@ -283,11 +287,17 @@ html: doc
 doc: $(foreach SUBDIR,$(SUBDIRS),doc.library.$(SUBDIR))
        sh gen_contents_index --inplace
 
+# Making hyperlinked source only works if we have hscolour
+ifneq "$(HSCOLOUR)" ""
+CABAL_HADDOCK_FLAGS=--hyperlink-source
+endif
+
 $(foreach SUBDIR,$(SUBDIRS),doc.library.$(SUBDIR)):\
 doc.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \
                %/setup/Setup ifBuildable/ifBuildable
        if ifBuildable/ifBuildable $*; then \
-         cd $* && setup/Setup haddock --html-location='../$$pkgid'; \
+         cd $* && setup/Setup haddock --html-location='../$$pkg' \
+                                      $(CABAL_HADDOCK_FLAGS); \
        fi
 
 .PHONY: distclean clean clean.library.%