Skip to content

Commit 93643c1

Browse files
authored
Merge pull request #3071 from smoe/d/configure_verbosity
build: d/configure gives constructive comments, severity prefix for messages
2 parents 4a6916a + 26c1f24 commit 93643c1

2 files changed

Lines changed: 52 additions & 17 deletions

File tree

debian/configure

Lines changed: 52 additions & 16 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|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,
@@ -32,7 +32,7 @@ Usage:
3232
Accepted for compatibility, but now ignored.
3333
3434
-h|--help|help
35-
Show this help.
35+
Show this help.
3636
EOF
3737
}
3838

@@ -56,12 +56,12 @@ 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|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
100100
else
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
;;
130130
esac
131131

@@ -221,3 +221,39 @@ 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+
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

debian/control.top.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Build-Depends:
2222
automake,
2323
bwidget (>= 1.7),
2424
desktop-file-utils,
25-
gettext,
2625
intltool,
2726
libboost-python-dev,
2827
libepoxy-dev,

0 commit comments

Comments
 (0)