[yocto] [eclipse-poky][PATCH] Documentation: add check for adt-manual vs sdk-manual build
Tim Orling
timothy.t.orling at linux.intel.com
Thu May 26 22:41:36 PDT 2016
[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
Signed-off-by: Tim Orling <timothy.t.orling at linux.intel.com>
---
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(-)
diff --git a/plugins/org.yocto.doc.user/about.html.in b/plugins/org.yocto.doc.user/about.html.in
index 3040859..5188d3c 100644
--- a/plugins/org.yocto.doc.user/about.html.in
+++ b/plugins/org.yocto.doc.user/about.html.in
@@ -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>
diff --git a/plugins/org.yocto.doc.user/plugin.xml b/plugins/org.yocto.doc.user/plugin.xml
index 8e87ce7..c7754de 100644
--- a/plugins/org.yocto.doc.user/plugin.xml
+++ b/plugins/org.yocto.doc.user/plugin.xml
@@ -8,7 +8,7 @@
primary="true">
</toc>
<toc
- file="html/adt-manual-toc.xml"
+ file="html/sdk-manual-toc.xml"
primary="false">
</toc>
<toc
diff --git a/plugins/org.yocto.doc.user/toc.xml b/plugins/org.yocto.doc.user/toc.xml
index 86fbe29..a390084 100644
--- a/plugins/org.yocto.doc.user/toc.xml
+++ b/plugins/org.yocto.doc.user/toc.xml
@@ -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"/>
diff --git a/scripts/generate-doc.sh b/scripts/generate-doc.sh
index e3ac3d8..fc59356 100755
--- a/scripts/generate-doc.sh
+++ b/scripts/generate-doc.sh
@@ -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
--
2.5.5
More information about the yocto
mailing list