From: Jeff King Date: Mon, 01 Aug 2016 21:59:05 GMT Subject: Re: [PATCH 0/1 v2] add PAGER_ENV to build Message-ID: <20160801215904.5oym63j3ewqyqugx@sigill.intra.peff.net> In-Reply-To: <20160801214937.4752-1-e@80x24.org> On Mon, Aug 01, 2016 at 09:49:36PM +0000, Eric Wong wrote: > Changes from v1: > > * dropped stringify macro in favor for quoting in Makefile > (diff below) > I'm not sure I like this change, and might be inclined to > go in the opposite direction of using the stringify macro > more widely to simplify the Makefile; but that is a separate > topic. I think that's a dangerous direction. Try this: -- >8 -- cat >foo.c <<\EOF #include #define stringify_(x) #x #define stringify(x) stringify_(x) int main(void) { printf("%s", stringify(FOO)); return 0; } EOF while read -r input; do gcc -Wall -Werror -DFOO="$input" foo.c ./a.out done -- 8< -- and then try input like: this has a lot of spaces this has a \backslash You should see: this has a lot of spaces this has aackslash I'll grant that backslashes and runs of whitespace are not things we'd expect to find in most of our build-time config, but it still seems like a bad direction to go (and actually, I wouldn't be surprised if backslashes do end up in some of our build-time variables on Windows). -Peff