[Top][All Lists]

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

Re: Portable makefiles - portable shell commands?

From: Eli Zaretskii
Subject: Re: Portable makefiles - portable shell commands?
Date: Tue, 05 Apr 2005 22:23:19 +0300

> Date: Tue, 05 Apr 2005 15:05:27 +0200
> From: Alessandro Vesely <address@hidden>
> > The only truly portable way is to write a portable C program that
> > would perform operations like rm etc.,
> A portable rm already exists.

It does?  If you mean the various Windows ports of GNU Fileutils, then
each port has a little bit different behavior.  More importantly, you
cannot trust them to be present on the end-user's machine.

> > and distribute it with your package. 
> > Then arrange for the makefile to build that program first,
> > before you do anything else.
> That won't work well: One would get something like the following
>    C:\blah>gmake -n clean
>    cc -c -o rm.o -c rm.c
>    cc -o rm.exe rm.o
>    rm rm.o rm.exe

I don't understand these commands.  I had in mind something like this:

    C:\blah>gmake -n clean
    cc -o rm.exe rm.c
    ./rm.exe foo.o bar.o foo.c~ bar.bak

What's wrong with this?  If you meant to say that "make clean" will
remove rm.exe itself, then that's up to the author of Makefile, right?
He doesn't need to write the Makefile in a silly way, does he?

> Personally, I distribuite a zip containing a (less than minimal)
> set of win32 executables, including gmake.exe, needed for building
> my software.

That is also possible, but it makes the archive larger than with my

reply via email to

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