aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-03-01 14:59:35 +0000
committerIan Lynagh <igloo@earth.li>2009-03-01 14:59:35 +0000
commitdc57b9729e2709b3ee59df183186047e287511a3 (patch)
tree0ace006f6614f54bf4e6fe7b39f3ef84a8c459c5
parentde7b76e48fff5c85aca088663f239580233ce637 (diff)
Install haddock in the new GHC build system
-rw-r--r--ghc.mk24
1 files changed, 19 insertions, 5 deletions
diff --git a/ghc.mk b/ghc.mk
index 92b16f0a..26df0452 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -11,12 +11,24 @@ else
utils/haddock_dist_PROG = haddock-real
$(INPLACE_BIN)/haddock: $(INPLACE_BIN)/haddock-real
- $(RM) -f $@
- echo '#!$(SHELL)' >> $@
- echo 'executablename=$(FPTOOLS_TOP_ABS)/$<' >> $@
+ $(RM) -f $@
+ echo '#!$(SHELL)' >> $@
+ echo 'executablename=$(FPTOOLS_TOP_ABS)/$<' >> $@
echo 'datadir=$(FPTOOLS_TOP_ABS)/inplace/lib' >> $@
- cat utils/haddock/haddock.wrapper >> $@
- $(EXECUTABLE_FILE) $@
+ 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
@@ -25,6 +37,8 @@ inplace/lib/html:
$(RM) -rf $@
cp -a utils/haddock/html $@
+utils/haddock_dist_INSTALL = YES
+
$(eval $(call build-prog,utils/haddock,dist,2))
utils/haddock_dist_MODULES += Paths_haddock