diff options
author | Hans Bolinder <[email protected]> | 2010-07-08 13:20:32 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2010-12-01 08:55:57 +0100 |
commit | 2f93254d2c929d0563c2ab8152da62ee0a91ea10 (patch) | |
tree | 5f2661781ac2041ffab0e1d5d6b73624ea94c0d5 /make/otp.mk.in | |
parent | e2191e8215d6aa4dd09cb06d907841713d45c1f0 (diff) | |
download | otp-2f93254d2c929d0563c2ab8152da62ee0a91ea10.tar.gz otp-2f93254d2c929d0563c2ab8152da62ee0a91ea10.tar.bz2 otp-2f93254d2c929d0563c2ab8152da62ee0a91ea10.zip |
Prepare erl_docgen for using Dialyzer specs and types
Support for using Dialyzer specifications and types has been added.
This is an experimental release; changes are expected before the new
functionality is used when building the OTP documentation.
Diffstat (limited to 'make/otp.mk.in')
-rw-r--r-- | make/otp.mk.in | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/make/otp.mk.in b/make/otp.mk.in index 6ae7c5b456..bf287be416 100644 --- a/make/otp.mk.in +++ b/make/otp.mk.in @@ -209,6 +209,8 @@ MAN9DIR = $(DOCDIR)/man9 TEXDIR = . +SPECDIR = $(DOCDIR)/specs + # 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) @@ -237,41 +239,52 @@ FOP = @FOP@ DOCGEN=$(ERL_TOP)/lib/erl_docgen +SPECS_ESRC = ../../src +# Extract specifications and types from Erlang source files (-spec, -type) +$(SPECDIR)/specs_%.xml: $(SPECS_ESRC)/%.erl + escript $(DOCGEN)/priv/bin/specs_gen.escript $(SPECS_FLAGS) -o$(dir $@) $< -$(MAN1DIR)/%.1:: %.xml +$(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/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< -$(MAN2DIR)/%.2:: %.xml +$(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/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< -$(MAN3DIR)/%.3:: %.xml +ifneq ($(wildcard $(SPECDIR)),) +$(MAN3DIR)/%.3: %.xml $(SPECDIR)/specs_%.xml + 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/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(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/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< +endif # left for compatability -$(MAN4DIR)/%.4:: %.xml +$(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/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< -$(MAN4DIR)/%.5:: %.xml +$(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/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< # left for compatability -$(MAN6DIR)/%.6:: %_app.xml +$(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/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< -$(MAN6DIR)/%.7:: %_app.xml +$(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/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< -$(MAN9DIR)/%.9:: %.xml +$(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/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< |