1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg: move pkgdir to $BINDIRBASE/pkg/$BOARD/$PKG_NAME, do proper clean

This commit is contained in:
Kaspar Schleiser 2016-03-24 23:32:34 +01:00
parent 66c011d45d
commit bec43ac340
8 changed files with 19 additions and 13 deletions

View File

@ -1,2 +1,2 @@
INCLUDES += -I$(RIOTPKG)/ccn-lite -I$(BINDIR)/pkg/ccn-lite/src
INCLUDES += -I$(RIOTPKG)/ccn-lite -I$(BINDIRBASE)/pkg/$(BOARD)/ccn-lite/src
INCLUDES += -I$(RIOTBASE)/sys/posix/include

View File

@ -1 +1 @@
INCLUDES += -I$(BINDIR)/pkg/cmsis-dsp/include
INCLUDES += -I$(BINDIRBASE)/pkg/$(BOARD)/cmsis-dsp/include

View File

@ -1,3 +1,3 @@
INCLUDES += -I$(BINDIR)/pkg/libcoap \
INCLUDES += -I$(BINDIRBASE)/pkg/$(BOARD)/libcoap \
-I$(RIOTBASE)/sys/posix/include \
-I$(RIOTBASE)/sys/net/include

View File

@ -1 +1 @@
INCLUDES += -I$(BINDIR)/pkg/micro-ecc
INCLUDES += -I$(BINDIRBASE)/pkg/$(BOARD)/micro-ecc

View File

@ -1 +1 @@
INCLUDES += -I$(BINDIR)/pkg/microcoap
INCLUDES += -I$(BINDIRBASE)/pkg/$(BOARD)/microcoap

View File

@ -1 +1 @@
INCLUDES += -I$(BINDIR)/pkg/oonf_api/src-api
INCLUDES += -I$(BINDIRBASE)/pkg/$(BOARD)/oonf_api/src-api

View File

@ -2,23 +2,29 @@
# Include this file if your Package needs to be checked out by git
#
PKG_DIR?=$(CURDIR)
PKG_BUILDDIR?=$(BINDIR)/pkg/$(PKG_NAME)
PKG_BUILDDIR?=$(BINDIRBASE)/pkg/$(BOARD)/$(PKG_NAME)
.PHONY: git-download
git-download: $(PKG_BUILDDIR)/.git-downloaded
GIT_APPLY_PATCHES:=if test -d "$(PKG_DIR)"/patches; then \
git -C "$(PKG_BUILDDIR)" am --ignore-whitespace "$(PKG_DIR)"/patches/*.patch; \
fi
$(PKG_BUILDDIR)/.git-downloaded:
mkdir -p $(PKG_BUILDDIR)
$(GITCACHE) clone "$(PKG_URL)" "$(PKG_VERSION)" "$(PKG_BUILDDIR)"
if test -d "$(PKG_DIR)"/patches; then \
git -C "$(PKG_BUILDDIR)" am --ignore-whitespace "$(PKG_DIR)"/patches/*.patch; \
fi
$(GIT_APPLY_PATCHES)
touch $@
clean::
@echo "Cleaning package $(PKG_NAME)..."
rm -rf "$(PKG_BUILDDIR)"
@test -d $(PKG_BUILDDIR) && { \
git -C $(PKG_BUILDDIR) clean -f ; \
git -C $(PKG_BUILDDIR) checkout "$(PKG_VERSION)"; \
$(GIT_APPLY_PATCHES) ; \
touch $(PKG_BUILDDIR)/.git-downloaded ; \
} > /dev/null 2>&1 || true
distclean::
rm -rf "$(PKG_BUILDDIR)"

View File

@ -1 +1 @@
INCLUDES += -I$(BINDIR)/pkg/relic/include
INCLUDES += -I$(BINDIRBASE)/pkg/$(BOARD)/relic/include