Subject: syntax for distinguishing OS releases in Makefiles?
To: None <tech-pkg@netbsd.org>
From: Georg Schwarz <geos@epost.de>
List: tech-pkg
Date: 01/15/2004 19:05:48
Hi,

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.

Georg

PS: ${LOWER_OPSYS} is defined to be the output of uname -r, i.e. "5.3"
or "6.5.22".



-- 
Georg Schwarz    http://home.pages.de/~schwarz/
 geos@epost.de     +49 177 8811442