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:
parent
66c011d45d
commit
bec43ac340
@ -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
|
||||
|
@ -1 +1 @@
|
||||
INCLUDES += -I$(BINDIR)/pkg/cmsis-dsp/include
|
||||
INCLUDES += -I$(BINDIRBASE)/pkg/$(BOARD)/cmsis-dsp/include
|
||||
|
@ -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
|
||||
|
@ -1 +1 @@
|
||||
INCLUDES += -I$(BINDIR)/pkg/micro-ecc
|
||||
INCLUDES += -I$(BINDIRBASE)/pkg/$(BOARD)/micro-ecc
|
||||
|
@ -1 +1 @@
|
||||
INCLUDES += -I$(BINDIR)/pkg/microcoap
|
||||
INCLUDES += -I$(BINDIRBASE)/pkg/$(BOARD)/microcoap
|
||||
|
@ -1 +1 @@
|
||||
INCLUDES += -I$(BINDIR)/pkg/oonf_api/src-api
|
||||
INCLUDES += -I$(BINDIRBASE)/pkg/$(BOARD)/oonf_api/src-api
|
||||
|
18
pkg/pkg.mk
18
pkg/pkg.mk
@ -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)"
|
||||
|
@ -1 +1 @@
|
||||
INCLUDES += -I$(BINDIR)/pkg/relic/include
|
||||
INCLUDES += -I$(BINDIRBASE)/pkg/$(BOARD)/relic/include
|
||||
|
Loading…
Reference in New Issue
Block a user