diff options
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 37 |
1 files changed, 20 insertions, 17 deletions
| @@ -63,25 +63,25 @@ ANDROID_ROOT_VAR := $(shell echo $$ANDROID_ROOT) | |||
| 63 | PREFIX_VAR := $(shell echo $$PREFIX) | 63 | PREFIX_VAR := $(shell echo $$PREFIX) |
| 64 | ifneq ($(ANDROID_ROOT_VAR),) | 64 | ifneq ($(ANDROID_ROOT_VAR),) |
| 65 | # Check if PREFIX environment variable points to Termux directory | 65 | # Check if PREFIX environment variable points to Termux directory |
| 66 | ifneq ($(PREFIX_VAR),) | 66 | ifneq ($(PREFIX_VAR),) |
| 67 | ifneq ($(findstring com.termux,$(PREFIX_VAR)),) | 67 | ifneq ($(findstring com.termux,$(PREFIX_VAR)),) |
| 68 | IS_TERMUX := true | 68 | IS_TERMUX := true |
| 69 | endif | 69 | endif |
| 70 | endif | 70 | endif |
| 71 | # Alternative check: verify if Termux installation path exists | 71 | # Alternative check: verify if Termux installation path exists |
| 72 | ifeq ($(IS_TERMUX),false) | 72 | ifeq ($(IS_TERMUX),false) |
| 73 | ifneq ($(shell test -d /data/data/com.termux/files/usr && echo yes),) | 73 | ifneq ($(shell test -d /data/data/com.termux/files/usr && echo yes),) |
| 74 | IS_TERMUX := true | 74 | IS_TERMUX := true |
| 75 | endif | 75 | endif |
| 76 | endif | 76 | endif |
| 77 | endif | 77 | endif |
| 78 | 78 | ||
| 79 | # Auto-set NO_WATCHER for Termux environment if not explicitly set | 79 | # Auto-set NO_WATCHER for Termux environment if not explicitly set |
| 80 | ifeq ($(IS_TERMUX),true) | 80 | ifeq ($(IS_TERMUX),true) |
| 81 | ifeq ($(NO_WATCHER),) | 81 | ifeq ($(NO_WATCHER),) |
| 82 | NO_WATCHER := true | 82 | NO_WATCHER := true |
| 83 | $(info Detected Android Termux environment, automatically setting NO_WATCHER=true) | 83 | $(info Detected Android Termux environment, automatically setting NO_WATCHER=true) |
| 84 | endif | 84 | endif |
| 85 | endif | 85 | endif |
| 86 | 86 | ||
| 87 | ifeq ($(NO_WATCHER),true) | 87 | ifeq ($(NO_WATCHER),true) |
| @@ -192,9 +192,9 @@ ifeq ($(UNAME_S),Darwin) | |||
| 192 | $(RM) $(TIME_FILE) ; \ | 192 | $(RM) $(TIME_FILE) ; \ |
| 193 | st=$$((`$(CUR_TIME)` - $$st)) ; \ | 193 | st=$$((`$(CUR_TIME)` - $$st)) ; \ |
| 194 | echo $$st | 194 | echo $$st |
| 195 | ifneq ($(NO_WATCHER),true) | 195 | ifneq ($(NO_WATCHER),true) |
| 196 | SOURCES += $(SRC_PATH)/3rdParty/efsw/FileWatcherFSEvents.cpp $(SRC_PATH)/3rdParty/efsw/FileWatcherKqueue.cpp $(SRC_PATH)/3rdParty/efsw/WatcherFSEvents.cpp $(SRC_PATH)/3rdParty/efsw/WatcherKqueue.cpp | 196 | SOURCES += $(SRC_PATH)/3rdParty/efsw/FileWatcherFSEvents.cpp $(SRC_PATH)/3rdParty/efsw/FileWatcherKqueue.cpp $(SRC_PATH)/3rdParty/efsw/WatcherFSEvents.cpp $(SRC_PATH)/3rdParty/efsw/WatcherKqueue.cpp |
| 197 | endif | 197 | endif |
| 198 | else | 198 | else |
| 199 | TIME_FILE = $(dir $@).$(notdir $@)_time | 199 | TIME_FILE = $(dir $@).$(notdir $@)_time |
| 200 | START_TIME = date '+%s' > $(TIME_FILE) | 200 | START_TIME = date '+%s' > $(TIME_FILE) |
| @@ -202,9 +202,9 @@ else | |||
| 202 | $(RM) $(TIME_FILE) ; \ | 202 | $(RM) $(TIME_FILE) ; \ |
| 203 | st=$$((`date '+%s'` - $$st - 86400)) ; \ | 203 | st=$$((`date '+%s'` - $$st - 86400)) ; \ |
| 204 | echo `date -u -d @$$st '+%H:%M:%S'` | 204 | echo `date -u -d @$$st '+%H:%M:%S'` |
| 205 | ifneq ($(NO_WATCHER),true) | 205 | ifneq ($(NO_WATCHER),true) |
| 206 | SOURCES += $(SRC_PATH)/3rdParty/efsw/FileWatcherFSEvents.cpp $(SRC_PATH)/3rdParty/efsw/FileWatcherKqueue.cpp $(SRC_PATH)/3rdParty/efsw/WatcherFSEvents.cpp $(SRC_PATH)/3rdParty/efsw/WatcherKqueue.cpp $(SRC_PATH)/3rdParty/efsw/FileWatcherInotify.cpp $(SRC_PATH)/3rdParty/efsw/WatcherInotify.cpp | 206 | SOURCES += $(SRC_PATH)/3rdParty/efsw/FileWatcherFSEvents.cpp $(SRC_PATH)/3rdParty/efsw/FileWatcherKqueue.cpp $(SRC_PATH)/3rdParty/efsw/WatcherFSEvents.cpp $(SRC_PATH)/3rdParty/efsw/WatcherKqueue.cpp $(SRC_PATH)/3rdParty/efsw/FileWatcherInotify.cpp $(SRC_PATH)/3rdParty/efsw/WatcherInotify.cpp |
| 207 | endif | 207 | endif |
| 208 | endif | 208 | endif |
| 209 | 209 | ||
| 210 | # Version macros | 210 | # Version macros |
| @@ -437,6 +437,7 @@ test: debug | |||
| 437 | @./$(BIN_NAME) $(TEST_INPUT)/attrib.yue -o $(TEST_OUTPUT)/5.1/attrib.lua --target 5.1 | 437 | @./$(BIN_NAME) $(TEST_INPUT)/attrib.yue -o $(TEST_OUTPUT)/5.1/attrib.lua --target 5.1 |
| 438 | @./$(BIN_NAME) $(TEST_INPUT)/import_global.yue -o $(TEST_OUTPUT)/5.1/import_global.lua --target 5.1 | 438 | @./$(BIN_NAME) $(TEST_INPUT)/import_global.yue -o $(TEST_OUTPUT)/5.1/import_global.lua --target 5.1 |
| 439 | @./$(BIN_NAME) $(TEST_INPUT)/test/loops_spec.yue -o $(TEST_OUTPUT)/5.1/test/loops_spec.lua --target 5.1 | 439 | @./$(BIN_NAME) $(TEST_INPUT)/test/loops_spec.yue -o $(TEST_OUTPUT)/5.1/test/loops_spec.lua --target 5.1 |
| 440 | @./$(BIN_NAME) $(TEST_INPUT)/test/try_catch_spec.yue -o $(TEST_OUTPUT)/5.1/test/try_catch_spec.lua --target 5.1 | ||
| 440 | @./$(BIN_NAME) -e spec/inputs/compile_doc.yue $(TEST_OUTPUT) | 441 | @./$(BIN_NAME) -e spec/inputs/compile_doc.yue $(TEST_OUTPUT) |
| 441 | @echo -en "Compile time: " | 442 | @echo -en "Compile time: " |
| 442 | @$(END_TIME) | 443 | @$(END_TIME) |
| @@ -457,6 +458,7 @@ gen: release | |||
| 457 | @./$(BIN_NAME) $(TEST_INPUT)/attrib.yue -o $(GEN_OUTPUT)/5.1/attrib.lua --target 5.1 | 458 | @./$(BIN_NAME) $(TEST_INPUT)/attrib.yue -o $(GEN_OUTPUT)/5.1/attrib.lua --target 5.1 |
| 458 | @./$(BIN_NAME) $(TEST_INPUT)/import_global.yue -o $(GEN_OUTPUT)/5.1/import_global.lua --target 5.1 | 459 | @./$(BIN_NAME) $(TEST_INPUT)/import_global.yue -o $(GEN_OUTPUT)/5.1/import_global.lua --target 5.1 |
| 459 | @./$(BIN_NAME) $(TEST_INPUT)/test/loops_spec.yue -o $(GEN_OUTPUT)/5.1/test/loops_spec.lua --target 5.1 | 460 | @./$(BIN_NAME) $(TEST_INPUT)/test/loops_spec.yue -o $(GEN_OUTPUT)/5.1/test/loops_spec.lua --target 5.1 |
| 461 | @./$(BIN_NAME) $(TEST_INPUT)/test/try_catch_spec.yue -o $(GEN_OUTPUT)/5.1/test/try_catch_spec.lua --target 5.1 | ||
| 460 | @./$(BIN_NAME) -e spec/inputs/compile_doc.yue $(GEN_OUTPUT) | 462 | @./$(BIN_NAME) -e spec/inputs/compile_doc.yue $(GEN_OUTPUT) |
| 461 | @echo -en "Compile time: " | 463 | @echo -en "Compile time: " |
| 462 | @$(END_TIME) | 464 | @$(END_TIME) |
| @@ -495,3 +497,4 @@ $(BUILD_PATH)/%.o: $(SRC_PATH)/%.c | |||
| 495 | $(CMD_PREFIX)$(CC) $(CFLAGS) $(INCLUDES) -MP -MMD -c $< -o $@ | 497 | $(CMD_PREFIX)$(CC) $(CFLAGS) $(INCLUDES) -MP -MMD -c $< -o $@ |
| 496 | @echo -en "\t Compile time: " | 498 | @echo -en "\t Compile time: " |
| 497 | @$(END_TIME) | 499 | @$(END_TIME) |
| 500 | |||
