Submitter | via Mercurial-devel |
---|---|
Date | Oct. 11, 2017, 8:46 p.m. |
Message ID | <0dc5f9e9fd59f0c2289c.1507754779@cuben> |
Download | mbox | patch |
Permalink | /patch/24758/ |
State | Accepted |
Headers | show |
Comments
On Wed, 11 Oct 2017 22:46:19 +0200, a.mux--- via Mercurial-devel wrote: > # HG changeset patch > # User muxator <a.mux@inwind.it> > # Date 1507680372 -7200 > # Wed Oct 11 02:06:12 2017 +0200 > # Node ID 0dc5f9e9fd59f0c2289ca3133a0e54d49b7882d7 > # Parent fc144c0ec36089c4b60bb3287adc787a1cfcae78 > build: chg build was failing when the base directory contained spaces > .PHONY: serve > serve: > - [ -d $(CHGSOCKDIR) ] || ( umask 077; mkdir $(CHGSOCKDIR) ) > - $(HG) serve --cwd / --cmdserver chgunix \ > + [ -d "$(CHGSOCKDIR)" ] || ( umask 077; mkdir "$(CHGSOCKDIR)" ) > + "$(HG)" serve --cwd / --cmdserver chgunix \ > --address $(CHGSOCKNAME) \ > --config cmdserver.log=/dev/stderr Nit: tool paths are generally unquoted so we can do something like "make serve HG='python3 /path/to/hg'". Since this rule isn't useful these days, I'll send a patch to remove it.
Patch
diff --git a/contrib/chg/Makefile b/contrib/chg/Makefile --- a/contrib/chg/Makefile +++ b/contrib/chg/Makefile @@ -31,15 +31,15 @@ .PHONY: install install: $(TARGET) - install -d $(DESTDIR)$(PREFIX)/bin - install -m 755 $(TARGET) $(DESTDIR)$(PREFIX)/bin - install -d $(DESTDIR)$(MANDIR) - install -m 644 chg.1 $(DESTDIR)$(MANDIR) + install -d "$(DESTDIR)$(PREFIX)"/bin + install -m 755 "$(TARGET)" "$(DESTDIR)$(PREFIX)"/bin + install -d "$(DESTDIR)$(MANDIR)" + install -m 644 chg.1 "$(DESTDIR)$(MANDIR)" .PHONY: serve serve: - [ -d $(CHGSOCKDIR) ] || ( umask 077; mkdir $(CHGSOCKDIR) ) - $(HG) serve --cwd / --cmdserver chgunix \ + [ -d "$(CHGSOCKDIR)" ] || ( umask 077; mkdir "$(CHGSOCKDIR)" ) + "$(HG)" serve --cwd / --cmdserver chgunix \ --address $(CHGSOCKNAME) \ --config cmdserver.log=/dev/stderr