aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-02-16 01:24:37 +0000
committerErlang/OTP <[email protected]>2010-02-16 01:24:37 +0000
commit7aa2cb2e64cd404f8a9f388d85ab287ced95f139 (patch)
tree5bf6f7ecf5d6610db18b707436be0aa642083eea /Makefile.in
parent924f3aaf2c4841eafb5ea3832e2c885eb54ac984 (diff)
downloadotp-7aa2cb2e64cd404f8a9f388d85ab287ced95f139.tar.gz
otp-7aa2cb2e64cd404f8a9f388d85ab287ced95f139.tar.bz2
otp-7aa2cb2e64cd404f8a9f388d85ab287ced95f139.zip
OTP-8449 Documentation improvements.
The most important "readme" files now use Markdown notation. HTML versions of these files are now also automatically generated and included in the HTML documentation. - Building and Installing Erlang/OTP - $ERL_TOP/INSTALL.md (previously known as $ERL_TOP/README). - Cross Compiling Erlang/OTP - $ERL_TOP/INSTALL-CROSS.md. - How to Build Erlang/OTP on Windows - $ERL_TOP/INSTALL-WIN32.md (previously known as $ERL_TOP/README.win32).
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in55
1 files changed, 47 insertions, 8 deletions
diff --git a/Makefile.in b/Makefile.in
index 2dcc89144d..be49761490 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -392,16 +392,55 @@ endif
# ---------------------------------------------------------------
# Target only used when building commercial ERTS patches
# ---------------------------------------------------------------
-release_docs docs:
+release_docs docs: html_readmes
ifeq ($(OTP_SMALL_BUILD),true)
- cd $(ERL_TOP)/lib && $(MAKE) TESTROOT=$(RELEASE_ROOT) $@
+ cd $(ERL_TOP)/lib && \
+ ERL_TOP=$(ERL_TOP) $(MAKE) TESTROOT=$(RELEASE_ROOT) $@
else
- cd $(ERL_TOP)/lib && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@
- cd $(ERL_TOP)/lib/dialyzer && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@
+ cd $(ERL_TOP)/lib && \
+ ERL_TOP=$(ERL_TOP) $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@
+ cd $(ERL_TOP)/lib/dialyzer && \
+ ERL_TOP=$(ERL_TOP) $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@
endif
- cd $(ERL_TOP)/erts && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@
- cd $(ERL_TOP)/system/doc && $(MAKE) TESTROOT=$(RELEASE_ROOT) $@
-
+ cd $(ERL_TOP)/erts && \
+ ERL_TOP=$(ERL_TOP) $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@
+ cd $(ERL_TOP)/system/doc && \
+ ERL_TOP=$(ERL_TOP) $(MAKE) TESTROOT=$(RELEASE_ROOT) $@
+
+.PHONY: html_readmes clean_html_readmes
+
+HTML_READMES = INSTALL.html INSTALL-WIN32.html INSTALL-CROSS.html
+
+html_readmes: $(HTML_READMES)
+
+clean_html_readmes:
+ rm -f $(HTML_READMES)
+
+%.html: %.md
+ echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">" > $@
+ echo "<html xmlns:fn=\"http://www.w3.org/2005/02/xpath-functions\"><head>" >> $@
+ echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">" >> $@
+ echo "<style type=\"text/css\">" >> $@
+ echo "body {" >> $@
+ echo " margin: 4em 4em 4em 4em;" >> $@
+ echo " background: white;" >> $@
+ echo " font-family: Verdana, Arial, Helvetica, sans-serif;" >> $@
+ echo "}" >> $@
+ echo "code { font-family: courier;font-weight: normal}" >> $@
+ echo "a:link { color: blue; text-decoration: none }" >> $@
+ echo "a:active { color: blue; text-decoration: none }" >> $@
+ echo "a:visited { color: blue; text-decoration: none }" >> $@
+ echo "</style><title>" >> $@
+ cat $< | sed -n "s/[ ]*\([^ ].*[^ ]\)[ ]*/\1/p;/[ ]*[^ ][ ]*/q" >> $@
+ echo "</title></head><body>" >> $@
+ifneq ($(MD2HTML),)
+ $(MD2HTML) $< >> $@
+else
+ echo "<pre>" >> $@
+ cat $< | sed "s|\&|\&amp\;|g;s|\"|\&quot\;|g;s|<|\&lt\;|g;s|>|\&gt\;|g" >> $@
+ echo "</pre>" >> $@
+endif
+ echo "</body></html>" >> $@
# ----------------------------------------------------------------------
ERLANG_EARS=$(BOOTSTRAP_ROOT)/bootstrap/erts
@@ -988,7 +1027,7 @@ $(IBIN_DIR):
# Clean targets
#
-clean: check_recreate_primary_bootstrap
+clean: check_recreate_primary_bootstrap clean_html_readmes
rm -f *~ *.bak config.log config.status prebuilt.files ibin/*
find . -type f -name SKIP -print | xargs $(RM)
cd erts && ERL_TOP=$(ERL_TOP) $(MAKE) clean