Skip to content

Commit 02b4b23

Browse files
committed
Revert "py/{mkenv.mk,mkrules.mk}: Append .exe for Windows executable files."
This reverts commit 3289b9b. The commit broke building on MINGW because the filename became micropython.exe.exe. A proper solution to support more Windows build environments requires more thought and testing.
1 parent b81fbf9 commit 02b4b23

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

py/mkenv.mk

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,7 @@ LD += -m32
5959
endif
6060

6161
MAKE_FROZEN = $(TOP)/tools/make-frozen.py
62-
# allow mpy-cross (for WSL) and mpy-cross.exe (for cygwin) to coexist
63-
ifeq ($(OS),Windows_NT)
64-
MPY_CROSS = $(TOP)/mpy-cross/mpy-cross.exe
65-
PROG_EXT = .exe
66-
else
6762
MPY_CROSS = $(TOP)/mpy-cross/mpy-cross
68-
endif
6963
MPY_TOOL = $(TOP)/tools/mpy-tool.py
7064

7165
all:

py/mkrules.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ FROZEN_MPY_PY_FILES := $(shell find -L $(FROZEN_MPY_DIR) -type f -name '*.py' |
111111
FROZEN_MPY_MPY_FILES := $(addprefix $(BUILD)/frozen_mpy/,$(FROZEN_MPY_PY_FILES:.py=.mpy))
112112

113113
# to build .mpy files from .py files
114-
$(BUILD)/frozen_mpy/%.mpy: $(FROZEN_MPY_DIR)/%.py $(MPY_CROSS)
114+
$(BUILD)/frozen_mpy/%.mpy: $(FROZEN_MPY_DIR)/%.py $(TOP)/mpy-cross/mpy-cross
115115
@$(ECHO) "MPY $<"
116116
$(Q)$(MKDIR) -p $(dir $@)
117117
$(Q)$(MPY_CROSS) -o $@ -s $(<:$(FROZEN_MPY_DIR)/%=%) $(MPY_CROSS_FLAGS) $<
@@ -133,13 +133,13 @@ $(PROG): $(OBJ)
133133
# we may want to compile using Thumb, but link with non-Thumb libc.
134134
$(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS)
135135
ifndef DEBUG
136-
$(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG)$(PROG_EXT)
136+
$(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG)
137137
endif
138-
$(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $(PROG)$(PROG_EXT)
138+
$(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $(PROG)
139139

140140
clean: clean-prog
141141
clean-prog:
142-
$(RM) -f $(PROG)$(PROG_EXT)
142+
$(RM) -f $(PROG)
143143
$(RM) -f $(PROG).map
144144

145145
.PHONY: clean-prog

0 commit comments

Comments
 (0)