Browse Source

Makefile: fix syntax error in upload rule

H. Peter Anvin 2 years ago
parent
commit
66a8071ddf
1 changed files with 5 additions and 2 deletions
  1. 5 2
      Makefile

+ 5 - 2
Makefile

@@ -8,6 +8,9 @@ GIT_DIR   ?= .git
 
 MAX80_IP  ?= max80
 
+CURL	   = curl
+PERL	   = perl
+
 all clean spotless :
 	$(MAKE) local.$@ $(SUBDIRS) goal=$@
 
@@ -74,7 +77,7 @@ upload-esp:
 ip = $(MAX80_IP)
 upload-%:
 	if [ -z '$(PORT)' ]; then \
-		curl -v --data-binary @fpga/output/$*.fw http://$(ip)/sys/fwupdate ; \
-	else ; \
+		$(CURL) -v --data-binary @fpga/output/$*.fw http://$(ip)/sys/fwupdate ; \
+	else \
 		$(PERL) ./esp32/flashesp.pl --port $(PORT) fpga/output/$*.fw ; \
 	fi