Hi Greg, > Please describe the inconsistencies that you found, so that I can > understand the problem better. For example: toplevel make/gcc.mak: CC65DATA = $(libdir)/cc65 CC65INC = $(CC65DATA)/include cc65/make/gcc.mak: CC65_INC = \"/usr/lib/cc65/include/\" Each of these lines has a reason for being like it is, but all in all it looks like different strategies in the same project. > I still am not 100% sure about > how quotation marks are passed through sub-makes, and then, given to > commands. I made a small demo for that. In addition to how the quotes are given to echo please also note how make functions like $(dir) work when there are quotes and when there aren't. That's why I prefer not to use quotes inside path variables. Only add them when needed in a command line, e.g. behind -D for string macros. ======================== $ cat Makefile WITH_QUOTES=\"foo/bar\" WITHOUT_QUOTES=foo/bar NO_ESCAPE="foo/bar" ..PHONY: all all: echo $(MAKEFILE_LIST): echo "WITH_QUOTES: >$(WITH_QUOTES)<" echo "WITHOUT_QUOTES: >$(WITHOUT_QUOTES)<" echo "NO_ESCAPE: >$(NO_ESCAPE)<" echo "dir WITH_QUOTES: >$(dir $(WITH_QUOTES))<" echo "dir WITHOUT_QUOTES: >$(dir $(WITHOUT_QUOTES))<" -echo "dir NO_ESCAPE: >$(dir $(NO_ESCAPE))<" # <= fails! echo $(MAKE) -f Makefile.sub WITH_QUOTES=$(WITH_QUOTES) WITHOUT_QUOTES=$(WITHOUT_QUOTES) NO_ESCAPE=$(NO_ESCAPE) ======================== $ cat Makefile.sub WITH_QUOTES=\"default" WITHOUT_QUOTES=default NO_ESCAPE="default" ..PHONY: all all: echo $(MAKEFILE_LIST): echo "WITH_QUOTES: >$(WITH_QUOTES)<" echo "WITHOUT_QUOTES: >$(WITHOUT_QUOTES)<" echo "NO_ESCAPE: >$(NO_ESCAPE)<" ======================== $ make -s Makefile: WITH_QUOTES: >"foo/bar"< WITHOUT_QUOTES: >foo/bar< NO_ESCAPE: >foo/bar< dir WITH_QUOTES: >"foo/< dir WITHOUT_QUOTES: >foo/< /bin/sh: -c: line 0: unexpected EOF while looking for matching `"' /bin/sh: -c: line 1: syntax error: unexpected end of file Makefile.sub: WITH_QUOTES: >foo/bar< WITHOUT_QUOTES: >foo/bar< NO_ESCAPE: >foo/bar< Regards, Thomas ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Mon Sep 28 20:38:09 2009
This archive was generated by hypermail 2.1.8 : 2009-09-28 20:38:11 CEST