From 8e360aa97ffff77a2d3c83c175f6bed7b67a9dcc Mon Sep 17 00:00:00 2001
From: Martine Lenders <mlenders@inf.fu-berlin.de>
Date: Wed, 23 Mar 2016 16:38:19 +0100
Subject: [PATCH] pkg: clarify that current `download` target is only for git

---
 pkg/Makefile.git       |  2 +-
 pkg/ccn-lite/Makefile  |  2 +-
 pkg/cmsis-dsp/Makefile |  2 +-
 pkg/libcoap/Makefile   |  2 +-
 pkg/micro-ecc/Makefile |  2 +-
 pkg/microcoap/Makefile |  2 +-
 pkg/oonf_api/Makefile  |  2 +-
 pkg/openwsn/Makefile   |  2 +-
 pkg/pkg.mk             | 10 ++++++----
 pkg/relic/Makefile     |  2 +-
 pkg/wakaama/Makefile   |  2 +-
 11 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/pkg/Makefile.git b/pkg/Makefile.git
index 3a565315b4..417b1ae318 100644
--- a/pkg/Makefile.git
+++ b/pkg/Makefile.git
@@ -4,7 +4,7 @@ PKG_VERSION=	# version of the package to use e.g. a git commit/ref
 
 .PHONY: all
 
-all: download
+all: git-download
 	$(MAKE) -C $(CURDIR)/$(PKG_NAME)
 
 include $(RIOTBASE)/pkg/pkg.mk
diff --git a/pkg/ccn-lite/Makefile b/pkg/ccn-lite/Makefile
index 7c4d8f5cee..a842f6510c 100644
--- a/pkg/ccn-lite/Makefile
+++ b/pkg/ccn-lite/Makefile
@@ -6,7 +6,7 @@ PKG_VERSION=39b1406c11de9de364220909488eebabe7e81613
 
 export RIOT_CFLAGS = ${CFLAGS} ${INCLUDES}
 
-all: download
+all: git-download
 	"$(MAKE)" -BC $(PKG_BUILDDIR)/src lib-ccn-lite.a
 	"$(MAKE)" -BC $(PKG_BUILDDIR)/src lib-ccn-lite-utils.a
 	cp $(PKG_BUILDDIR)/src/lib-ccn-lite.a ${BINDIR}/ccn-lite.a
diff --git a/pkg/cmsis-dsp/Makefile b/pkg/cmsis-dsp/Makefile
index 17dae9ae24..3dcf116e54 100644
--- a/pkg/cmsis-dsp/Makefile
+++ b/pkg/cmsis-dsp/Makefile
@@ -8,7 +8,7 @@ endif
 
 .PHONY: all
 
-all: download
+all: git-download
 	$(MAKE) -C $(PKG_BUILDDIR)
 
 include $(RIOTBASE)/pkg/pkg.mk
diff --git a/pkg/libcoap/Makefile b/pkg/libcoap/Makefile
index 7a97abcd3c..29948beda3 100644
--- a/pkg/libcoap/Makefile
+++ b/pkg/libcoap/Makefile
@@ -9,7 +9,7 @@ endif
 
 .PHONY: all
 
-all: download
+all: git-download
 	"$(MAKE)" -C $(PKG_BUILDDIR)
 
 include $(RIOTBASE)/pkg/pkg.mk
diff --git a/pkg/micro-ecc/Makefile b/pkg/micro-ecc/Makefile
index 74dd09d005..c394db2f5a 100644
--- a/pkg/micro-ecc/Makefile
+++ b/pkg/micro-ecc/Makefile
@@ -9,7 +9,7 @@ endif
 
 .PHONY: all
 
-all: download
+all: git-download
 	make -C $(PKG_BUILDDIR)
 
 include $(RIOTBASE)/pkg/pkg.mk
diff --git a/pkg/microcoap/Makefile b/pkg/microcoap/Makefile
index e837d11f17..be2f807393 100644
--- a/pkg/microcoap/Makefile
+++ b/pkg/microcoap/Makefile
@@ -9,7 +9,7 @@ endif
 
 .PHONY: all
 
-all: download
+all: git-download
 	"$(MAKE)" -C $(PKG_BUILDDIR)
 
 include $(RIOTBASE)/pkg/pkg.mk
diff --git a/pkg/oonf_api/Makefile b/pkg/oonf_api/Makefile
index 288ae29b42..5ae690db54 100644
--- a/pkg/oonf_api/Makefile
+++ b/pkg/oonf_api/Makefile
@@ -11,7 +11,7 @@ MODULE:=$(PKG_NAME)
 
 .PHONY: all
 
-all: download
+all: git-download
 	"$(MAKE)" -C $(PKG_BUILDDIR)
 	"$(MAKE)" $(BINDIR)$(MODULE).a
 
diff --git a/pkg/openwsn/Makefile b/pkg/openwsn/Makefile
index 89ef5075cd..beb06cc3e6 100644
--- a/pkg/openwsn/Makefile
+++ b/pkg/openwsn/Makefile
@@ -4,7 +4,7 @@ PKG_VERSION=ff25e5d0ae5d344ed793a724d60532fb917bf1f8
 
 .PHONY: all
 
-all: download
+all: git-download
 	"$(MAKE)" -C $(PKG_DIR)
 
 include $(RIOTBASE)/pkg/pkg.mk
diff --git a/pkg/pkg.mk b/pkg/pkg.mk
index 5341404b61..51fa3f3710 100644
--- a/pkg/pkg.mk
+++ b/pkg/pkg.mk
@@ -4,15 +4,17 @@
 PKG_DIR?=$(CURDIR)
 PKG_BUILDDIR?=$(BINDIR)/pkg/$(PKG_NAME)
 
-download: $(PKG_BUILDDIR)/.downloaded
+.PHONY: git-download
 
-$(PKG_BUILDDIR)/.downloaded:
+git-download: $(PKG_BUILDDIR)/.git-downloaded
+
+$(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
-	touch $(PKG_BUILDDIR)/.downloaded
+	fi
+	touch $@
 
 clean::
 	@echo "Cleaning package $(PKG_NAME)..."
diff --git a/pkg/relic/Makefile b/pkg/relic/Makefile
index 3497d89bfc..ec2f235c6b 100644
--- a/pkg/relic/Makefile
+++ b/pkg/relic/Makefile
@@ -19,7 +19,7 @@ $(PKG_BUILDDIR)/comp-options.cmake: fix_source
 $(PKG_BUILDDIR)/Makefile: $(PKG_BUILDDIR)/comp-options.cmake
 	cd "$(PKG_BUILDDIR)" && COMP="$(filter-out -Werror=old-style-definition -Werror=strict-prototypes, $(CFLAGS) ) " cmake -DCMAKE_TOOLCHAIN_FILE=comp-options.cmake -DCHECK=off -DTESTS=0 -DBENCH=0 -DSHLIB=off -Wno-dev $(RELIC_CONFIG_FLAGS) .
 
-fix_source: download
+fix_source: git-download
 	./fix-util_print_wo_args.sh $(PKG_BUILDDIR)
 	./fix-old-style-definitions.sh $(PKG_BUILDDIR)
 
diff --git a/pkg/wakaama/Makefile b/pkg/wakaama/Makefile
index a58e74af28..7f29eb345f 100644
--- a/pkg/wakaama/Makefile
+++ b/pkg/wakaama/Makefile
@@ -7,7 +7,7 @@ PKG_VERSION=69a32cfae39f66fe4eec4cc8d1cd48ced7ad447c
 all: patch
 	"$(MAKE)" -C $(PKG_BUILDDIR)/riotbuild
 
-patch: download
+patch: git-download
 	mkdir -p "$(PKG_BUILDDIR)/riotbuild"
 	cp $(PKG_BUILDDIR)/core/*.c $(PKG_BUILDDIR)/core/*.h $(PKG_BUILDDIR)/riotbuild
 	cp $(PKG_BUILDDIR)/core/er-coap-13/*.c $(PKG_TEMP_DIR)/core/er-coap-13/*.h $(PKG_BUILDDIR)/riotbuild
-- 
GitLab