Back out part of rev 1.24. The intention the quoting backfires and bad
authorJoerg Sonnenberger <joerg@dragonflybsd.org>
Fri, 14 Jan 2005 11:30:16 +0000 (11:30 +0000)
committerJoerg Sonnenberger <joerg@dragonflybsd.org>
Fri, 14 Jan 2005 11:30:16 +0000 (11:30 +0000)
quoting is generated. Running 'make all-depends-list' in x11-fonts/libXft
does something like this:
PARENT_CHECKED=/usr/ports/x11-fonts/fontconfig /usr/ports/devel/pkgconfig
/usr/ports/print/freetype2 /usr/ports/devel/gmake /usr/ports/converters/libiconv
/usr/ports/devel/gettext
/usr/ports/devel/libtool13
/usr/ports/devel/libtool15
/usr/ports/textproc/expat2

After quoting this becomes:
PARENT_CHECKED=/usr/ports/x11-fonts/fontconfig\ /usr/ports/devel/pkgconfi
g\
/usr/ports/print/freetype2\ /usr/ports/devel/gmake\ /usr/ports/converters/libico
nv\
/usr/ports/devel/gettext\
/usr/ports/devel/libtool13\
/usr/ports/devel/libtool15\
/usr/ports/textproc/expat2\

The next make tries to do this, the following happens:
before: PARENT_CHECKED=/usr/ports/x11-fonts/fontconfig /usr/ports/devel/pkgconfi
g\
after: PARENT_CHECKED=/usr/ports/x11-fonts/fontconfig\ /usr/ports/devel/pkgconfi
g\\
and the final \\ confuses the shell.

Thanks to asmodai for suggesting a make problem as source.

usr.bin/make/main.c

index 43c19da..1c95882 100644 (file)
@@ -38,7 +38,7 @@
  * @(#) Copyright (c) 1988, 1989, 1990, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)main.c  8.3 (Berkeley) 3/19/94
  * $FreeBSD: src/usr.bin/make/main.c,v 1.35.2.10 2003/12/16 08:34:11 des Exp $
- * $DragonFly: src/usr.bin/make/main.c,v 1.46 2005/01/10 01:07:42 okumoto Exp $
+ * $DragonFly: src/usr.bin/make/main.c,v 1.47 2005/01/14 11:30:16 joerg Exp $
  */
 
 /*-
@@ -341,11 +341,6 @@ rearg:     while((c = getopt(argc, argv, OPTFLAGS)) != -1) {
         */
        for (argv += optind, argc -= optind; *argv; ++argv, --argc)
                if (Parse_IsVar(*argv)) {
-                       char *ptr = Var_Quote(*argv);
-
-                       Var_Append(MAKEFLAGS, ptr, VAR_GLOBAL);
-                       free(ptr);
-
                        Parse_DoVar(*argv, VAR_CMD);
                } else {
                        if (!**argv)