On Apr 3, 2005 5:10 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I was wondering how GNU make can best be used to build programs on
> multiple platforms (and on each platform possibly with multiple
> compilers), like on Win32 with MSVC and OpenWatcom, on Linux with g++,
> etc.
> 
> All that I'm still really concerned about is the portability of the
> shell commands that are used e.g. for the "clean" targets: I cannot
> simply get make from
> http://prdownloads.sf.net/mingw/mingw32-make-3.80.0-3.exe?download
> *and* write for example    rm -f $(shell find . -name "*~")    as a
> shell command for the clean target, can I?

You can use environment variable(s) like SHELL to determine if this is
a Unix-like shell, or use a command like uname to figure out what
platform you're using.  Based on these findings, you can define a
function like RM := rm -f or RM := del.  Then just use $(RM).  Or you
can use Cygwin or MKS or some such thing that actually provides
Unix-like commands like rm.

Jon.


_______________________________________________
Make-w32 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/make-w32

Reply via email to