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: Sat, 30 Mar 2002 12:21:19 -0800

Great advice.  In fact I do that in my own shop.  I have Cygwin (bash) and other
environments that let me build on HP-UX, Solaris, Linux, Win2k, etc.  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.  None of the
developers have any experience on *nix so it would be pretty foreign to them as
well.

Does anyone know what the buffer size limit is for cmd.exe on NT 4.0+ and Win2k?

I agree with Greg regarding the crazy command line incompatabilities between the
flavors of Win32.  I recently got burned really bad between NT 4.0 and Win2k as
far as redirection and terminal behaviour.

Worst case I can use foreach() to generate small sanitized lists of files for
CMD.EXE to delete.  If I knew what the buffer limit was I could be reasonably
efficient with the code albeit it will be butt ugly.

Thanks for your input.

Cheers,
Bryan

> -----Original Message-----
> From: address@hidden [mailto:address@hidden Behalf Of Eli
> Zaretskii
> Sent: Saturday, March 30, 2002 12:30 AM
> To: address@hidden
> Cc: address@hidden
> Subject: Re: Advice on "clean:" rule for Win32 platform needed...
>
>
> > From: "Bryan Miller" <address@hidden>
> > Date: Fri, 29 Mar 2002 15:18:51 -0800
> >
> > I am porting GNU make files from a platform I know very
> well (U**X) to one I
> > don't (Win32) and I am having problems with the lack of
> shell commands such as
> > for/do and xargs.
>
> You could install the ports of Bash and of all the other tools, and
> then do the same as on Unix.
>
> > On Unix I do something like:
> >
> > clean:
> >     address@hidden $(BASE_OBJS)
> >     for APP in $(APP_OBJS) ; do \
> >       rm $(APP); \
> >     done;
> >
> > On Win32 the both commands below seem to overflow the
> cmd.exe buffer due the size
> > of the list of objects (~150-200 items):
> >
> > clean:
> >     address@hidden $(BASE_OBJS)
> >     for %f in ($(APP_OBJS)) do @echo %f
>
> One trick, if you cannot install a port of `rm', is to use widlcards:
>
> clean:
>       del *.obj
>
> > I know some of you must maintain large build environments on the
> > Win32 platform.  What are the "better" ways of writing clean rules?
>
> The best way is to install ported GNU utilities (Fileuitils,
> Textutils, Sh-utils, Findutils, Grep, Gawk, Sed, Bash, Diffutils), and
> live happily ever after ;-)
>
> > My next step is just to write a Perl
> > script and call that but it doesn't seem terribly clean.
>
> IMHO, using Perl for somthing like that is too gross




reply via email to

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