From 41fac9248bf39d8398cadaf71fcda26bbf99f358 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Fri, 13 Mar 2015 13:27:31 +0100 Subject: [PATCH] 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. --- Makefile.am | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 31285b92..707b43f8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 $@