[Top][All Lists]

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

Re: Problem with FOR statements in command lines?

From: Eli Zaretskii
Subject: Re: Problem with FOR statements in command lines?
Date: Fri, 24 Oct 2003 16:23:37 +0200

> Date: Thu, 23 Oct 2003 11:17:34 -0700
> From: Scott Bussinger <address@hidden>
>  > Try
>  >         $(shell for %%a in (s\*.bak) do echo %%a)
> Well not exactly. If you do that you get:
>     V:\todo\test>gnumake -ftest
>     t\t.bak
>     gnumake: Interrupt/Exception caught (code = 0xc0000005, addr = 0x4fe7c0)
> which I assume is because the $(shell) expands out to a string and then
> it tries to execute it which in this case it can't. Hard to tell from
> the error message though. But this variation seems to work:
> default:
>         cmd /c rem $(shell for %%a in (t\*.bak) do echo %%a)
> where the $(shell) runs the command and all the other junk is just so
> the output gets ignored.
> Seems pretty kludgy though -- any reason why this doesn't work as
> expected?

Sounds like a bug in the ported Make.  Perhaps someone on the MinGW
list will be able to help you more or even suggest how to fix the bug.

reply via email to

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