aboutsummaryrefslogtreecommitdiffstats
path: root/system/doc/top/Makefile
diff options
context:
space:
mode:
authorLars Thorsen <[email protected]>2010-08-23 15:40:18 +0200
committerLars Thorsen <[email protected]>2010-08-24 11:04:38 +0200
commit39bdab0727c157d3647600080cd4e70512be677b (patch)
treef4f051d3e9c2bd43a26ef8bd69275e4631361084 /system/doc/top/Makefile
parent4bff75c637d2b0ac9a591a30e4e12d3ec9a80891 (diff)
downloadotp-39bdab0727c157d3647600080cd4e70512be677b.tar.gz
otp-39bdab0727c157d3647600080cd4e70512be677b.tar.bz2
otp-39bdab0727c157d3647600080cd4e70512be677b.zip
Fixed that the system documentation can be built from both a source and release structure.
Diffstat (limited to 'system/doc/top/Makefile')
-rw-r--r--system/doc/top/Makefile31
1 files changed, 26 insertions, 5 deletions
diff --git a/system/doc/top/Makefile b/system/doc/top/Makefile
index 154deb006b..148fefaf13 100644
--- a/system/doc/top/Makefile
+++ b/system/doc/top/Makefile
@@ -111,6 +111,10 @@ GLOSSARY = $(HTMLDIR)/glossary.html
GLOSSARY_SRC = $(ERL_TOP)/system/internal_tools/doctools/src/glossary.erl
GLOSSARY_SCRIPT = $(EBIN)/glossary.$(EMULATOR)
+TEMPLATES = \
+ templates/index.html.src \
+ templates/applications.html.src
+
#--------------------------------------------------------------------------
$(INDEX_SCRIPT): $(INDEX_SRC)
@@ -119,8 +123,14 @@ $(INDEX_SCRIPT): $(INDEX_SRC)
# We don't list toc_*.html as targets because we don't know
$(HTMLDIR)/index.html + $(HTMLDIR)/applications.html: $(INDEX_SCRIPT)
echo "Generating index $@"
- $(ERL) -noshell -pa $(EBIN) -s erl_html_tools top_index $(ERL_TOP) \
- $(HTMLDIR) $(SYSTEM_VSN) -s erlang halt
+# Check if we are building the index from source or an installed release
+ if test "$$RELEASE_ROOT" = "" ; then \
+ $(ERL) -noshell -pa $(EBIN) -s erl_html_tools top_index src $(ERL_TOP) \
+ $(HTMLDIR) $(SYSTEM_VSN) -s erlang halt ;\
+ else \
+ $(ERL) -noshell -pa $(EBIN) -s erl_html_tools top_index rel $(RELEASE_ROOT) \
+ $(HTMLDIR) $(SYSTEM_VSN) -s erlang halt ;\
+ fi
#--------------------------------------------------------------------------
@@ -139,8 +149,15 @@ $(MAN_INDEX_SCRIPT): $(MAN_INDEX_SRC)
$(ERLC) -o$(EBIN) +warn_unused_vars $<
$(MAN_INDEX): $(MAN_INDEX_SCRIPT)
- $(ERL) -noshell -pa $(EBIN) -s otp_man_index gen $(ERL_TOP) $@ \
- -s erlang halt
+# Check if we are building the index from source or an installed release
+ if test "$$RELEASE_ROOT" = "" ; then \
+ $(ERL) -noshell -pa $(EBIN) -s otp_man_index gen src $(ERL_TOP) $@ \
+ -s erlang halt ;\
+ else \
+ $(ERL) -noshell -pa $(EBIN) -s otp_man_index gen rel $(RELEASE_ROOT) $@ \
+ -s erlang halt ;\
+ fi
+
#--------------------------------------------------------------------------
@@ -226,7 +243,11 @@ release_docs_spec: docs
$(INSTALL_DIR) $(RELSYSDIR)/js
$(INSTALL_DATA) \
$(JAVASCRIPT) $(RELSYSDIR)/js
- $(INSTALL_DATA) $(INDEX_FILES) $(MAN_INDEX) $(TOP_HTML_FILES) $(RELSYSDIR)
+ $(INSTALL_DATA) $(INDEX_FILES) $(MAN_INDEX) $(TOP_HTML_FILES) $(RELSYSDIR)
+ $(INSTALL_DIR) $(RELSYSDIR)/docbuild
+ $(INSTALL_DATA) $(INDEX_SCRIPT) $(MAN_INDEX_SCRIPT) $(JAVASCRIPT_BUILD_SCRIPT) \
+ $(INDEX_SCRIPT_SRC) $(MAN_INDEX_SCRIPT_SRC) $(JAVASCRIPT_BUILD_SCRIPT_SRC) \
+ $(TEMPLATES) $(RELSYSDIR)/docbuild
release_spec: