[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Advice on "clean:" rule for Win32 platform needed...
From: |
Eli Zaretskii |
Subject: |
Re: Advice on "clean:" rule for Win32 platform needed... |
Date: |
Sat, 30 Mar 2002 11:30:04 +0300 |
> 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.