X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=libraries%2FMakefile;h=190e9ce5891e0183ad2405df53b133496ab9753f;hb=0c129b0785e6d5f3a5bc5e5c006fadc7d8af3a7a;hp=e9f90d37d753e56256cc287a5e2f723af9b75f23;hpb=d8ca7c9ed01c99475367520dcd4906571355a4a1;p=ghc-hetmet.git diff --git a/libraries/Makefile b/libraries/Makefile index e9f90d3..190e9ce 100644 --- a/libraries/Makefile +++ b/libraries/Makefile @@ -62,13 +62,7 @@ SUBDIRS += $(wildcard QuickCheck) SUBDIRS += $(wildcard HUnit) SUBDIRS += $(wildcard mtl) SUBDIRS += $(wildcard fgl) -SUBDIRS += $(wildcard X11) SUBDIRS += $(wildcard time) -ifeq "$(Windows)" "NO" -# HGL is not working on Win32, so omit it for now. Better not to ship it -# at all than to ship a broken version. -SUBDIRS += $(wildcard HGL) -endif SUBDIRS += $(wildcard OpenGL) SUBDIRS += $(wildcard GLUT) SUBDIRS += $(wildcard OpenAL) @@ -76,7 +70,6 @@ SUBDIRS += $(wildcard ALUT) SUBDIRS += $(wildcard stm) SUBDIRS += $(wildcard xhtml) SUBDIRS += $(wildcard cgi) -SUBDIRS += $(wildcard arrows) ifeq "$(GhcLibsWithObjectIO)" "YES" SUBDIRS += $(wildcard ObjectIO) endif @@ -140,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)) @@ -257,12 +254,19 @@ stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).%: %/setup/Setup # build dies! # Build the library using 'make' +# We re-run 'setup makefile' each time, just in case any preprocessing +# needs to be done. However, we're careful not to overwrite GNUmakefile +# if it hasn't changed, so that dependency-generation isn't forced +# every time. $(foreach SUBDIR,$(SUBDIRS),make.library.$(SUBDIR)):\ make.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \ - %/GNUmakefile \ %/setup/Setup ifBuildable/ifBuildable if ifBuildable/ifBuildable $*; then \ cd $* && \ + cmp -s ../Makefile.local Makefile.local || cp ../Makefile.local .; \ + mv GNUmakefile GNUmakefile.tmp; \ + setup/Setup makefile -f GNUmakefile; \ + cmp -s GNUmakefile GNUmakefile.tmp && mv GNUmakefile.tmp GNUmakefile; \ $(MAKE) $(MFLAGS) && \ setup/Setup register --inplace; \ fi @@ -276,25 +280,24 @@ build.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \ setup/Setup build $(addprefix --ghc-option=,$(GhcLibHcOpts)); \ fi -$(foreach SUBDIR,$(SUBDIRS),$(SUBDIR)/GNUmakefile):\ -%/GNUmakefile: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \ - %/setup/Setup ifBuildable/ifBuildable - $(RM) $*/GNUmakefile - cp Makefile.local $* - if ifBuildable/ifBuildable $*; then \ - cd $* && setup/Setup makefile -f GNUmakefile; \ - fi +.PHONY: doc html -.PHONY: doc +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='../$$pkgid' \ + $(CABAL_HADDOCK_FLAGS); \ fi .PHONY: distclean clean clean.library.% @@ -393,3 +396,10 @@ binary-dist.library.%: \( \( -name "*.o" -o -name "*.p_o" \) -a ! -name "HS*" \) \ -exec rm {} \; ; \ fi + +# Ignore some doc targets that we don't support +# The root recurses into us when these targets are made +.PHONY: html-no-chunks chm HxS fo dvi ps pdf +html-no-chunks chm HxS fo dvi ps pdf: + @: +