From 02b4b23319a84d5b96b9394d8c379ef0549fd208 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 31 Oct 2017 22:01:56 +1100 Subject: [PATCH] Revert "py/{mkenv.mk,mkrules.mk}: Append .exe for Windows executable files." This reverts commit 3289b9b7a76a1230b6bb631e191a47bfc6c7a8ee. 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. --- py/mkenv.mk | 6 ------ py/mkrules.mk | 8 ++++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/py/mkenv.mk b/py/mkenv.mk index 8b637e9ac6..b167b2533d 100644 --- a/py/mkenv.mk +++ b/py/mkenv.mk @@ -59,13 +59,7 @@ LD += -m32 endif MAKE_FROZEN = $(TOP)/tools/make-frozen.py -# allow mpy-cross (for WSL) and mpy-cross.exe (for cygwin) to coexist -ifeq ($(OS),Windows_NT) -MPY_CROSS = $(TOP)/mpy-cross/mpy-cross.exe -PROG_EXT = .exe -else MPY_CROSS = $(TOP)/mpy-cross/mpy-cross -endif MPY_TOOL = $(TOP)/tools/mpy-tool.py all: diff --git a/py/mkrules.mk b/py/mkrules.mk index fd579557f3..13545eb6f0 100644 --- a/py/mkrules.mk +++ b/py/mkrules.mk @@ -111,7 +111,7 @@ FROZEN_MPY_PY_FILES := $(shell find -L $(FROZEN_MPY_DIR) -type f -name '*.py' | FROZEN_MPY_MPY_FILES := $(addprefix $(BUILD)/frozen_mpy/,$(FROZEN_MPY_PY_FILES:.py=.mpy)) # to build .mpy files from .py files -$(BUILD)/frozen_mpy/%.mpy: $(FROZEN_MPY_DIR)/%.py $(MPY_CROSS) +$(BUILD)/frozen_mpy/%.mpy: $(FROZEN_MPY_DIR)/%.py $(TOP)/mpy-cross/mpy-cross @$(ECHO) "MPY $<" $(Q)$(MKDIR) -p $(dir $@) $(Q)$(MPY_CROSS) -o $@ -s $(<:$(FROZEN_MPY_DIR)/%=%) $(MPY_CROSS_FLAGS) $< @@ -133,13 +133,13 @@ $(PROG): $(OBJ) # we may want to compile using Thumb, but link with non-Thumb libc. $(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS) ifndef DEBUG - $(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG)$(PROG_EXT) + $(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG) endif - $(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $(PROG)$(PROG_EXT) + $(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $(PROG) clean: clean-prog clean-prog: - $(RM) -f $(PROG)$(PROG_EXT) + $(RM) -f $(PROG) $(RM) -f $(PROG).map .PHONY: clean-prog