Skip to content

Commit

Permalink
Fix for #3200
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Apr 4, 2022
1 parent be55b29 commit 6f02af6
Show file tree
Hide file tree
Showing 4 changed files with 360 additions and 1,202 deletions.
11 changes: 7 additions & 4 deletions tools/Makefile.cpp
Expand Up @@ -13,7 +13,7 @@ endif
# Unix specific part.
ifeq ($(SYSTEM),unix)
OS := $(shell uname -s)
OS := $(shell uname -s)
S := /
ifeq ($(OS),Linux)
endif # ifeq($(OS),Linux)
Expand All @@ -34,9 +34,9 @@ all: detect
.PHONY: detect
detect:
@echo VERSION = $(VERSION)
@echo SHELL = $(SHELL)
@echo SYSTEM = $(SYSTEM)
@echo OS = $(OS)
@echo SHELL = $(SHELL)
@echo SOURCE = $(SOURCE)
@echo SOURCE_PATH = $(SOURCE_PATH)
@echo SOURCE_NAME = $(SOURCE_NAME)
Expand All @@ -59,10 +59,13 @@ SOURCE_SUFFIX := $(suffix $(SOURCE))
SOURCE_PATH := $(subst /,$S,$(SOURCE))
SOURCE_NAME := $(basename $(notdir $(SOURCE)))
ifeq ($(SOURCE),) # Those rules will be used if SOURCE is empty
build run:
$(error no source file provided, the "$@" target must be used like so: \
make $@ SOURCE=relative/path/to/filename.extension)
else #ifeq SOURCE
ifeq (,$(wildcard $(SOURCE)))
$(error File "$(SOURCE)" does not exist !)
endif #ifeq SOURCE exist
Expand All @@ -77,7 +80,6 @@ build: $(SOURCE) examples/$(SOURCE_NAME)/CMakeLists.txt
--build build \
--config $(BUILD_TYPE) \
-v
run: build
ifeq ($(SYSTEM),win)
cd examples$S$(SOURCE_NAME) && \
Expand All @@ -89,7 +91,8 @@ else #ifeq win
cmake \
--build build --config $(BUILD_TYPE) \
--target test -v
endif #ifeq Swin
endif #ifeq win
endif #ifeq SOURCE
#############
Expand Down

0 comments on commit 6f02af6

Please sign in to comment.