Thread (8 messages) 8 messages, 5 authors, 2016-06-15

Re: Compiling git with makepp patch

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:49:22

Thomas Rast [off-list ref] writes:
Daniel Pfeiffer wrote:
quoted
[Attachment: git-makepp.patch]
Please read Documentation/SubmittingPatches for next time.
quoted
There are however two things which I can hardly hope to fix:
[...]
quoted
PERL_PATH_SQ  = $(subst ','\'',$(PERL_PATH))#'

[...] makepp parses this line just like Emacs, so it doesn't find
the comment, adding in the #' at the point of use, which completely
screws the sed command.
[...]
quoted
 # Shell quote;
-bindir_SQ = $(subst ','\'',$(bindir))#'
-gitwebdir_SQ = $(subst ','\'',$(gitwebdir))#'
-gitwebstaticdir_SQ = $(subst ','\'',$(gitwebdir)/static)#'
-SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))#'
-PERL_PATH_SQ  = $(subst ','\'',$(PERL_PATH))#'
-DESTDIR_SQ    = $(subst ','\'',$(DESTDIR))#'
+Q='
+# ' This comment is only to appease IDEs like Emacs.
+# The comment is on a new line, else makepp would see it as a quoted hash.
+bindir_SQ = $(subst $Q,'\'',$(bindir))
+gitwebdir_SQ = $(subst $Q,'\'',$(gitwebdir))
+gitwebstaticdir_SQ = $(subst $Q,'\'',$(gitwebdir)/static)
+SHELL_PATH_SQ = $(subst $Q,'\'',$(SHELL_PATH))
+PERL_PATH_SQ  = $(subst $Q,'\'',$(PERL_PATH))
+DESTDIR_SQ    = $(subst $Q,'\'',$(DESTDIR))
Confusingly, you talk about comments above, but the real issue is that
your makepp apparently gives the ' special meaning.  For once "info
make" and "man 1p make" on my system agree on the semantics of ': none
at all.  From the latter:

  Early proposals stated that an "unquoted" number sign  was  treated  as  the
  start of a comment. The make utility does not pay any attention to quotes. A
  number sign starts a comment regardless of its surroundings.

So can you quote chapter and verse to show that there is anything to
fix?
Nevertheless using

  Q='
  SQ='\''
  bindir_SQ = $(subst $Q,$(SQ),$(bindir))

could make substitution more clear ('make' behavior nothwithstanding).

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help