X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=libraries%2FMakefile;h=190e9ce5891e0183ad2405df53b133496ab9753f;hb=07cb9d54f596197a1ddd01cb96461a358dd9c684;hp=9dc67d2e6729c9dfa0a5f70613e07ff21b0e1c8a;hpb=cea73c10e1c6fd7a874dca190d353f5eac6c7bf6;p=ghc-hetmet.git diff --git a/libraries/Makefile b/libraries/Makefile index 9dc67d2..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,15 +280,6 @@ 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 html: doc @@ -292,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='../$$pkgid' \ + $(CABAL_HADDOCK_FLAGS); \ fi .PHONY: distclean clean clean.library.%