2222
2323 Extra options:
2424
25- no-docs|nodocs
25+ no-docs|nodocs|nodoc|no-doc
2626 Skip building documentation.
2727 Debian packaging will not know about documentation to exist at all.
2828 If configured regularly but with the intent not to build the docs,
3232 Accepted for compatibility, but now ignored.
3333
3434 -h|--help|help
35- Show this help.
35+ Show this help.
3636EOF
3737}
3838
@@ -56,12 +56,12 @@ ENABLE_BUILD_DOCUMENTATION=--enable-build-documentation=pdf
5656
5757while test $# -ne 0; do
5858 case " $1 " in
59- sim|uspace|noauto) echo " $1 is accepted for compatibility, but ignored" ;;
59+ sim|uspace|noauto) echo " I: Argument $1 is accepted for compatibility, but ignored" ;;
6060 help|-h|--help) usage; exit 0 ;;
61- no-docs|nodocs) unset ENABLE_BUILD_DOCUMENTATION ;;
61+ no-docs|nodocs|nodoc|no-doc ) unset ENABLE_BUILD_DOCUMENTATION ;;
6262 * ) echo 1>&2 " Unknown option: $1 "
6363 echo 1>&2
64- usage
64+ usage
6565 exit 99 ;;
6666 esac
6767 shift
@@ -88,14 +88,14 @@ if [ -n "$ENABLE_BUILD_DOCUMENTATION" ]; then
8888
8989
9090 case $DISTRIB_NAME in
91- Debian-9)
92- ;; # No xetex in Debian 9 Stretch
93- * )
94- # Not quite sure which packages is needed for xetex, but
95- # texlive-xetex seem like a safe choice. Need xetex to be
96- # able to build Chinese PDF.
97- DOC_DEPENDS=" $DOC_DEPENDS ,\n texlive-xetex"
98- ;;
91+ Debian-9)
92+ ;; # No xetex in Debian 9 Stretch
93+ * )
94+ # Not quite sure which packages is needed for xetex, but
95+ # texlive-xetex seem like a safe choice. Need xetex to be
96+ # able to build Chinese PDF.
97+ DOC_DEPENDS=" $DOC_DEPENDS ,\n texlive-xetex"
98+ ;;
9999 esac
100100else
101101 DOC_DEPENDS=' '
@@ -123,9 +123,9 @@ case $DISTRIB_NAME in
123123 Debian-10|Debian-10.* |Raspbian-10|Raspbian-10.* )
124124 ;;
125125 * )
126- echo " unknown distribution: $DISTRIB_NAME "
127- echo " detected dependencies may be incomplete or wrong"
128- echo " please consider fixing it and submitting a pull request"
126+ echo " W: Unknown distribution: ' $DISTRIB_NAME '. "
127+ echo " Detected dependencies may be incomplete or wrong. "
128+ echo " Please consider fixing it and submitting a pull request. "
129129 ;;
130130esac
131131
@@ -221,3 +221,39 @@ else
221221 echo " Building of documentation is disabled."
222222fi
223223echo " The DEB_BUILD_OPTIONS environment variable also works with dpkg-buildpackage."
224+
225+ if command -v dpkg-checkbuilddeps > /dev/null; then
226+
227+ a=" "
228+ if [ -n " $ENABLE_BUILD_DOCUMENTATION " ]; then
229+ a=$( cd .. && dpkg-checkbuilddeps 2>&1 || true)
230+ if [ -n " $a " ]; then
231+ echo " W: To successfully build all of LinuxCNC, install the following build dependencies are mising:"
232+ else
233+ echo " I: All build dependencies available for complete builds including the documentation."
234+ fi
235+ else
236+ a=$( cd .. && dpkg-checkbuilddeps -B 2>&1 || true)
237+ if [ -n " $a " ]; then
238+ echo " W: To successfully build the architecture-dependent parts of LinuxCNC, the following build dependencies are mising:"
239+ else
240+ echo " I: No dependencies missing while not building the documentation."
241+ fi
242+ fi
243+ if [ -n " $a " ]; then
244+ # The common part once missing packages have been identified
245+ echo -n " " ; echo " $a " | cut -f4 -d:
246+ echo " The missing packages are auto-installed by"
247+ echo " sudo apt build-dep ."
248+ fi
249+ else
250+ echo " W: Tool to check build-dependenices not found"
251+ echo " You may want to install it as follows:"
252+ echo " sudo apt install dpkg-dev"
253+ echo " and directly execute it like this:"
254+ echo " dpkg-checkbuilddeps"
255+ echo " or just execute"
256+ echo " sudo apt build-dep ."
257+ fi
258+
259+ # vim: ts=4
0 commit comments