Skip to contentSkip to conversation

Re-implement the source-check and external-deps targets

PATCH New Maxime Petazzoni 1 participant 1 message Sep 17, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Re-implement the source-check and external-deps targets

commit: http://git.buildroot.net/buildroot/commit/?id=d147b81fda4419ea7307835d39cdb58b965882aa
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

The new DL_MODE variable dispatches between the various download implementations of each method (Git, Subversion, Wget) to deal with the normal download (default mode, 'DOWNLOAD'), the source-check ('SOURCE_CHECK') and to show the external dependencies for external-deps ('SHOW_EXTERNAL_DEPS').

For the latter, the legacy script wget-show-external-deps.sh is no longer required as $(WGET) isn't called directly anymore but always through the DOWNLOAD helper.

---
 Makefile                             |   13 +----
 package/Makefile.package.in          |   86 ++++++++++++++++++++++++++++-----
 package/mpfr/mpfr.mk                 |    2 +
 toolchain/wget-show-external-deps.sh |    6 --
 4 files changed, 77 insertions(+), 30 deletions(-)
 delete mode 100755 toolchain/wget-show-external-deps.sh
Makefile +2 -11
index 7780403..faa802b 100644
@@ -244,19 +244,10 @@ ifeq ($(ARCH),xtensa)
 ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name))
 endif
 
-WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET)
-SVN:=$(call qstrip,$(BR2_SVN)) $(QUIET)
-BZR:=$(call qstrip,$(BR2_BZR)) $(QUIET)
-GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
 ZCAT:=$(call qstrip,$(BR2_ZCAT))
 BZCAT:=$(call qstrip,$(BR2_BZCAT))
 TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
 
-DL_DIR=$(call qstrip,$(BR2_DL_DIR))
-ifeq ($(DL_DIR),)
-DL_DIR:=$(TOPDIR)/dl
-endif
-
 GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))
 
 STAGING_DIR:=$(call qstrip,$(BR2_STAGING_DIR))
@@ -435,10 +426,10 @@ endif
 source: $(TARGETS_SOURCE) $(HOST_SOURCE)
 
 _source-check:
-	@echo "TODO $@"
+	$(MAKE) DL_MODE=SOURCE_CHECK $(EXTRAMAKEARGS) source
 
 external-deps:
-	@echo "TODO $@"
+	@$(MAKE) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source
 
 show-targets:
 	@echo $(TARGETS)
package/Makefile.package.in +73 -13

143 lines not on this page · raw message

package/mpfr/mpfr.mk +2 -0
index b7b80a5..6979a9f 100644
@@ -21,8 +21,10 @@ MPFR_PATCH_SOURCE:=$(DL_DIR)/$(MPFR_PATCH_FILE)
 
 $(MPFR_PATCH_SOURCE):
 	$(call DOWNLOAD,$(MPFR_SITE),$(MPFR_PATCH))
+ifeq ($(DL_MODE),DOWNLOAD)
 	mv $(DL_DIR)/$(MPFR_PATCH) $@
 endif
+endif
 
 $(DL_DIR)/$(MPFR_SOURCE):
 	 $(call DOWNLOAD,$(MPFR_SITE),$(MPFR_SOURCE))
toolchain/wget-show-external-deps.sh deleted +0 -6
deleted file mode 100755
index 20071c0..0000000
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-# replacement for wget (see BR2_WGET) which simply shows the file name to be
-# downloaded. Used by the external-deps make target.
-
-exec basename ${!#}
\ No newline at end of file
Signature · 1 line
1.7.1