$(1)
is the first argument to a GNU make “function”, which is a variable interpreted by the call
function:
define dataverse_download
wget --retry-connrefused --waitretry=5 --read-timeout=30 --tries=50 --no-dns-cache https://dataverse.harvard.edu/api/access/datafile/:persistentId?persistentId=doi:$(1) -O data/tmp.tar.gz
cd data && tar -xzf tmp.tar.gz
rm -f data/tmp.tar.gz
endef
download_wget:
mkdir -p data
$(call dataverse_download,10.7910/DVN/IA8UOS/URG8XN)
$(call dataverse_download,10.7910/DVN/IA8UOS/1DBE7K)
$(call dataverse_download,10.7910/DVN/IA8UOS/34QRHK)
This defines a function, dataverse_download
, which downloads the datafile matching the DOI given as the first argument; the download_wget
target shows how to use this with the $(call)
function.
$(1)
is the same as$1
or${1}
, just like any other one-character macro like$@
ora = b ... $a
. – Feb 24 '20 at 11:55