Skip to content

Commit ec53465

Browse files
committed
build: d/configure: severity prefix, instructions
1 parent 4a6916a commit ec53465

1 file changed

Lines changed: 33 additions & 6 deletions

File tree

debian/configure

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Usage:
2222
2323
Extra options:
2424
25-
no-docs|nodocs
25+
no-docs|nodocs|nodoc
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,
@@ -56,9 +56,9 @@ ENABLE_BUILD_DOCUMENTATION=--enable-build-documentation=pdf
5656

5757
while 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) unset ENABLE_BUILD_DOCUMENTATION ;;
6262
*) echo 1>&2 "Unknown option: $1"
6363
echo 1>&2
6464
usage
@@ -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
;;
130130
esac
131131

@@ -221,3 +221,30 @@ else
221221
echo " Building of documentation is disabled."
222222
fi
223223
echo " The DEB_BUILD_OPTIONS environment variable also works with dpkg-buildpackage."
224+
225+
if command -v dpkg-checkbuilddeps > /dev/null; then
226+
227+
if [ -n "$ENABLE_BUILD_DOCUMENTATION" ]; then
228+
a=$(cd .. && dpkg-checkbuilddeps || true)
229+
if [ -n "$a" ]; then
230+
echo "W: To successfully build all of LinuxCNC, install the following build dependencies are mising:\n$a"
231+
echo " The missing packages are auto-installed by"
232+
echo " sudo apt build-dep ."
233+
else
234+
echo "I: No build dependencies missing for complete builds including documentation."
235+
fi
236+
else
237+
a=$(cd .. && dpkg-checkbuilddeps -B || true)
238+
if [ -n "$a" ]; then
239+
echo "I: No dependencies missing for building binaries only."
240+
fi
241+
fi
242+
else
243+
echo "W: Tool to check build-dependenices not found"
244+
echo " You may want to install it as follows:"
245+
echo " sudo apt install dpkg-dev"
246+
echo " and directly execute it like this:"
247+
echo " dpkg-checkbuilddeps"
248+
echo " or just execute"
249+
echo " sudo apt build-dep ."
250+
fi

0 commit comments

Comments
 (0)