Skip to content

Commit 4a45761

Browse files
authored
Merge pull request #3195 from theotherjimmy/quote-shell-make
[Exporters - Make-based] Quote the shell call in mkdir and rmdir
2 parents f044786 + 688d55b commit 4a45761

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/export/makefile/Makefile.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ ifeq ($(shell echo $$OS),$$OS)
99
MAKEDIR = if not exist "$(1)" mkdir "$(1)"
1010
RM = rmdir /S /Q "$(1)"
1111
else
12-
MAKEDIR = $(SHELL) -c "mkdir -p \"$(1)\""
13-
RM = $(SHELL) -c "rm -rf \"$(1)\""
12+
MAKEDIR = '$(SHELL)' -c "mkdir -p \"$(1)\""
13+
RM = '$(SHELL)' -c "rm -rf \"$(1)\""
1414
endif
1515

1616
# Move to the build directory
1717
ifeq (,$(filter .build,$(notdir $(CURDIR))))
1818
.SUFFIXES:
1919
OBJDIR := .build
2020
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
21-
MAKETARGET = $(MAKE) --no-print-directory -C $(OBJDIR) -f $(mkfile_path) \
22-
SRCDIR=$(CURDIR) $(MAKECMDGOALS)
21+
MAKETARGET = '$(MAKE)' --no-print-directory -C $(OBJDIR) -f '$(mkfile_path)' \
22+
'SRCDIR=$(CURDIR)' $(MAKECMDGOALS)
2323
.PHONY: $(OBJDIR) clean
2424
all:
2525
+@$(call MAKEDIR,$(OBJDIR))

0 commit comments

Comments
 (0)