This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 972594604 libcoap: fix makefile compile error after menuconfig
972594604 is described below

commit 972594604ceda718439e630a2addcf3e352d42e2
Author: zhanghongyu <[email protected]>
AuthorDate: Tue Jan 9 14:28:30 2024 +0800

    libcoap: fix makefile compile error after menuconfig
    
    correct the LIBCOAP_VERSION format
    
    Signed-off-by: zhanghongyu <[email protected]>
---
 netutils/libcoap/Makefile | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/netutils/libcoap/Makefile b/netutils/libcoap/Makefile
index 393bce0c2..e69c9be17 100644
--- a/netutils/libcoap/Makefile
+++ b/netutils/libcoap/Makefile
@@ -22,34 +22,34 @@ include $(APPDIR)/Make.defs
 
 COAP_URL ?= "https://codeload.github.com/obgm/libcoap/zip/refs/tags";
 
-COAP_ZIP = libcoap-$(CONFIG_LIBCOAP_VERSION).zip
+LIBCOAP_VERSION = $(patsubst "%",%,$(strip $(CONFIG_LIBCOAP_VERSION)))
+COAP_ZIP = libcoap-$(LIBCOAP_VERSION).zip
 
 COAP_UNPACKNAME = libcoap
 UNPACK ?= unzip -q -o
 
 $(COAP_ZIP):
-       @echo "Downloading: $(COAP_URL)/v$(CONFIG_LIBCOAP_VERSION)"
-       $(Q) curl -o $(COAP_ZIP) -L $(COAP_URL)/v$(CONFIG_LIBCOAP_VERSION)
+       @echo "Downloading: $(COAP_URL)/v$(LIBCOAP_VERSION)"
+       $(Q) curl -o $(COAP_ZIP) -L $(COAP_URL)/v$(LIBCOAP_VERSION)
 
 $(COAP_UNPACKNAME): $(COAP_ZIP)
        @echo "Unpacking: $(COAP_ZIP) -> $(COAP_UNPACKNAME)"
        $(Q) $(UNPACK) $(COAP_ZIP)
        @echo "Unpacking: $(COAP_ZIP) -> $(COAP_UNPACKNAME)"
-       $(Q) mv libcoap-$(CONFIG_LIBCOAP_VERSION) $(COAP_UNPACKNAME)
+       $(Q) mv libcoap-$(LIBCOAP_VERSION) $(COAP_UNPACKNAME)
        $(Q) touch $(COAP_UNPACKNAME)
 
+context:: $(COAP_UNPACKNAME)/include/coap3/coap.h
 # Download and unpack tarball if no git repo found
 ifeq ($(wildcard $(COAP_UNPACKNAME)/.git),)
-context:: $(COAP_UNPACKNAME)
-
 distclean::
        $(call DELDIR, $(COAP_UNPACKNAME))
        $(call DELFILE, $(COAP_ZIP))
-endif
-
-context:: $(COAP_UNPACKNAME)/include/coap3/coap.h
 
 $(COAP_UNPACKNAME)/include/coap3/coap.h:: $(COAP_UNPACKNAME)
+else
+$(COAP_UNPACKNAME)/include/coap3/coap.h::
+endif
        cd $(COAP_UNPACKNAME) && ./autogen.sh && \
        ./configure --disable-doxygen --disable-manpages
 

Reply via email to