mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
16a3f131a3
make: pkg: introduce git-cache
32 lines
742 B
Makefile
32 lines
742 B
Makefile
PKG_NAME=openwsn
|
|
PKG_URL=https://github.com/openwsn-berkeley/openwsn-fw.git
|
|
PKG_VERSION=ff25e5d0ae5d344ed793a724d60532fb917bf1f8
|
|
PKG_DIR=$(CURDIR)/$(PKG_NAME)
|
|
|
|
.PHONY: all clean patch reset
|
|
|
|
all: patch
|
|
"$(MAKE)" -C $(PKG_DIR)
|
|
|
|
patch: $(PKG_DIR)/Makefile
|
|
|
|
$(PKG_DIR)/Makefile: $(PKG_DIR)/.git/config
|
|
cd "$(PKG_DIR)" && git am --ignore-whitespace $(CURDIR)/*.patch
|
|
|
|
$(PKG_DIR)/.git/config:
|
|
test -d "$(PKG_DIR)" || $(GITCACHE) clone "$(PKG_URL)" "$(PKG_VERSION)" "$(PKG_DIR)"
|
|
|
|
clean::
|
|
@echo "Cleaning up OpenWSN package..."
|
|
@cd "$(PKG_DIR)" 2> /dev/null > /dev/null && \
|
|
git clean -x -f && \
|
|
git am --abort ; \
|
|
git reset --hard "$(PKG_VERSION)" && \
|
|
$(MAKE) patch || true
|
|
|
|
distclean::
|
|
rm -rf "$(PKG_DIR)"
|
|
|
|
Makefile.include:
|
|
@true
|