Makefile.am: make ctags ignore lwip-specific identifiers

The Makefile uses ctags to build a list of global identifiers
that should be exported in a dynamic library. As ctags has a
very simplistic way of handling preprocessor conditionals, it
cannot detect symbols that are not present on platform POSIX.
In particular, the Solaris ld chokes on the following:

Undefined                       first referenced
 symbol                             in file
coap_pdu_from_pbuf                  ../.libs/libcoap-1.0.so
coap_packet_extract_pbuf            ../.libs/libcoap-1.0.so

The easiest way to fix this is to tell ctags that is should
ignore these identifiers with option -I.
This commit is contained in:
Olaf Bergmann committed 2015-03-13 13:27:31 +01:00
1 parent c5028c5013
commit 41fac9248b
1 file changed
+4 -2
+4 -2
View File
@@ -94,6 +94,8 @@ libcoap_@LIBCOAP_API_VERSION@_la_LDFLAGS = \
@libcoap_SYMBOLS@ \
-pie
CTAGS_IGNORE=-I "coap_packet_extract_pbuf coap_pdu_from_pbuf"
.PHONY: update-map-file check_ctags
# This helper is called by libcoap-$(LIBCOAP_API_VERSION).{map,sym} to see if
@@ -115,14 +117,14 @@ update-map-file: libcoap-$(LIBCOAP_API_VERSION).map libcoap-$(LIBCOAP_API_VERSIO
libcoap-$(LIBCOAP_API_VERSION).map: check_ctags $(libcoap_include_HEADERS)
( echo "VER_$(LIBCOAP_API_VERSION) {" ; \
echo "global:" ; \
ctags -f - --c-kinds=p $(libcoap_include_HEADERS) | awk '/^coap_/ { print " " $$1 ";" }' | sort ; \
ctags $(CTAGS_IGNORE) -f - --c-kinds=p $(libcoap_include_HEADERS) | awk '/^coap_/ { print " " $$1 ";" }' | sort ; \
echo "local:" ; \
echo " *;" ; \
echo "};" ) > $@.new
mv $@.new $@
libcoap-$(LIBCOAP_API_VERSION).sym: check_ctags $(libcoap_include_HEADERS)
( ctags -f - --c-kinds=p $(libcoap_include_HEADERS) | awk '/^coap_/ { print $$1 }' | sort ) \
( ctags $(CTAGS_IGNORE) -f - --c-kinds=p $(libcoap_include_HEADERS) | awk '/^coap_/ { print $$1 }' | sort ) \
> $@.new
mv $@.new $@