aboutsummaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-03-20 15:43:42 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-03-20 15:43:42 +0000
commit6366fe49c2e02071fdaf8f71dfec09beb04d35b9 (patch)
tree7b954d2db76058a30410f2f492ab54db0983a5d1 /ghc.mk
parentceeaac950bb3d1eb49f72f692c298f339a0d0793 (diff)
new GHC build system: use shell-wrappers macro
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk29
1 files 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
-