@@ -14,15 +14,25 @@ set -e
1414
1515usage () {
1616 P=${0##*/ }
17- cat << EOF
17+ cat 1>&2 << EOF
1818$P : Set up debian/ files to build for a particular kernel
1919
2020Usage:
2121 $P [no-docs]
2222
2323 Extra options:
24- no-docs
25- Skip building documentation
24+
25+ no-docs|nodocs
26+ Skip building documentation.
27+ Debian packaging will not know about documentation to exist at all.
28+ If configured regularly but with the intent not to build the docs,
29+ run "DEB_BUILD_OPTIONS=nodocs dpkg-buildpackage".
30+
31+ sim|uspace|noauto
32+ Accepted for compatibility, but now ignored.
33+
34+ -h|--help|help
35+ Show this help.
2636EOF
2737}
2838
@@ -47,8 +57,12 @@ ENABLE_BUILD_DOCUMENTATION=--enable-build-documentation=pdf
4757while test $# -ne 0; do
4858 case " $1 " in
4959 sim|uspace|noauto) echo " $1 is accepted for compatibility, but ignored" ;;
50- no-docs) unset ENABLE_BUILD_DOCUMENTATION ;;
51- * ) echo 1>&2 " Unknown option: $1 " ; exit 99 ;;
60+ help|-h|--help) usage; exit 0 ;;
61+ no-docs|nodocs) unset ENABLE_BUILD_DOCUMENTATION ;;
62+ * ) echo 1>&2 " Unknown option: $1 "
63+ echo 1>&2
64+ usage
65+ exit 99 ;;
5266 esac
5367 shift
5468done
@@ -201,5 +215,9 @@ echo "I: You can now start the build of LinuxCNC Debian packages."
201215echo " To build and test everything: fakeroot debian/rules binary"
202216echo " To build the executables and man pages only: fakeroot debian/rules binary-arch"
203217echo " To avoid tests: DEB_BUILD_OPTIONS=nocheck debian/rules binary"
204- echo " To avoid documentation: DEB_BUILD_OPTIONS=nodocs fakeroot debian/rules binary"
218+ if [ -n " $ENABLE_BUILD_DOCUMENTATION " ]; then
219+ echo " To avoid documentation: DEB_BUILD_OPTIONS=nodocs fakeroot debian/rules binary"
220+ else
221+ echo " Building of documentation is disabled."
222+ fi
205223echo " The DEB_BUILD_OPTIONS environment variable also works with dpkg-buildpackage."
0 commit comments