make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Savannah bug #4364


From: address@hidden
Subject: Re: Savannah bug #4364
Date: Wed, 30 Jul 2003 19:30:05 -0400

early days of DOS, the $ was a string terminator
(Thanks to B.Gates; actually the OS he bought and re-sold to IBM);

I notice in winXP help
    cmd.exe->
    command line reference->
    batch files->
    batch parameters->
    using batch parameters:
      %~$PATH:1 Searches the directories listed in the PATH environment
variable and expands %1 to the fully qualified name of the first one found.
If the environment variable name is not defined or the file is not found,
this modifier expands to the empty string.


This indicates the batch command processor will treat the $ character
special.
How special I don't know.  Other special characters: ~ % * ?

Need to fake Batch processor in CMD.EXE(or command.com) into treating
"$" as literal, not interpret; but how I do not know.

may try \$
but I don't have much faith in that solution.

----- Original Message ----- 
From: "Eli Zaretskii" <address@hidden>
To: <address@hidden>
Cc: <address@hidden>
Sent: Wednesday, July 30, 2003 2:08am
Subject: Re: Savannah bug #4364


> Date: Tue, 29 Jul 2003 17:36:14 -0400
> From: address@hidden
>
> Here is the makefile to repro the bugs:
>
> .PHONY: test
> test:
> catargs.bat perl -e "print \"foo;;\";" # make removes the ;;
> catargs.bat perl -e "my $$a = 4; print \"$$a\";" # make doesn't really
escape the $
>
>
> This produces the following results:
>
> C:\checker\dev\test\make>make
> catargs.bat perl -e "print \"foo;;\";"
>
> C:\checker\dev\test\make>echo perl -e "print \"foo \";"
> perl -e "print \"foo \";"
> catargs.bat perl -e "my $a = 4; print \"$a\";"
>
> C:\checker\dev\test\make>echo perl -e "my = 4; print \"\";"
> perl -e "my = 4; print \"\";"
>
> As you can see, what make actually sends to the program doesn't resemble
> what it claims it's sending to the program, making it impossible to
> execute some commands from inside make.

I think it's not Make's fault: it's the Windows shell's fault.  It's
the shell that interprets the ;; thing in this case.

As for $$a case, I see different results with the DJGPP port of GNU
Make.  What port of which version was used by the OP?


_______________________________________________
Make-w32 mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/make-w32




reply via email to

[Prev in Thread] Current Thread [Next in Thread]