summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorSebastien Rinsoz <sebastien@yoctopuce.com>2019-05-21 11:35:09 +0200
committerDamien George <damien.p.george@gmail.com>2019-05-22 12:56:40 +1000
commita4f4239e9589c49ff621a76cd860ca6fa6b7efe4 (patch)
tree11bc2828f57f301d50573d9bc70732c6eb2ef4ef /py
parent9cf1cbb0575387d79b496b6ff14736ca9239c0a1 (diff)
py: Update makefiles to use $(TOUCH) instead of hard coded "touch".
The variable $(TOUCH) is initialized with the "touch" value in mkenv.mk like for the other command line tools (rm, echo, cp, mkdir etc). With this, for example, Windows users can specify the path of touch.exe.
Diffstat (limited to 'py')
-rw-r--r--py/mkenv.mk1
-rw-r--r--py/mkrules.mk4
2 files changed, 3 insertions, 2 deletions
diff --git a/py/mkenv.mk b/py/mkenv.mk
index 04e7acc1b..46eedf988 100644
--- a/py/mkenv.mk
+++ b/py/mkenv.mk
@@ -43,6 +43,7 @@ CP = cp
MKDIR = mkdir
SED = sed
CAT = cat
+TOUCH = touch
PYTHON = python3
AS = $(CROSS_COMPILE)as
diff --git a/py/mkrules.mk b/py/mkrules.mk
index caa9527c7..3f310c195 100644
--- a/py/mkrules.mk
+++ b/py/mkrules.mk
@@ -77,7 +77,7 @@ $(HEADER_BUILD)/qstr.i.last: $(SRC_QSTR) $(QSTR_GLOBAL_DEPENDENCIES) | $(HEADER_
$(HEADER_BUILD)/qstr.split: $(HEADER_BUILD)/qstr.i.last
$(ECHO) "GEN $@"
$(Q)$(PYTHON) $(PY_SRC)/makeqstrdefs.py split $(HEADER_BUILD)/qstr.i.last $(HEADER_BUILD)/qstr $(QSTR_DEFS_COLLECTED)
- $(Q)touch $@
+ $(Q)$(TOUCH) $@
$(QSTR_DEFS_COLLECTED): $(HEADER_BUILD)/qstr.split
$(ECHO) "GEN $@"
@@ -190,7 +190,7 @@ print-cfg:
print-def:
@$(ECHO) "The following defines are built into the $(CC) compiler"
- touch __empty__.c
+ $(TOUCH) __empty__.c
@$(CC) -E -Wp,-dM __empty__.c
@$(RM) -f __empty__.c