8000 py: Update makefiles to use $(CAT) variable instead of hard coded "cat". · devmonkZA/micropython@c03f81c · GitHub
[go: up one dir, main page]

Skip to content

Commit c03f81c

Browse files
Sébastien Rinsozdpgeorge
Sébastien Rinsoz
authored andcommitted
py: Update makefiles to use $(CAT) variable instead of hard coded "cat".
The variable $(CAT) is initialised with the "cat" 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 cat.exe.
1 parent fb54736 commit c03f81c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

py/mkenv.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ ECHO = @echo
4242
CP = cp
4343
MKDIR = mkdir
4444
SED = sed
45+
CAT = cat
4546
PYTHON = python3
4647

4748
AS = $(CROSS_COMPILE)as

py/py.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ MPCONFIGPORT_MK = $(wildcard mpconfigport.mk)
338338
# the lines in "" and then unwrap after the preprocessor is finished.
339339
$(HEADER_BUILD)/qstrdefs.generated.h: $(PY_QSTR_DEFS) $(QSTR_DEFS) $(QSTR_DEFS_COLLECTED) $(PY_SRC)/makeqstrdata.py mpconfigport.h $(MPCONFIGPORT_MK) $(PY_SRC)/mpconfig.h | $(HEADER_BUILD)
340340
$(ECHO) "GEN $@"
341-
$(Q)cat $(PY_QSTR_DEFS) $(QSTR_DEFS) $(QSTR_DEFS_COLLECTED) | $(SED) 's/^Q(.*)/"&"/' | $(CPP) $(CFLAGS) - | $(SED) 's/^"\(Q(.*)\)"/\1/' > $(HEADER_BUILD)/qstrdefs.preprocessed.h
341+
$(Q)$(CAT) $(PY_QSTR_DEFS) $(QSTR_DEFS) $(QSTR_DEFS_COLLECTED) | $(SED) 's/^Q(.*)/"&"/' | $(CPP) $(CFLAGS) - | $(SED) 's/^\"\(Q(.*)\)\"/\1/' > $(HEADER_BUILD)/qstrdefs.preprocessed.h
342342
$(Q)$(PYTHON) $(PY_SRC)/makeqstrdata.py $(HEADER_BUILD)/qstrdefs.preprocessed.h > $@
343343

344344
# build a list of registered modules for py/objmodule.c.

0 commit comments

Comments
 (0)
0