From 544fcaf0387c7242c566d26c8087cb9fe026f07b Mon Sep 17 00:00:00 2001 From: someone2639 Date: Fri, 22 Sep 2023 13:06:39 -0400 Subject: [PATCH] remove dependency on script exec permissions (#683) * make fixlights.py and make_version.sh independent of exec perms * add mips64-elf-ld warning --------- Co-authored-by: someone2639 --- Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1c6b5390..11dcbb70 100644 --- a/Makefile +++ b/Makefile @@ -450,6 +450,13 @@ AR := $(CROSS)ar OBJDUMP := $(CROSS)objdump OBJCOPY := $(CROSS)objcopy +ifeq ($(LD), tools/mips64-elf-ld) + ifeq ($(shell ls -la tools/mips64-elf-ld | awk '{print $1}' | grep x),) + $(warning [ERROR]: A required file in this repository is no longer executable.) + $(error * Please run: 'chmod +x tools/mips64-elf-ld', then run `make` again) + endif +endif + ifeq ($(TARGET_N64),1) TARGET_CFLAGS := -nostdinc -DTARGET_N64 -D_LANGUAGE_C CC_CFLAGS := -fno-builtin @@ -810,7 +817,7 @@ $(BUILD_DIR)/include/level_headers.h: levels/level_headers.h.in # Generate version_data.h $(BUILD_DIR)/src/game/version_data.h: tools/make_version.sh @$(PRINT) "$(GREEN)Generating: $(BLUE)$@ $(NO_COL)\n" - $(V)tools/make_version.sh $(CROSS) > $@ + $(V)sh tools/make_version.sh $(CROSS) > $@ #==============================================================================# # Compilation Recipes # @@ -819,8 +826,8 @@ $(BUILD_DIR)/src/game/version_data.h: tools/make_version.sh # Compile C code ifeq ($(FIXLIGHTS),1) # This must not be run multiple times at once, so we run it ahead of time rather than in a rule -DUMMY != $(FIXLIGHTS_PY) actors -DUMMY != $(FIXLIGHTS_PY) levels +DUMMY != $(PYTHON) $(FIXLIGHTS_PY) actors +DUMMY != $(PYTHON) $(FIXLIGHTS_PY) levels endif $(BUILD_DIR)/%.o: %.c $(call print,Compiling:,$<,$@)