Subject: Re: syntax for distinguishing OS releases in Makefiles?
To: Georg Schwarz <>
From: Johnny C. Lam <>
List: tech-pkg
Date: 01/15/2004 20:21:55
On Thu, Jan 15, 2004 at 07:05:48PM +0100, Georg Schwarz wrote:
> In my effort to port pkgsrc to IRIX 5.3 I have had to notice that IRIX
> 5.3 is quite different than IRIX 6.X (for which there already is support
> in pkgsrc) in some aspects.
> In some Makefiles, e.g. pkgsrc/lang/perl5/Makefile, I have to
> distinguish whether we have version 5.X or 6.X or IRIX. What syntax
> should I use?
> Originally it reads for example
> .if ${OPSYS} == "IRIX"
> I would check in addition whether it is release 6.X here. Is the
> following appropriate?
> .if ${OPSYS} == "IRIX" && ${LOWER_OPSYS} == "6*"
> probably not... Can anybody help me out with the syntax of the Makefile
> conditional expressions? Thanks.

Where they need to differentiate based on the OS and the OS version,
most packages tend to use something like:

	.if !empty(MACHINE_PLATFORM:MNetBSD-1.6*-*)


	-- Johnny Lam <>