diff options
Diffstat (limited to 'make')
-rwxr-xr-x[-rw-r--r--] | make/emd2exml.in | 43 | ||||
-rwxr-xr-x | make/fakefop | 18 | ||||
-rwxr-xr-x | make/make_emakefile.in (renamed from make/make_emakefile) | 2 | ||||
-rw-r--r-- | make/ose_lm.mk.in | 76 | ||||
-rw-r--r-- | make/otp.mk.in | 85 | ||||
-rw-r--r-- | make/otp_release_targets.mk | 95 | ||||
-rw-r--r-- | make/otp_subdir.mk | 4 | ||||
-rw-r--r-- | make/output.mk.in | 4 | ||||
-rw-r--r-- | make/run_make.mk | 6 |
9 files changed, 149 insertions, 184 deletions
diff --git a/make/emd2exml.in b/make/emd2exml.in index d84b967e40..57bcaba24d 100644..100755 --- a/make/emd2exml.in +++ b/make/emd2exml.in @@ -1,6 +1,6 @@ -#!/usr/bin/env escript +#!@ENV@ escript %% -*- erlang -*- -%%! -smp disable +%%! %% %% %CopyrightBegin% @@ -39,7 +39,7 @@ %%% Created : 25 Feb 2010 by Rickard Green %%%------------------------------------------------------------------- --define(MAX_HEADING, 3). +-define(MAX_HEADING, 6). -define(DELAYED_COPYRIGHT_IX, 0). -define(DELAYED_TOC_IX, 1). @@ -80,7 +80,6 @@ copyright = false, copyright_data = [], have_h1 = false, - smarker_ix = false, toc = [], ifile, ofile}). @@ -368,9 +367,9 @@ put_text(S, "%OTP-REL%"++Cs, CTag, EmTag, Acc) -> put_text(S, [$\\,C|Cs], no, EmTag, Acc) -> put_text(S, Cs, no, EmTag, [C|Acc]); put_text(S, [C,C|Cs], no, b, Acc) when C == $*; C == $_ -> - put_text(S, Cs, no, no, ["</b>"|Acc]); + put_text(S, Cs, no, no, ["</strong>"|Acc]); put_text(S, [C,C|Cs], no, no, Acc) when C == $*; C == $_ -> - put_text(S, Cs, no, b, ["<b>"|Acc]); + put_text(S, Cs, no, b, ["<strong>"|Acc]); put_text(S, [C|Cs], no, em, Acc) when C == $*; C == $_ -> put_text(S, Cs, no, no, ["</em>"|Acc]); put_text(S, [C|Cs], no, no, Acc) when C == $*; C == $_ -> @@ -614,8 +613,7 @@ strip_lvls(_N, Str) -> put_title(S, 1, Title) -> header(chk_h1(1, S#state{h = 1, mlist = [top]}), Title); put_title(#state{mlist = MList0, - toc = TOC, - smarker_ix = SMarkerIX} = S0, H, Title) -> + toc = TOC} = S0, H, Title) -> TitleStr = text(Title), MList1 = [mk_lvl_marker(Title) | MList0], Marker = mk_marker(MList1), @@ -626,12 +624,10 @@ put_title(#state{mlist = MList0, "<seealso marker=\"#",Marker,"\">", TitleStr,"</seealso>",nl()], h = H, - mlist = MList1, - smarker_ix = false}), - true = is_integer(SMarkerIX), - S2 = write_delayed(S1, SMarkerIX, ["<marker id=\"", Marker, "\"/>",nl()]), + mlist = MList1}), + S2 = put_chars(S1, ["<marker id=\"", Marker, "\"/>",nl()]), {STag, ETag} = case H > ?MAX_HEADING of - true -> {"<p><b>", "</b></p>"}; + true -> {"<p><strong>", "</strong></p>"}; false -> {"<title>", "</title>"} end, put_chars(S2, [STag, TitleStr, ETag, nl()]). @@ -701,15 +697,10 @@ sections_change(H, OldH, #state{mlist = [_|ML], toc = TOC} = S0) -> begin_section(1, S) -> put_line(S, "<chapter>"); -begin_section(H, #state{delayed_array_ix = IX} = S0) when H > ?MAX_HEADING -> - false = S0#state.smarker_ix, - true = is_integer(IX), - put_delayed(S0#state{smarker_ix = IX, delayed_array_ix = IX+1}, IX); -begin_section(H, #state{delayed_array_ix = IX} = S0) when H > 1 -> - false = S0#state.smarker_ix, - true = is_integer(IX), - S1 = put_delayed(S0#state{smarker_ix = IX, delayed_array_ix = IX+1}, IX), - put_line(S1, "<section>"); +begin_section(H, S) when H > ?MAX_HEADING -> + S; +begin_section(H, S0) when H > 1 -> + put_line(S0, "<section>"); begin_section(_H, S) -> S. @@ -756,7 +747,7 @@ header(#state{ofile = {File, _}} = S0, Title) -> integer_to_list(Day), "</date>", nl(), "<rev>1</rev>", nl(), - "<file>",File,"</file>", nl(), + "<file>",filename:basename(File),"</file>", nl(), "</header>", nl()]), put_delayed(S3, ?DELAYED_TOC_IX). @@ -779,7 +770,7 @@ create_toc(#state{toc = TOC} = S) -> {value,{"true",[]}} -> write_delayed(S, ?DELAYED_TOC_IX, - ["<p><b>Table of Contents</b></p>", nl(), TOC]); + ["<p><strong>Table of Contents</strong></p>", nl(), TOC]); _ -> write_delayed(S, ?DELAYED_TOC_IX, "") end. @@ -986,10 +977,10 @@ chg_bq_lvl(Lvl, #state{bq_lvl = Lvl} = S) -> S; chg_bq_lvl(NewLvl, #state{bq_lvl = Lvl} = S) when NewLvl > Lvl -> chg_bq_lvl(NewLvl, - put_line(end_p(end_code(S#state{bq_lvl = Lvl+1})), "<blockquote>")); + put_line(end_p(end_code(S#state{bq_lvl = Lvl+1})), "<quote>")); chg_bq_lvl(NewLvl, #state{bq_lvl = Lvl} = S) -> chg_bq_lvl(NewLvl, - put_line(end_p(end_code(S#state{bq_lvl = Lvl-1})), "</blockquote>")). + put_line(end_p(end_code(S#state{bq_lvl = Lvl-1})), "</quote>")). %% %% Resolve link diff --git a/make/fakefop b/make/fakefop index 7beeddf0a5..7a34c4faf1 100755 --- a/make/fakefop +++ b/make/fakefop @@ -22,13 +22,13 @@ # Author: Tuncer Ayaz # -if [ $# -lt 6 ] +if [ $# -lt 8 ] then - echo "Usage: fakefop -c IGNORED -fo IGNORED -pdf OUTFILE" + echo "Usage: fakefop -c IGNORED -cache IGNORED -fo IGNORED -pdf OUTFILE" exit 1 fi -OUTFILE=$6 +OUTFILE=$8 echo -n -e '%PDF-1.4\n%\0342\0343\0317\0323\n\n' > $OUTFILE @@ -87,12 +87,12 @@ endobj xref 0 6 -0000000000 65536 f -0000000016 00000 n -0000000070 00000 n -0000000136 00000 n -0000000291 00000 n -0000000410 00000 n +0000000000 65536 f +0000000016 00000 n +0000000070 00000 n +0000000136 00000 n +0000000291 00000 n +0000000410 00000 n trailer << diff --git a/make/make_emakefile b/make/make_emakefile.in index 80c4acae94..fbca77887a 100755 --- a/make/make_emakefile +++ b/make/make_emakefile.in @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!@PERL@ # -*- cperl -*- use strict; diff --git a/make/ose_lm.mk.in b/make/ose_lm.mk.in deleted file mode 100644 index de8d351af3..0000000000 --- a/make/ose_lm.mk.in +++ /dev/null @@ -1,76 +0,0 @@ -#-*-makefile-*- ; force emacs to enter makefile-mode -# ---------------------------------------------------- -# Template target for generating an OSE5 load module -# -# %CopyrightBegin% -# -# Copyright Ericsson AB 2013. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# %CopyrightEnd% -# -# Author: Petre Pircalabu -# ---------------------------------------------------- - -# ---------------------------------------------------- -# build-ose-load-module -# Creates an OSE5 load module -# params: -# $(1) - The output target -# $(2) - Objects -# $(3) - Libraries -# $(4) - LM configuration file -# ---------------------------------------------------- - -ifeq ($(findstring ose,$(TARGET)),ose) -LDR1FLAGS = @erl_xcomp_ose_ldflags_pass1@ -LDR2FLAGS = @erl_xcomp_ose_ldflags_pass2@ -OSEROOT = @erl_xcomp_ose_OSEROOT@ -LCF = @erl_xcomp_ose_LM_LCF@ -BEAM_LMCONF = @erl_xcomp_ose_BEAM_LM_CONF@ -EPMD_LMCONF = @erl_xcomp_ose_EPMD_LM_CONF@ -RUN_ERL_LMCONF = @erl_xcomp_ose_RUN_ERL_LM_CONF@ -STRIP = @erl_xcomp_ose_STRIP@ -LM_POST_LINK = @erl_xcomp_ose_LM_POST_LINK@ -LM_SET_CONF = @erl_xcomp_ose_LM_SET_CONF@ -LM_ELF_SIZE = @erl_xcomp_ose_LM_ELF_SIZE@ -OSE_CONFD = @erl_xcomp_ose_CONFD@ -CRT0_LM = @erl_xcomp_ose_CRT0_LM@ -endif - -define build-ose-load-module - @echo " --- Linking $(1)" - - @echo " --- Linking $(1) (pass 1)" - $(ld_verbose)$(PURIFY) $(LD) -o $(1)_unconfigured_ro -r \ - $(2) --start-group $(3) --end-group --cref --discard-none -M > $(1)_1.map - - @echo " --- Linking $(1) (pass 2)" - $(ld_verbose)$(PURIFY) $(LD) -o $(1)_unconfigured \ - $(1)_unconfigured_ro -T $(LCF) -n --emit-relocs -e crt0_lm --cref \ - --discard-none -M > $(1)_2.map - - @echo " --- Inserting configuration" - $(ld_verbose) $(LM_SET_CONF) $(1)_unconfigured < $(4) - - @echo " --- Striping $(1)" -# $(ld_verbose) $(STRIP) $(1)_unconfigured - - @echo " --- Postlinking $(1)" - $(ld_verbose) $(LM_POST_LINK) $(1)_unconfigured - - @echo " --- Sizing $(1)" - $(ld_verbose) $(LM_ELF_SIZE) $(1)_unconfigured - mv $(1)_unconfigured $(1) -endef diff --git a/make/otp.mk.in b/make/otp.mk.in index 723f83cb45..c514a150ca 100644 --- a/make/otp.mk.in +++ b/make/otp.mk.in @@ -4,7 +4,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1997-2013. All Rights Reserved. +# Copyright Ericsson AB 1997-2016. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,6 +47,10 @@ CROSS_COMPILING = @CROSS_COMPILING@ # ---------------------------------------------------- DEFAULT_TARGETS = opt debug release release_docs clean docs +TYPES = @TYPES@ + +USE_PGO = @USE_PGO@ + # Slash separated list of return values from $(origin VAR) # that are untrusted - set default in this file instead. # The list is not space separated since some return values @@ -58,8 +62,8 @@ DUBIOUS_ORIGINS = /undefined/environment/ # HiPE # ---------------------------------------------------- -HIPE_ENABLED=@HIPE_ENABLED@ -NATIVE_LIBS_ENABLED=@NATIVE_LIBS_ENABLED@ +HIPE_ENABLED = @HIPE_ENABLED@ +NATIVE_LIBS_ENABLED = @NATIVE_LIBS_ENABLED@ # ---------------------------------------------------- # Command macros @@ -81,6 +85,7 @@ LD = @LD@ RANLIB = @RANLIB@ AR = @AR@ PERL = @PERL@ +LLVM_PROFDATA = @LLVM_PROFDATA@ BITS64 = @BITS64@ @@ -90,14 +95,10 @@ OTP_RELEASE = @OTP_RELEASE@ # Erlang language section # ---------------------------------------------------- EMULATOR = beam -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 ERLC_WFLAGS = -W ERLC = erlc $(ERLC_WFLAGS) $(ERLC_FLAGS) @@ -138,7 +139,7 @@ endif # .PRECIOUS: %.erl %.fo -## Uncomment these lines and add .idl to suffixes above to have erlc +## Uncomment these lines and add .idl to suffixes above to have erlc ## eat IDL files ##$(EGEN)/%.erl: $(ESRC)/%.idl ## $(ERLC) $(IDL_FLAGS) $< @@ -221,6 +222,7 @@ MAN9DIR = $(DOCDIR)/man9 TEXDIR = . SPECDIR = $(DOCDIR)/specs +XMLDIR = $(DOCDIR)/xml ifeq ($(CSS_FILE),) CSS_FILE = otp_doc.css @@ -238,7 +240,7 @@ ifeq ($(PDFCOLOR),) PDFCOLOR = \#960003 endif -# HTML & GIF files that always are generated and must be delivered +# 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) DEFAULT_HTML_FILES = \ @@ -264,6 +266,7 @@ DEFAULT_GIF_FILES = $(HTMLDIR)/min_head.gif XSLTPROC = @XSLTPROC@ FOP = @FOP@ XMLLINT = @XMLLINT@ +CP = @CP@ DOCGEN=$(ERL_TOP)/lib/erl_docgen FOP_CONFIG = $(DOCGEN)/priv/fop.xconf @@ -274,54 +277,34 @@ endif SPECS_EXTRACTOR=$(DOCGEN)/priv/bin/specs_gen.escript # Extract specifications and types from Erlang source files (-spec, -type) $(SPECDIR)/specs_%.xml: $(SPECS_ESRC)/%.erl - escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) -o$(dir $@) $< - + $(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) -o$(dir $@) $< +$(SPECDIR)/specs_%.xml: $(SPECS_ESRC)/gen/%.erl + $(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) -o$(dir $@) $< -$(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 $< +MANXSLTARGS=--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 -path . -$(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 $< +$(MAN1DIR)/%.1 $(MAN2DIR)/%.2 $(MAN4DIR)/%.4 $(MAN4DIR)/%.5 $(MAN9DIR)/%.9: $(XMLDIR)/%.xml + $(gen_verbose)date=`date +"%B %e, %Y"`; \ + xsltproc --output "$@" $(MANXSLTARGS) $(DOCGEN)/priv/xsl/db_man.xsl $< ifneq ($(wildcard $(SPECDIR)),) -$(MAN3DIR)/%.3: %.xml $(SPECDIR)/specs_%.xml - date=`date +"%B %e, %Y"`; \ +$(MAN3DIR)/%.3: $(XMLDIR)/%.xml $(SPECDIR)/specs_%.xml + $(gen_verbose)date=`date +"%B %e, %Y"`; \ specs_file=`pwd`/$(SPECDIR)/specs_$*.xml; \ - xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --stringparam specs_file "$$specs_file" --xinclude -path $(DOCGEN)/priv/dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< + xsltproc --output "$@" $(MANXSLTARGS) --stringparam specs_file "$$specs_file" $(DOCGEN)/priv/xsl/db_man.xsl $< else -$(MAN3DIR)/%.3: %.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 $< +$(MAN3DIR)/%.3: $(XMLDIR)/%.xml + $(gen_verbose)date=`date +"%B %e, %Y"`; \ + xsltproc --output "$@" $(MANXSLTARGS) $(DOCGEN)/priv/xsl/db_man.xsl $< endif # left for compatibility -$(MAN4DIR)/%.4: %.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 $< - -$(MAN4DIR)/%.5: %.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 $< - -# left for compatibility -$(MAN6DIR)/%.6: %_app.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 $< - -$(MAN6DIR)/%.7: %_app.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 $< - -$(MAN9DIR)/%.9: %.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 $< +$(MAN6DIR)/%.6 $(MAN6DIR)/%.7: $(XMLDIR)/%_app.xml + $(gen_verbose)date=`date +"%B %e, %Y"`; \ + xsltproc --output "$@" $(MANXSLTARGS) $(DOCGEN)/priv/xsl/db_man.xsl $< - -.xmlsrc.xml: - escript $(DOCGEN)/priv/bin/codeline_preprocessing.escript $< $@ +$(XMLDIR)/%.xml: $(XMLDIR)/%.xmlsrc + $(gen_verbose)escript $(DOCGEN)/priv/bin/codeline_preprocessing.escript $(shell pwd) $< $@ .fo.pdf: - $(FOP) -c $(FOP_CONFIG) -fo $< -pdf $@ - + $(FOP) -c $(FOP_CONFIG) -cache $(ERL_TOP)/make/$(TARGET)/fop-fonts.cache -fo $< -pdf $@ diff --git a/make/otp_release_targets.mk b/make/otp_release_targets.mk index 97e9e4bb43..d1fbf6c58f 100644 --- a/make/otp_release_targets.mk +++ b/make/otp_release_targets.mk @@ -33,9 +33,35 @@ ifneq ($(wildcard $(MOD2APP)),) MOD2APP_PARAM = --stringparam mod2app_file "$(MOD2APP)" endif +# ------------------------------------------------------- +# Take the XML files and add the github link info to them +# ------------------------------------------------------- +ifneq ($(strip $(XMLDIR)),) +_create_xml_dirs := $(shell mkdir -p $(XMLDIR)) +endif + +XML_GEN_FILES+=$(patsubst %.xml,$(XMLDIR)/%.xml,$(XML_FILES)) + +ifeq ($(strip $(NO_GITHUB_DOC_LINKS)),) +$(XMLDIR)/%.xml: %.xml + $(gen_verbose)escript $(DOCGEN)/priv/bin/github_link.escript $< \ + "$(subst $(ERL_TOP)/,,$(CURDIR)/$^)" "NA" $@ + +$(XMLDIR)/%.xmlsrc: %.xmlsrc + $(gen_verbose)escript $(DOCGEN)/priv/bin/github_link.escript $< \ + "$(subst $(ERL_TOP)/,,$(CURDIR)/$^)" "NA" $@ +else +## Just copy the files if the application does not want github edit links +$(XMLDIR)/%.xml: %.xml + $(gen_verbose)$(CP) $< $@ +$(XMLDIR)/%.xmlsrc: %.xmlsrc + $(gen_verbose)$(CP) $< $@ +endif + ifeq ($(TOPDOC),) -$(HTMLDIR)/index.html: $(XML_FILES) $(SPECS_FILES) - date=`date +"%B %e, %Y"`; \ + +$(HTMLDIR)/index.html: $(XML_GEN_FILES) $(SPECS_FILES) + $(gen_verbose)date=`date +"%B %e, %Y"`; \ $(XSLTPROC) --noout \ --stringparam outdir $(HTMLDIR) \ --stringparam docgen "$(DOCGEN)" \ @@ -50,14 +76,15 @@ $(HTMLDIR)/index.html: $(XML_FILES) $(SPECS_FILES) --stringparam winprefix "$(WINPREFIX)" \ --stringparam logo "$(HTMLLOGO_FILE)" \ --stringparam pdfname "$(PDFNAME)" \ + -path . \ -path $(DOCGEN)/priv/dtd \ -path $(DOCGEN)/priv/dtd_html_entities \ - $(DOCGEN)/priv/xsl/db_html.xsl book.xml + $(DOCGEN)/priv/xsl/db_html.xsl $(XMLDIR)/book.xml endif -$(HTMLDIR)/users_guide.html: $(XML_FILES) - date=`date +"%B %e, %Y"`; \ +$(HTMLDIR)/users_guide.html: $(XML_GEN_FILES) + $(gen_verbose)date=`date +"%B %e, %Y"`; \ $(XSLTPROC) --noout \ --stringparam outdir $(HTMLDIR) \ --stringparam docgen "$(DOCGEN)" \ @@ -72,12 +99,13 @@ $(HTMLDIR)/users_guide.html: $(XML_FILES) --stringparam logo "$(HTMLLOGO_FILE)" \ --stringparam pdfname "$(PDFNAME)" \ --xinclude \ + -path . \ -path $(DOCGEN)/priv/dtd \ -path $(DOCGEN)/priv/dtd_html_entities \ - $(DOCGEN)/priv/xsl/db_html.xsl book.xml + $(DOCGEN)/priv/xsl/db_html.xsl $(XMLDIR)/book.xml -%.fo: $(XML_FILES) $(SPECS_FILES) - date=`date +"%B %e, %Y"`; \ +%.fo: $(XML_GEN_FILES) $(SPECS_FILES) + $(gen_verbose)date=`date +"%B %e, %Y"`; \ $(XSLTPROC) \ --stringparam docgen "$(DOCGEN)" \ --stringparam gendate "$$date" \ @@ -87,33 +115,70 @@ $(HTMLDIR)/users_guide.html: $(XML_FILES) --stringparam logo "$(PDFLOGO_FILE)" \ --stringparam pdfcolor "$(PDFCOLOR)" \ --xinclude $(TOP_SPECS_PARAM) \ + -path . \ -path $(DOCGEN)/priv/dtd \ -path $(DOCGEN)/priv/dtd_html_entities \ - $(DOCGEN)/priv/xsl/db_pdf.xsl book.xml > $@ + $(DOCGEN)/priv/xsl/db_pdf.xsl $(XMLDIR)/book.xml > $@ # ------------------------------------------------------------------------ # The following targets just exist in the documentation directory # ------------------------------------------------------------------------ +.PHONY: xmllint + ifneq ($(XML_FILES),) # ---------------------------------------------------- # Generation of application index data # ---------------------------------------------------- -$(HTMLDIR)/$(APPLICATION).eix: $(XML_FILES) $(SPECS_FILES) - date=`date +"%B %e, %Y"`; \ +$(HTMLDIR)/$(APPLICATION).eix: $(XML_GEN_FILES) $(SPECS_FILES) + $(gen_verbose)date=`date +"%B %e, %Y"`; \ $(XSLTPROC) --stringparam docgen "$(DOCGEN)" \ --stringparam gendate "$$date" \ --stringparam appname "$(APPLICATION)" \ --stringparam appver "$(VSN)" \ -xinclude $(TOP_SPECS_PARAM) \ + -path . \ -path $(DOCGEN)/priv/dtd \ -path $(DOCGEN)/priv/dtd_html_entities \ - $(DOCGEN)/priv/xsl/db_eix.xsl book.xml > $@ + $(DOCGEN)/priv/xsl/db_eix.xsl $(XMLDIR)/book.xml > $@ docs: $(HTMLDIR)/$(APPLICATION).eix -xmllint: $(XML_FILES) - $(XMLLINT) --noout --valid --nodefdtd --loaddtd --path $(DOCGEN)/priv/dtd:$(DOCGEN)/priv/dtd_html_entities $(XML_FILES) +## Here awk is used to find all xi:include files in $(BOOK_FILES) +## Then we look into all those files check for xi:includes +BOOK_XI_INC_FILES:=$(foreach file,$(BOOK_FILES),$(shell awk -F\" '/xi:include/ {print $$2}' $(file))) $(BOOK_FILES) +ALL_XI_INC_FILES:=$(foreach file,$(BOOK_XI_INC_FILES),$(shell awk -F\" '/xi:include/ {if ("$(dir $(file))" != "./") printf "$(dir $(file))"; print $$2}' $(file))) $(BOOK_XI_INC_FILES) +ifeq ($(TOPDOC), true) +ALL_XI_INC_GEN_FILES:=$(filter-out book.xml,$(ALL_XI_INC_FILES)) $(BOOK_FILES:%=$(XMLDIR)/%) +else +ALL_XI_INC_GEN_FILES:=$(ALL_XI_INC_FILES:%=$(XMLDIR)/%) +endif + + +## These are the patterns of file names that xmllint cannot currently parse +XI_INC_FILES:=%user_man.xml %usersguide.xml %refman.xml %ref_man.xml %part.xml %book.xml + +## These are the files that we should run the xmllint on +LINT_XI_INC_FILES := $(filter-out $(XI_INC_FILES), $(ALL_XI_INC_FILES)) +LINT_XI_INC_GEN_FILES := $(filter-out $(XI_INC_FILES), $(ALL_XI_INC_GEN_FILES)) + +EMPTY := +SPACE := $(EMPTY) $(EMPTY) +XMLLINT_SRCDIRS:=$(subst $(SPACE),:,$(sort $(foreach file,$(XML_FILES),$(dir $(file))))) + +xmllint: $(ALL_XI_INC_GEN_FILES) +## We verify that the $(XML_GEN_FILES) variable in the Makefile have exactly +## the same files as we found out by following xi:include. +ifneq ($(filter-out $(filter %.xml,$(XML_GEN_FILES)),$(ALL_XI_INC_GEN_FILES)),) + $(error "$(filter-out $(filter %.xml,$(XML_GEN_FILES)),$(ALL_XI_INC_GEN_FILES)) in $$ALL_XI_INC_FILES but not in $$XML_GEN_FILES"); +endif +ifneq ($(filter-out $(ALL_XI_INC_GEN_FILES),$(filter %.xml,$(XML_GEN_FILES))),) + $(error "$(filter-out $(ALL_XI_INC_GEN_FILES),$(filter %.xml,$(XML_GEN_FILES))) in $$XML_GEN_FILES but not in $$ALL_XI_INC_FILES"); +endif + @echo "xmllint $(LINT_XI_INC_GEN_FILES)" + @xmllint --noout --valid --nodefdtd --loaddtd --path \ + $(DOCGEN)/priv/dtd:$(DOCGEN)/priv/dtd_html_entities:$(XMLLINT_SRCDIRS) \ + $(LINT_XI_INC_GEN_FILES) # ---------------------------------------------------- # Local documentation target for testing @@ -134,6 +199,8 @@ local_copy_of_topdefs: $(DOCGEN)/priv/js/flipmenu/flip_static.gif \ $(DOCGEN)/priv/js/flipmenu/flipmenu.js $(HTMLDIR)/js/flipmenu +else +xmllint: endif # ---------------------------------------------------- diff --git a/make/otp_subdir.mk b/make/otp_subdir.mk index fa6470ddd7..19c744955c 100644 --- a/make/otp_subdir.mk +++ b/make/otp_subdir.mk @@ -19,13 +19,13 @@ # # Make include file for otp -.PHONY: debug opt release docs release_docs tests release_tests \ +.PHONY: debug opt lcnt release docs release_docs tests release_tests \ clean depend valgrind static_lib # # Targets that don't affect documentation directories # -opt debug release docs release_docs tests release_tests clean depend valgrind static_lib: +opt debug lcnt release docs release_docs tests release_tests clean depend valgrind static_lib xmllint: @set -e ; \ app_pwd=`pwd` ; \ if test -f vsn.mk; then \ diff --git a/make/output.mk.in b/make/output.mk.in index 171d2456aa..7c6533fddd 100644 --- a/make/output.mk.in +++ b/make/output.mk.in @@ -139,3 +139,7 @@ vsn_verbose = $(vsn_verbose_$(V)) yecc_verbose_0 = @echo " YECC "$@; yecc_verbose = $(yecc_verbose_$(V)) + +llvm_profdata_verbose_0 = @echo " LLVM_PROFDATA "$@; +llvm_profdata_verbose = $(llvm_profdata_verbose_$(V)) +V_LLVM_PROFDATA = $(llvm_profdata_verbose)$(LLVM_PROFDATA) diff --git a/make/run_make.mk b/make/run_make.mk index 2591a37cad..bcbbf53f7d 100644 --- a/make/run_make.mk +++ b/make/run_make.mk @@ -38,9 +38,5 @@ plain smp frag smp_frag: $(make_verbose)$(MAKE) -f $(TARGET)/Makefile FLAVOR=$@ clean generate depend docs release release_spec release_docs release_docs_spec \ - tests release_tests release_tests_spec static_lib: + tests release_tests release_tests_spec static_lib xmllint: $(make_verbose)$(MAKE) -f $(TARGET)/Makefile $@ - - - - |