summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-03-21 16:19:09 +0000
committerIan Lynagh <igloo@earth.li>2010-03-21 16:19:09 +0000
commite95140a5c350360b1f8e3f1e789ec4a5eebf95f3 (patch)
tree891e328712529a0fb00da38984846805892adda6
parent15f7bc388dc47147bfcbb07f43afb70788369d4e (diff)
downloadhaskell-e95140a5c350360b1f8e3f1e789ec4a5eebf95f3.tar.gz
Add the external core PDF to the new build system
-rw-r--r--docs/ext-core/Makefile63
-rw-r--r--docs/ext-core/ghc.mk15
-rw-r--r--docs/users_guide/using.xml2
-rw-r--r--ghc.mk1
-rw-r--r--mk/config.mk.in2
5 files changed, 21 insertions, 62 deletions
diff --git a/docs/ext-core/Makefile b/docs/ext-core/Makefile
index 8d97588389..603a670662 100644
--- a/docs/ext-core/Makefile
+++ b/docs/ext-core/Makefile
@@ -1,62 +1,3 @@
+dir = docs/users_guide
TOP = ../..
-include $(TOP)/mk/boilerplate.mk
-
-ifeq "$(LATEX_DOCS)" "YES"
-all: pdf
-
-install-docs:
- -mkdir $(docdir)/ext-core
- cp core.pdf $(docdir)/ext-core/
-else
-all:
-install-docs:
-endif
-
-# General makefile for Latex stuff
-
-LATEX=latex \\nonstopmode \\input
-PDFLATEX=pdflatex
-BIBTEX=bibtex
-
-dvi: core.dvi
-ps: core.ps core.ps.gz
-pdf: core.pdf
-
-core.pdf: core.tex
- $(PDFLATEX) core.tex
- $(BIBTEX) core
- $(PDFLATEX) core.tex
- $(PDFLATEX) core.tex
-
-######## General rules
-.SUFFIXES:
-.PRECIOUS: %.tex %.ps %.ps.gz %.pdf %.bbl
-
-
-%.gz: %
- gzip < $< > $@
-
-%.ps: %.dvi
- dvips -f < $< > $@
-
-%.pdf: %.ps
- ps2pdf $< $@
-
-clean:
- $(RM) *.aux *.log
-
-distclean: clean
- $(RM) prims.tex *.dvi *.ps *.pdf *.bbl *.blg *.gz
-
-maintainer-clean: distclean
-
-include $(TOP)/mk/bindist.mk
-
-# dummy targets
-boot:
-install:
-html:
-chm:
-HxS:
-
-# End of file
+include $(TOP)/mk/sub-makefile.mk
diff --git a/docs/ext-core/ghc.mk b/docs/ext-core/ghc.mk
new file mode 100644
index 0000000000..47e56c099b
--- /dev/null
+++ b/docs/ext-core/ghc.mk
@@ -0,0 +1,15 @@
+
+ifeq "$(LATEX_DOCS)" "YES"
+$(eval $(call all-target,docs/ext-core,docs/ext-core/core.pdf))
+
+INSTALL_DOCS += docs/ext-core/core.pdf
+endif
+
+ifneq "$(BINDIST)" "YES"
+docs/ext-core/core.pdf: docs/ext-core/core.tex
+ cd docs/ext-core && $(PDFLATEX) core.tex
+ cd docs/ext-core && $(BIBTEX) core
+ cd docs/ext-core && $(PDFLATEX) core.tex
+ cd docs/ext-core && $(PDFLATEX) core.tex
+endif
+
diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml
index 88e0ab21fb..6ffdf2a418 100644
--- a/docs/users_guide/using.xml
+++ b/docs/users_guide/using.xml
@@ -2125,7 +2125,7 @@ statements or clauses.
<para>GHC can dump its optimized intermediate code (said to be in &ldquo;Core&rdquo; format)
to a file as a side-effect of compilation. Non-GHC back-end tools can read and process Core files; these files have the suffix
- <filename>.hcr</filename>. The Core format is described in <ulink url="../ext-core/core.pdf">
+ <filename>.hcr</filename>. The Core format is described in <ulink url="../../core.pdf">
<citetitle>An External Representation for the GHC Core Language</citetitle></ulink>,
and sample tools
for manipulating Core files (in Haskell) are in the GHC source distribution
diff --git a/ghc.mk b/ghc.mk
index 7b29d6d224..cc5e527e51 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -494,6 +494,7 @@ endif
BUILD_DIRS += \
docs/users_guide \
+ docs/ext-core \
docs/man \
libraries/Cabal/doc \
$(GHC_UNLIT_DIR) \
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 043472a085..d3b656a326 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -587,6 +587,8 @@ INSTALL = @INSTALL@
#
INSTALL := $(subst .././install-sh,$(TOP)/install-sh,$(INSTALL))
LATEX = latex
+PDFLATEX = pdflatex
+BIBTEX = bibtex
HEVEA = hevea
HACHA = hacha
LN_S = @LN_S@