Skip to content

Commit 0adf9e9

Browse files
authored
Merge pull request #21823 from crasbe/pr/remove_dl_to_stdout
makefiles: remove `DOWNLOAD_TO_STDOUT`
2 parents 167b5e3 + 399a2bc commit 0adf9e9

File tree

3 files changed

+11
-27
lines changed

3 files changed

+11
-27
lines changed

Makefile.include

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -333,28 +333,7 @@ APPLICATION := $(strip $(APPLICATION))
333333

334334
# provide common external programs for `Makefile.include`s
335335

336-
ifeq (,$(and $(DOWNLOAD_TO_STDOUT),$(DOWNLOAD_TO_FILE)))
337-
ifeq (,$(WGET))
338-
ifeq (0,$(shell which wget > /dev/null 2>&1 ; echo $$?))
339-
WGET = $(call memoized,WGET,$(shell which wget))
340-
endif
341-
endif
342-
ifeq (,$(CURL))
343-
ifeq (0,$(shell which curl > /dev/null 2>&1 ; echo $$?))
344-
CURL = $(call memoized,CURL,$(shell which curl))
345-
endif
346-
endif
347-
ifeq (,$(WGET)$(CURL))
348-
$(warning Neither wget nor curl is installed!)
349-
endif
350-
351-
ifeq (,$(DOWNLOAD_TO_STDOUT))
352-
DOWNLOAD_TO_STDOUT ?= $(if $(CURL),$(CURL) -s,$(WGET) -q -O-)
353-
endif
354-
ifeq (,$(DOWNLOAD_TO_FILE))
355-
DOWNLOAD_TO_FILE ?= $(DLCACHE)
356-
endif
357-
endif
336+
DOWNLOAD_TO_FILE ?= $(DLCACHE)
358337

359338
ifeq (,$(UNZIP_HERE))
360339
ifeq (0,$(shell which unzip > /dev/null 2>&1 ; echo $$?))

makefiles/info.inc.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ info-build:
110110
@echo 'DEBUGGER: $(DEBUGGER)'
111111
@echo 'DEBUGGER_FLAGS: $(DEBUGGER_FLAGS)'
112112
@echo
113+
@echo 'DLCACHE: $(DLCACHE)'
114+
@echo 'DLCACHE_DIR: $(DLCACHE_DIR)'
113115
@echo 'DOWNLOAD_TO_FILE: $(DOWNLOAD_TO_FILE)'
114-
@echo 'DOWNLOAD_TO_STDOUT: $(DOWNLOAD_TO_STDOUT)'
115116
@echo 'UNZIP_HERE: $(UNZIP_HERE)'
116117
@echo ''
117118
@echo 'DEBUGSERVER: $(DEBUGSERVER)'

makefiles/vars.inc.mk

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,14 @@ export DEVELHELP # Set to 1 to spend ROM, RAM and CPU time for help
128128
# USE_PROGRAMMER_WRAPPER_SCRIPT # Use the programmer wrapper Python script. Default is 0 (wrapper not used).
129129

130130

131-
export DLCACHE # directory used to cache http downloads
132-
export DOWNLOAD_TO_FILE # Use `$(DOWNLOAD_TO_FILE) $(DESTINATION) $(URL)` to download `$(URL)` to `$(DESTINATION)`.
133-
export DOWNLOAD_TO_STDOUT # Use `$(DOWNLOAD_TO_STDOUT) $(URL)` to download `$(URL)` output `$(URL)` to stdout, e.g. to be piped into `tar xz`.
134-
export UNZIP_HERE # Use `cd $(SOME_FOLDER) && $(UNZIP_HERE) $(SOME_FILE)` to extract the contents of the zip file `$(SOME_FILE)` into `$(SOME_FOLDER)`.
131+
export DLCACHE # Use `$(DLCACHE) $(DESTINATION) $(URL) [$(SHA512)]` to
132+
# download `$(URL)` to `$(DESTINATION)` but keep a copy in cache
133+
# with an `$(SHA512)` checksum. If no checksum is given, the
134+
# URL will just be downloaded, not cached.
135+
export DOWNLOAD_TO_FILE # Use `$(DOWNLOAD_TO_FILE) $(DESTINATION) $(URL) [$(SHA512)]` to
136+
# download `$(URL)` to `$(DESTINATION)`. Alias for $(DLCACHE).
137+
export UNZIP_HERE # Use `cd $(SOME_FOLDER) && $(UNZIP_HERE) $(SOME_FILE)` to extract
138+
# the contents of the zip file `$(SOME_FILE)` into `$(SOME_FOLDER)`.
135139

136140
export LAZYSPONGE # Command saving stdin to a file only on content update.
137141
export LAZYSPONGE_FLAGS # Parameters supplied to LAZYSPONGE.

0 commit comments

Comments
 (0)