1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/libcoap/Makefile
Ludwig Ortmann 6fcf7ec089 fix libcoap checkout target
Fixes the following error:
make[1]: Entering directory '/foo/RIOT/pkg/libcoap'
git clone http://git.code.sf.net/p/libcoap/code /foo/RIOT/pkg/libcoap/libcoap && \
	cd /foo/RIOT/pkg/libcoap/libcoap && git checkout 89acaa6775ca3a4aedea510557e6b9c0c01fa5db
fatal: destination path '/foo/RIOT/pkg/libcoap/libcoap' already exists and is not an empty directory.
Makefile:25: recipe for target '/foo/RIOT/pkg/libcoap/libcoap' failed
2014-01-28 18:52:55 +01:00

35 lines
807 B
Makefile

PKG_NAME=libcoap
PKG_URL=http://git.code.sf.net/p/libcoap/code
PKG_VERSION=89acaa6775ca3a4aedea510557e6b9c0c01fa5db
ifneq ($(RIOTBOARD),)
include $(RIOTBOARD)/$(BOARD)/Makefile.include
endif
ifneq ($(RIOTBASE),)
INCLUDES += -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/sys/net/include \
-I$(RIOTBASE)/sys/posix/include -I$(RIOTBASE)/sys/posix/pnet/include
endif
.PHONY: all clean patch reset
all: patch
make -C $(CURDIR)/$(PKG_NAME)
patch: $(CURDIR)/$(PKG_NAME)/Makefile
$(CURDIR)/$(PKG_NAME)/Makefile: $(CURDIR)/$(PKG_NAME)
cd $< && git apply ../patch.txt
$(CURDIR)/$(PKG_NAME)/:
git clone $(PKG_URL) $@ && \
cd $@ && git checkout $(PKG_VERSION)
clean::
cd $(CURDIR)/$(PKG_NAME) && \
git clean -x -f && \
git reset --hard $(PKG_VERSION) || true
distclean::
rm -rf $(CURDIR)/$(PKG_NAME)