[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: solaris $(class) considered harmful
From: |
Chip Seraphine |
Subject: |
Re: solaris $(class) considered harmful |
Date: |
Tue, 15 Feb 2005 12:36:23 -0600 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20041208) |
So do you want solarissparc defined as a class? Or do you want the
$(class) variable to be sparc?
I don't have an x86 solaris box but I am making the assumption it is
solarisx86 (after looking at the code).
My interpretation of the Rule Of Least Surprise suggests that the
correct behavior would be for
a) the 'solaris' class to be set on any Solaris system
b) the $(class) variable to be set to a value that gives us the same
information on all systems.
In the case of $(class) on Solaris, you get 'solaris' if the system runs
on Sparc hardware and 'solarisx86' if you are running on Intel. I
would think that these values should either be the same, or both contain
the same information (OS + hardware).
Why don't you just do
solaris.sparc::
Do stuff
solarisx86::
Do other stuff
I could also add a comment to make it more explicit.
The point is that it is very counterintutive for the 'solaris' class to
be a term that specifically means Sparc, and therefore be undefined on
Intel.
There are other reasons as well, pertaining to passing $(class) into
scripts. It is tidier if it gives me the same info everywhere.
--
Chip Seraphine
Unix Administrator
TradeLink, LLC
312-264-2048
chip@trdlnk.com