Skip to content

Commit 22aaaac

Browse files
committed
make: Consistently use " to quote strings
> You should never quote anything because of make. Make doesn't > understand or parse single- or double-quote characters in any > way. Every quoting character you write in a makefile will be > kept as a literal quote and passed along as-is to the commands > that make invokes. -- MadScientist (https://stackoverflow.com/questions/23330243) With that in mind, let's have a look at what the most "complex" strings are in our Makefile: s-expressions that contain both quoted symbols and strings. I.e., we have to use " for quoting the string for the shell. So let's just do that for all strings. That way, we will do it right, even if we forget that make doesn't deal with single- and double-quote characters itself; provided of course we continue to try to be consistent.
1 parent a9c579d commit 22aaaac

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Makefile

+11-11
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ CHANNEL_CONFIG := "(progn\
5353
endif
5454

5555
# You probably don't want to change this.
56-
LOCATION_CONFIG ?= '(progn\
57-
(setq package-build--melpa-base "$(TOP)/")\
58-
(setq package-build-working-dir "$(TOP)/$(WORKDIR)/")\
59-
(setq package-build-archive-dir "$(TOP)/$(PKGDIR)/")\
60-
(setq package-build-recipes-dir "$(TOP)/$(RCPDIR)/"))'
56+
LOCATION_CONFIG ?= "(progn\
57+
(setq package-build--melpa-base \"$(TOP)/\")\
58+
(setq package-build-working-dir \"$(TOP)/$(WORKDIR)/\")\
59+
(setq package-build-archive-dir \"$(TOP)/$(PKGDIR)/\")\
60+
(setq package-build-recipes-dir \"$(TOP)/$(RCPDIR)/\"))"
6161

6262
LOAD_PATH ?= $(TOP)/package-build
6363

@@ -94,12 +94,12 @@ $(RCPDIR)/%: .FORCE
9494
## Metadata
9595

9696
archive-contents: .FORCE
97-
@$(EVAL) '(package-build-dump-archive-contents)'
97+
@$(EVAL) "(package-build-dump-archive-contents)"
9898

9999
json: .FORCE
100100
@echo " • Building json indexes ..."
101-
@$(EVAL) '(package-build-archive-alist-as-json "$(HTMLDIR)/archive.json")'
102-
@$(EVAL) '(package-build-recipe-alist-as-json "$(HTMLDIR)/recipes.json")'
101+
@$(EVAL) "(package-build-archive-alist-as-json \"$(HTMLDIR)/archive.json\")"
102+
@$(EVAL) "(package-build-recipe-alist-as-json \"$(HTMLDIR)/recipes.json\")"
103103

104104
html: json
105105
@echo " • Building html index ..."
@@ -125,9 +125,9 @@ clean-json:
125125

126126
clean-sandbox:
127127
@echo " • Removing sandbox files ..."
128-
@if [ -d '$(SANDBOX)' ]; then \
129-
rm -rfv '$(SANDBOX)/elpa'; \
130-
rmdir '$(SANDBOX)'; \
128+
@if [ -d "$(SANDBOX)" ]; then \
129+
rm -rfv "$(SANDBOX)/elpa"; \
130+
rmdir "$(SANDBOX)"; \
131131
fi
132132

133133
clean: .FORCE

0 commit comments

Comments
 (0)