make-w32
[Top][All Lists]
Advanced

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

RE: Advice on "clean:" rule for Win32 platform needed...


From: Bryan Miller
Subject: RE: Advice on "clean:" rule for Win32 platform needed...
Date: Wed, 3 Apr 2002 22:39:17 -0800

I ended up doing some pretty ugly stuff myself.  I used the "for /F do" 
construct
where you can read from a file and iterate over the contents.  This gets around
the 4096 character limit in NT.

clean:
        address@hidden /F %f in (app_dirs) do @del \baseGSM\%f\*.obj
        address@hidden /F %f in (base_dirs) do @del \baseGSM\%f\*.obj
        #
        # Add other files to be deleted below this line.
        #
        address@hidden $(VERNO)
        address@hidden $(BLD_ROOT)\verno.c
        address@hidden $(BLD_ROOT)\gsmflsrf.bin
        address@hidden $(BLD_ROOT)\gsmfls.elf
        address@hidden $(BLD_ROOT)\base.lib

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden Behalf Of
> Bijal Shah
> Sent: Tuesday, April 02, 2002 1:14 AM
> To: 'Eli Zaretskii'; Bryan Miller
> Cc: 'Greg Chicares'; address@hidden
> Subject: RE: Advice on "clean:" rule for Win32 platform needed...
>
>
>
> There is a very specific limit of around 4096 characters in
> Windows NT. I
> think this is much less in Windows 95 and I don't know about Win2k.
>
> I ran into the very same problem and had to resort to some
> ugly code to make
> it work - I seem to remember using $words or similar to split
> the request
> over several "batches", or in one case writing a console
> program in C to do
> the job for me.
>
> I tried all sorts of tricks and couldn't get around the
> character limit - it
> gets you somewhere.
>
> B.
>
> P.S. Also worth watching out for is the behaviour of the
> 'for' command for
> files - its different between different NT service packs.
>
> -----Original Message-----
> From: Eli Zaretskii [mailto:address@hidden
> Sent: 31 March 2002 06:52
> To: Bryan Miller
> Cc: 'Greg Chicares'; address@hidden
> Subject: RE: Advice on "clean:" rule for Win32 platform needed...
>
>
>
> On Sat, 30 Mar 2002, Bryan Miller wrote:
>
> > However
> > this work is for a client and they aren't crazy about
> having to install
> > yet-another-thing on their system and have to maintain it.
>
> Then what about using the other trick I suggested (with wildcards)?
>
> > Does anyone know what the buffer size limit is for cmd.exe
> on NT 4.0+ and
> Win2k?
>
> There should be no limits, at least not limits that you should hit in
> your scenario.  I suspect that your commands use shell
> features, and so
> Make goes through a temporary batch file to run those
> commands.  Batch
> files is where the limits bite you.
>
> So a solution would be to avoid using shell commands
> entirely; then Make
> should attempt to invoke the command directly, not via the shell.
>
> In other words, throw together a simple version of `rm',
> compile it with
> the Windows compiler, and use it (with an explicit list of files to
> delete, not via a FOR loop) to remove those files.
>
> _______________________________________________
> Make-w32 mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/make-w32
>
> _______________________________________________
> 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]