adding check for ctags

We need ctags to run the make target 'update-map-file' so we better give
a warning out if ctags wasn't found.
This commit is contained in:
Carsten Schoenert authored and Olaf Bergmann committed 2015-03-03 19:21:43 +01:00
1 parent 4dc6637525
commit dc2ada4323
2 files changed
+16

No files matched your search

+7
View File
@@ -87,6 +87,13 @@ libcoap_@LIBCOAP_API_VERSION@_la_LDFLAGS = -version-info $(LT_LIBCOAP_CURRENT):$
## Helper target to generate the symbol table needed by libtool
update-map-file:
@if [ "$(CTAGS_PROG)" = "" ]; then \
echo ;\
echo "There was no ctags program found by the configure script!" ;\
echo "ctags is needed for running this target! Please note the warning about the missed ctags program of the configure script." ;\
echo ;\
exit 1;\
fi
( echo "VER_$(LIBCOAP_API_VERSION) {" ; \
echo "global:" ; \
ctags -f - --c-kinds=p $(libcoap_include_HEADERS) | awk '/^coap_/ { print " " $$1 ";" }' | sort ; \
+9
View File
@@ -91,6 +91,15 @@ AC_SUBST(LIBCOAP_API_VERSION)
# FIXME! Switch to configure section?
AC_PATH_PROG(DOXYGEN, doxygen, [:])
# Check for ctags
AC_ARG_VAR([CTAGS_PROG],[the 'ctag' program to use for make target 'update-map-file'])
AC_PATH_PROG([CTAGS_PROG],[ctags],[])
if test "x$CTAGS_PROG" = "x"; then
AC_MSG_NOTICE([==> Note: 'ctags' command not found!])
AC_MSG_WARN([==> Without ctags you will be unable to run the target 'update-map-file'!])
AC_MSG_WARN([==> This is no problem if you just want to build the library libcoap.])
fi
# Checks for header files.
AC_CHECK_HEADERS([assert.h arpa/inet.h limits.h netdb.h netinet/in.h \
stdlib.h string.h strings.h sys/socket.h sys/time.h \