From 6366fe49c2e02071fdaf8f71dfec09beb04d35b9 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 20 Mar 2009 15:43:42 +0000 Subject: new GHC build system: use shell-wrappers macro --- ghc.mk | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/ghc.mk b/ghc.mk index 26df0452..c7c73b54 100644 --- a/ghc.mk +++ b/ghc.mk @@ -4,32 +4,8 @@ utils/haddock_PACKAGE = haddock utils/haddock_CONFIGURE_OPTS = --flag in-ghc-tree # XXX This is a temporary hack: utils/haddock_HC_OPTS += -Wwarn - -ifeq "$(Windows)" "YES" +utils/haddock_dist_SHELL_WRAPPER = YES utils/haddock_dist_PROG = haddock -else -utils/haddock_dist_PROG = haddock-real - -$(INPLACE_BIN)/haddock: $(INPLACE_BIN)/haddock-real - $(RM) -f $@ - echo '#!$(SHELL)' >> $@ - echo 'executablename=$(FPTOOLS_TOP_ABS)/$<' >> $@ - echo 'datadir=$(FPTOOLS_TOP_ABS)/inplace/lib' >> $@ - cat utils/haddock/haddock.wrapper >> $@ - $(EXECUTABLE_FILE) $@ - -.PHONY: install_utils/haddock_dist_wrapper -install: install_utils/haddock_dist_wrapper - -install_utils/haddock_dist_wrapper: WRAPPER=$(DESTDIR)$(bindir)/haddock -install_utils/haddock_dist_wrapper: - $(RM) -f $(WRAPPER) - echo '#!$(SHELL)' >> $(WRAPPER) - echo 'executablename=$(bindir)/haddock-real' >> $(WRAPPER) - echo 'datadir=$(datadir)' >> $(WRAPPER) - cat utils/haddock/haddock.wrapper >> $(WRAPPER) - $(EXECUTABLE_FILE) $(WRAPPER) -endif $(INPLACE_BIN)/$(utils/haddock_dist_PROG): inplace/lib/html @@ -37,9 +13,8 @@ inplace/lib/html: $(RM) -rf $@ cp -a utils/haddock/html $@ -utils/haddock_dist_INSTALL = YES +INSTALL_LIBEXECS += utils/haddock/dist/build/$(utils/haddock_dist_PROG) $(eval $(call build-prog,utils/haddock,dist,2)) utils/haddock_dist_MODULES += Paths_haddock - -- cgit v1.2.3