help-make
[Top][All Lists]
Advanced

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

Re: function.c, unlink, copy


From: Der Herr Hofrat
Subject: Re: function.c, unlink, copy
Date: Wed, 28 Sep 2005 08:28:04 +0200 (CEST)

> Hi,
> 
> i often use "rm -f" OR "cmd /C del /Q" to delete files.
> 
> In a portable Makefile i have to set that command conditionally,
> depending on the OS, which leads to the problem to determine
> the underlying OS.  Is there a bullet-proof way to determine
> it?  Environment variables could be set not properly or also
> not at all set.  Also, i can't set it for every command.

in this case it might be simpler to check if these commands are available
and not bother checking which OS you actually have. Another simple alternative
is to mandate an environment variable and simply fuss at the users if it is
not set. I doubt there is something like a general bulet prof OS-detection 
that would stay upwards compatible.


hofrat




reply via email to

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