diff options
Diffstat (limited to 'make')
-rw-r--r-- | make/emd2exml.in | 23 | ||||
-rw-r--r-- | make/otp.mk.in | 37 | ||||
-rw-r--r-- | make/otp_release_targets.mk | 34 |
3 files changed, 71 insertions, 23 deletions
diff --git a/make/emd2exml.in b/make/emd2exml.in index 16c38379d9..b677ef8ed4 100644 --- a/make/emd2exml.in +++ b/make/emd2exml.in @@ -266,8 +266,11 @@ parse(#state{code = true, type = blank, line = CB, code_blank = CBs} = S) -> parse(#state{code = true, code_blank = CB, list_lvl = Lvl, - type = {text, TxtLvl}, - line = Line} = S) when TxtLvl > Lvl -> + type = {Type, TxtLvl}, + line = Line} = S) when TxtLvl > Lvl, + (Type == text orelse + Type == uolist orelse + Type == olist) -> Data = code(strip_lvls(Lvl+1, Line)), parse(get_line(put_chars(S#state{code_blank = []}, [strip_code_blank(Lvl+1, CB), Data]))); @@ -994,7 +997,7 @@ resolve_link([_|Cs], start, "", "", "") -> resolve_link(Cs, start, "", "", ""); resolve_link("]:" ++ Rest, key, Yek, "", "") -> resolve_link(Rest, url, Yek, "", ""); -resolve_link([C|Cs], url, Yek, Lru, "") when C == $"; C == $' -> +resolve_link([C|Cs], url, Yek, Lru, "") when C == $"; C == $' -> %" resolve_link(Cs, {title, C}, Yek, Lru, ""); resolve_link([$(|Cs], url, Yek, Lru, "") -> resolve_link(Cs, {title, $)}, Yek, Lru, ""); @@ -1010,9 +1013,21 @@ resolve_link([_|Cs], drop, Yek, Lru, Eltit) -> resolve_link(Cs, drop, Yek, Lru, Eltit); resolve_link([], _, Yek, Lru, Eltit) -> {ws_strip(lists:reverse(Yek)), - ws_strip(lists:reverse(Lru)), + ws_strip(md_strip_n_reverse(Lru)), ws_strip(lists:reverse(Eltit))}. +%% Remove .md at end of references. +md_strip_n_reverse(Lru) -> + md_strip_n_reverse(Lru,[]). +md_strip_n_reverse("\ndm."++Lru,Acc) -> + md_strip_n_reverse(Lru,Acc); +md_strip_n_reverse("#dm."++Lru,Acc) -> + md_strip_n_reverse(Lru,[$#|Acc]); +md_strip_n_reverse([C|T],Acc) -> + md_strip_n_reverse(T,[C|Acc]); +md_strip_n_reverse([], Acc) -> + Acc. + %% %% Misc %% diff --git a/make/otp.mk.in b/make/otp.mk.in index 756cc85443..90f448d4a0 100644 --- a/make/otp.mk.in +++ b/make/otp.mk.in @@ -77,19 +77,13 @@ OTP_RELEASE = @OTP_RELEASE@ # Erlang language section # ---------------------------------------------------- EMULATOR = beam -ifeq ($(findstring vxworks,$(TARGET)),vxworks) -# VxWorks object files should be compressed. -# Other object files should have debug_info. - ERL_COMPILE_FLAGS += +compressed +ifeq ($(findstring ose_ppc750,$(TARGET)),ose_ppc750) +ERL_COMPILE_FLAGS += +compressed else - ifeq ($(findstring ose_ppc750,$(TARGET)),ose_ppc750) - ERL_COMPILE_FLAGS += +compressed + ifdef BOOTSTRAP + ERL_COMPILE_FLAGS += +slim else - ifdef BOOTSTRAP - ERL_COMPILE_FLAGS += +slim - else - ERL_COMPILE_FLAGS += +debug_info - endif + ERL_COMPILE_FLAGS += +debug_info endif endif ERLC_WFLAGS = -W @@ -215,6 +209,22 @@ TEXDIR = . SPECDIR = $(DOCDIR)/specs +ifeq ($(CSS_FILE),) +CSS_FILE = otp_doc.css +endif +ifeq ($(WINPREFIX),) +WINPREFIX = Erlang +endif +ifeq ($(HTMLLOGO),) +HTMLLOGO_FILE = erlang-logo.png +endif +ifeq ($(PDFLOGO),) +PDFLOGO_FILE = $(DOCGEN)/priv/images/erlang-logo.gif +endif +ifeq ($(PDFCOLOR),) +PDFCOLOR = \#960003 +endif + # HTML & GIF files that always are generated and must be delivered SGML_COLL_FILES = $(SGML_APPLICATION_FILES) $(SGML_PART_FILES) XML_COLL_FILES = $(XML_APPLICATION_FILES) $(XML_PART_FILES) @@ -242,6 +252,7 @@ XSLTPROC = @XSLTPROC@ FOP = @FOP@ DOCGEN=$(ERL_TOP)/lib/erl_docgen +FOP_CONFIG = $(DOCGEN)/priv/fop.xconf ifneq (,$(findstring $(origin SPECS_ESRC),$(DUBIOUS_ORIGINS))) SPECS_ESRC = ../../src @@ -256,12 +267,10 @@ $(MAN1DIR)/%.1: %.xml date=`date +"%B %e %Y"`; \ xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< - $(MAN2DIR)/%.2: %.xml date=`date +"%B %e %Y"`; \ xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< - ifneq ($(wildcard $(SPECDIR)),) $(MAN3DIR)/%.3: %.xml $(SPECDIR)/specs_%.xml date=`date +"%B %e %Y"`; \ @@ -300,5 +309,5 @@ $(MAN9DIR)/%.9: %.xml escript $(DOCGEN)/priv/bin/codeline_preprocessing.escript $< $@ .fo.pdf: - $(FOP) -fo $< -pdf $@ + $(FOP) -c $(FOP_CONFIG) -fo $< -pdf $@ diff --git a/make/otp_release_targets.mk b/make/otp_release_targets.mk index 67243b5ffd..0be0a2de56 100644 --- a/make/otp_release_targets.mk +++ b/make/otp_release_targets.mk @@ -42,17 +42,34 @@ $(HTMLDIR)/index.html: $(XML_FILES) $(SPECS_FILES) --stringparam gendate "$$date" \ --stringparam appname "$(APPLICATION)" \ --stringparam appver "$(VSN)" \ + --stringparam stylesheet "$(CSS_FILE)" \ + --stringparam winprefix "$(WINPREFIX)" \ + --stringparam logo "$(HTMLLOGO_FILE)" \ + --stringparam pdfname "$(PDFNAME)" \ -path $(DOCGEN)/priv/dtd \ -path $(DOCGEN)/priv/dtd_html_entities \ $(DOCGEN)/priv/xsl/db_html.xsl book.xml + endif $(HTMLDIR)/users_guide.html: $(XML_FILES) date=`date +"%B %e %Y"`; \ - $(XSLTPROC) --noout --stringparam outdir $(HTMLDIR) --stringparam docgen "$(DOCGEN)" --stringparam topdocdir "$(TOPDOCDIR)" \ + $(XSLTPROC) --noout \ + --stringparam outdir $(HTMLDIR) \ + --stringparam docgen "$(DOCGEN)" \ + --stringparam topdocdir "$(TOPDOCDIR)" \ --stringparam pdfdir "$(PDFDIR)" \ - --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude \ - -path $(DOCGEN)/priv/dtd -path $(DOCGEN)/priv/dtd_html_entities $(DOCGEN)/priv/xsl/db_html.xsl book.xml + --stringparam gendate "$$date" \ + --stringparam appname "$(APPLICATION)" \ + --stringparam appver "$(VSN)" \ + --stringparam stylesheet "$(CSS_FILE)" \ + --stringparam winprefix "$(WINPREFIX)" \ + --stringparam logo "$(HTMLLOGO_FILE)" \ + --stringparam pdfname "$(PDFNAME)" \ + --xinclude \ + -path $(DOCGEN)/priv/dtd \ + -path $(DOCGEN)/priv/dtd_html_entities \ + $(DOCGEN)/priv/xsl/db_html.xsl book.xml %.fo: $(XML_FILES) $(SPECS_FILES) date=`date +"%B %e %Y"`; \ @@ -61,6 +78,8 @@ $(HTMLDIR)/users_guide.html: $(XML_FILES) --stringparam gendate "$$date" \ --stringparam appname "$(APPLICATION)" \ --stringparam appver "$(VSN)" \ + --stringparam logo "$(PDFLOGO_FILE)" \ + --stringparam pdfcolor "$(PDFCOLOR)" \ --xinclude $(TOP_SPECS_PARAM) \ -path $(DOCGEN)/priv/dtd \ -path $(DOCGEN)/priv/dtd_html_entities \ @@ -77,8 +96,13 @@ ifneq ($(XML_FILES),) $(HTMLDIR)/$(APPLICATION).eix: $(XML_FILES) $(SPECS_FILES) date=`date +"%B %e %Y"`; \ $(XSLTPROC) --stringparam docgen "$(DOCGEN)" \ - --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude $(TOP_SPECS_PARAM) \ - -path $(DOCGEN)/priv/dtd -path $(DOCGEN)/priv/dtd_html_entities $(DOCGEN)/priv/xsl/db_eix.xsl book.xml > $@ + --stringparam gendate "$$date" \ + --stringparam appname "$(APPLICATION)" \ + --stringparam appver "$(VSN)" \ + -xinclude $(TOP_SPECS_PARAM) \ + -path $(DOCGEN)/priv/dtd \ + -path $(DOCGEN)/priv/dtd_html_entities \ + $(DOCGEN)/priv/xsl/db_eix.xsl book.xml > $@ docs: $(HTMLDIR)/$(APPLICATION).eix |