From f567b582ca26bd27869a451b8620411844a66479 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 19 Dec 2022 13:01:13 +0200 Subject: Disable line continuation in buildspec, command line variable overrides Line continuations would make directory paths on Windows unusable, for example: b C:\myproj\ --- libbuild2/context.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libbuild2/context.cxx') diff --git a/libbuild2/context.cxx b/libbuild2/context.cxx index 08c4e7e..ccfa7f3 100644 --- a/libbuild2/context.cxx +++ b/libbuild2/context.cxx @@ -379,12 +379,13 @@ namespace build2 is.exceptions (istringstream::failbit | istringstream::badbit); // Similar to buildspec we do "effective escaping" of the special - // `'"\$(` characters, line continuations, plus `)` for symmetry - // (basically what's escapable inside a double-quoted literal plus the - // single quote). + // `'"\$(` characters plus `)` for symmetry (basically what's escapable + // inside a double-quoted literal plus the single quote; note, however, + // that we exclude line continuations since they would make directory + // paths on Windows unusable). // path_name in (""); - lexer l (is, in, 1 /* line */, "\'\"\\$()\n"); + lexer l (is, in, 1 /* line */, "\'\"\\$()"); // At the buildfile level the scope-specific variable should be // separated from the directory with a whitespace, for example: -- cgit v1.1