Skip to content

Commit

Permalink
configure: move ctags checks here from mkproto.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
stsp committed Dec 26, 2024
1 parent 7778687 commit dfb5842
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
3 changes: 3 additions & 0 deletions Makefile.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ XLD_IMB_OPT := @XLD_IMB_OPT@
CROSS_STRIP := @CROSS_STRIP@

CROSS_ASFLAGS := @CROSS_ASFLAGS@

CTAGS := @CTAGS@
RTAGS := @RTAGS@
9 changes: 9 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,13 @@ if test -z "$CROSS_STRIP"; then
AC_MSG_ERROR([cross-strip not found])
fi

AC_CHECK_PROGS([CTAGS], [uctags ctags])
AC_CHECK_PROGS([RTAGS], [ureadtags readtags])
if test -z "$CTAGS" -o -z "$RTAGS"; then
AC_MSG_ERROR([universal-ctags not installed])
fi
if ! $CTAGS --version | grep "Universal Ctags" >/dev/null; then
AC_MSG_ERROR([bsd ctags do not suit, install universal-ctags])
fi

AC_OUTPUT
22 changes: 3 additions & 19 deletions src/libc/dj64/parsers/mkproto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,9 @@ if [ $# -lt 5 ]; then
exit 1
fi

if ! which uctags >/dev/null 2>&1; then
if ! which ctags >/dev/null 2>&1; then
echo "universal-ctags not installed"
exit 1
fi
if ! ctags -L /dev/null -f /dev/null; then
if [ "`uname -s`" = "FreeBSD" ]; then
echo "bsd ctags do not suit, install universal-ctags"
exit 1
else
# https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/2069483
echo "ctags reported failure, running on ubuntu Focal?"
fi
fi
RTAGS=readtags
CTAGS=ctags
else
RTAGS=ureadtags
CTAGS=uctags
if test -z "$CTAGS" -o test -z "$RTAGS"; then
echo "universal-ctags not installed"
exit 1
fi

extr_proto() {
Expand Down
2 changes: 2 additions & 0 deletions src/makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ SHELL := bash -o pipefail

# for mkproto.sh
export CROSS_LD
export CTAGS
export RTAGS

export prefix

Expand Down

0 comments on commit dfb5842

Please sign in to comment.