Documentation: add check for adt-manual vs sdk-manual build
PATCH 1/1 Documentation: add check for adt-manual vs sdk-manual build
[YOCTO #9622]
For older YP releases (prior to krogoth/2.1) adt-manual was the norm. Since krogoth/2.1, sdk-manual should replace it.
- adt-manual dropped in commit 84abe03de1cff7952b5d0428e7433f094dde2b02
- sdk-manual added in commit ab591831a97a97d405d13ed75e9fb01e0452c292
--- plugins/org.yocto.doc.user/about.html.in | 8 ++++---- plugins/org.yocto.doc.user/plugin.xml | 2 +- plugins/org.yocto.doc.user/toc.xml | 4 ++-- scripts/generate-doc.sh | 28 +++++++++++++++++++++++++--- 4 files changed, 32 insertions(+), 10 deletions(-)
plugins/org.yocto.doc.user/about.html.in +4 -4
@@ -53,12 +53,12 @@ <br /> <br /> <strong> - Yocto Project Application Developer's Guide: + Yocto Project Software Development Kit (SDK) Developer's Guide: </strong> <br /> <br /> - This manual shows you how to setup and use the Application Development - Toolkit (ADT) and stand-alone cross-development toolchains so you can + This manual shows you how to setup and use the Software Development + Kit (SDK) and stand-alone cross-development toolchains so you can develop user-space applications. <br /> <br />
@@ -72,7 +72,7 @@ git://git.yoctoproject.org/yocto-docs </a> <br /> - <em>Commit:</em> @COMMIT_ID-adt-manual@ + <em>Commit:</em> @COMMIT_ID-sdk-manual@ <br /> <br /> <strong>
plugins/org.yocto.doc.user/plugin.xml +1 -1
@@ -8,7 +8,7 @@ primary="true"> </toc> <toc - file="html/adt-manual-toc.xml" + file="html/sdk-manual-toc.xml" primary="false"> </toc> <toc
plugins/org.yocto.doc.user/toc.xml +2 -2
@@ -3,8 +3,8 @@ <topic label="Yocto Project Quick Start"> <link toc="html/yocto-project-qs-toc.xml"/> </topic> - <topic label="Yocto·Project·Application·Developer's·Guide"> - <link toc="html/adt-manual-toc.xml"/> + <topic label="Yocto Project Software Development Kit (SDK) Developer's Guide"> + <link toc="html/sdk-manual-toc.xml"/> </topic> <topic label="Yocto Project Development Manual"> <link toc="html/dev-manual-toc.xml"/>
scripts/generate-doc.sh +25 -3
@@ -22,6 +22,15 @@ fail () exit ${retval} } +safe_sed() +{ + if [ "$1" ] && [ "$2" ]; then + sed -e "$1" $2 > $2.tmp && mv $2.tmp $2 || fail $? "safe_sed $1 $2" + else + fail 1 "usage: safe_sed \"s/from/to/\" /path/to/file" + fi +} + CHECKOUT_TAG=0 while getopts ":h" opt; do case $opt in
@@ -53,10 +62,23 @@ cd ${DOC_DIR} git checkout $1 || fail $? "git checkout $1" COMMIT_ID=`git rev-parse HEAD` -# build and copy -DOCS="yocto-project-qs adt-manual kernel-dev \ - bsp-guide ref-manual dev-manual profile-manual" +# check yocto-docs branch/tag and build sdk-manual or adt-manual accordingly +# [YOCTO #9622] +if [ "$1" = "master" ] || [ "$1" = "krogoth" ] || [ "$1" = "yocto-2.1" ]; then + DOCS="yocto-project-qs sdk-manual kernel-dev \ + bsp-guide ref-manual dev-manual profile-manual" +else + DOCS="yocto-project-qs adt-manual kernel-dev \ + bsp-guide ref-manual dev-manual profile-manual" + safe_sed "s/sdk-manual/adt-manual/" ${DOC_PLUGIN_DIR}/plugin.xml + safe_sed "s/sdk-manual/adt-manual/" ${DOC_PLUGIN_DIR}/about.html.in + safe_sed "s/Software Development Kit (SDK)/Application/" ${DOC_PLUGIN_DIR}/about.html.in + safe_sed "s/(SDK)/(ADT)/" ${DOC_PLUGIN_DIR}/about.html.in + safe_sed "s/sdk-manual/adt-manual/" ${DOC_PLUGIN_DIR}/toc.xml + safe_sed "s/Software Development Kit (SDK)/Application/" ${DOC_PLUGIN_DIR}/toc.xml +fi +# build and copy cd documentation for DOC in ${DOCS}; do make DOC=${DOC} eclipse
Signature · 1 line
2.5.5
PATCH v2 1/1 Documentation: add check for adt-manual vs sdk-manual build
[YOCTO #9622]
For older YP releases (prior to krogoth/2.1) adt-manual was the norm. Since krogoth/2.1, sdk-manual should replace it.
- adt-manual dropped in commit 84abe03de1cff7952b5d0428e7433f094dde2b02
- sdk-manual added in commit ab591831a97a97d405d13ed75e9fb01e0452c292
---
Changes since v1:
- check for presence of adt-manual removal commit for switch to sdk-manual
- should be less brittle than the prior "whitelist" branch/tag name approach
plugins/org.yocto.doc.user/about.html.in | 8 ++++---- plugins/org.yocto.doc.user/plugin.xml | 2 +- plugins/org.yocto.doc.user/toc.xml | 4 ++-- scripts/generate-doc.sh | 29 ++++++++++++++++++++++++++--- 4 files changed, 33 insertions(+), 10 deletions(-)
plugins/org.yocto.doc.user/about.html.in +4 -4
@@ -53,12 +53,12 @@ <br /> <br /> <strong> - Yocto Project Application Developer's Guide: + Yocto Project Software Development Kit (SDK) Developer's Guide: </strong> <br /> <br /> - This manual shows you how to setup and use the Application Development - Toolkit (ADT) and stand-alone cross-development toolchains so you can + This manual shows you how to setup and use the Software Development + Kit (SDK) and stand-alone cross-development toolchains so you can develop user-space applications. <br /> <br />
@@ -72,7 +72,7 @@ git://git.yoctoproject.org/yocto-docs </a> <br /> - <em>Commit:</em> @COMMIT_ID-adt-manual@ + <em>Commit:</em> @COMMIT_ID-sdk-manual@ <br /> <br /> <strong>
plugins/org.yocto.doc.user/plugin.xml +1 -1
@@ -8,7 +8,7 @@ primary="true"> </toc> <toc - file="html/adt-manual-toc.xml" + file="html/sdk-manual-toc.xml" primary="false"> </toc> <toc
plugins/org.yocto.doc.user/toc.xml +2 -2
@@ -3,8 +3,8 @@ <topic label="Yocto Project Quick Start"> <link toc="html/yocto-project-qs-toc.xml"/> </topic> - <topic label="Yocto·Project·Application·Developer's·Guide"> - <link toc="html/adt-manual-toc.xml"/> + <topic label="Yocto Project Software Development Kit (SDK) Developer's Guide"> + <link toc="html/sdk-manual-toc.xml"/> </topic> <topic label="Yocto Project Development Manual"> <link toc="html/dev-manual-toc.xml"/>
scripts/generate-doc.sh +26 -3
@@ -22,6 +22,15 @@ fail () exit ${retval} } +safe_sed() +{ + if [ "$1" ] && [ "$2" ]; then + sed -e "$1" $2 > $2.tmp && mv $2.tmp $2 || fail $? "safe_sed $1 $2" + else + fail 1 "usage: safe_sed \"s/from/to/\" /path/to/file" + fi +} + CHECKOUT_TAG=0 while getopts ":h" opt; do case $opt in
@@ -53,10 +62,24 @@ cd ${DOC_DIR} git checkout $1 || fail $? "git checkout $1" COMMIT_ID=`git rev-parse HEAD` -# build and copy -DOCS="yocto-project-qs adt-manual kernel-dev \ - bsp-guide ref-manual dev-manual profile-manual" +# check yocto-docs branch/tag and build sdk-manual or adt-manual accordingly +# [YOCTO #9622] +ADT_REMOVAL_COMMIT=84abe03de1cff7952b5d0428e7433f094dde2b02 +if [ "$(git merge-base ${ADT_REMOVAL_COMMIT} $1)" = "${ADT_REMOVAL_COMMIT}" ]; then + DOCS="yocto-project-qs sdk-manual kernel-dev \ + bsp-guide ref-manual dev-manual profile-manual" +else + DOCS="yocto-project-qs adt-manual kernel-dev \ + bsp-guide ref-manual dev-manual profile-manual" + safe_sed "s/sdk-manual/adt-manual/" ${DOC_PLUGIN_DIR}/plugin.xml + safe_sed "s/sdk-manual/adt-manual/" ${DOC_PLUGIN_DIR}/about.html.in + safe_sed "s/Software Development Kit (SDK)/Application/" ${DOC_PLUGIN_DIR}/about.html.in + safe_sed "s/(SDK)/(ADT)/" ${DOC_PLUGIN_DIR}/about.html.in + safe_sed "s/sdk-manual/adt-manual/" ${DOC_PLUGIN_DIR}/toc.xml + safe_sed "s/Software Development Kit (SDK)/Application/" ${DOC_PLUGIN_DIR}/toc.xml +fi +# build and copy cd documentation for DOC in ${DOCS}; do make DOC=${DOC} eclipse
Signature · 1 line
2.5.5