From owner-freebsd-ports Mon Aug 9 19:25:18 1999 Delivered-To: freebsd-ports@freebsd.org Received: from kaa.kfunigraz.ac.at (KAA16.kfunigraz.ac.at [143.50.16.17]) by hub.freebsd.org (Postfix) with ESMTP id B05C314C1C for ; Mon, 9 Aug 1999 19:25:05 -0700 (PDT) (envelope-from dada@balu.kfunigraz.ac.at) Received: from balu.kfunigraz.ac.at (balu [143.50.16.16]) by kaa.kfunigraz.ac.at (8.9.2/8.9.2) with ESMTP id EAA01065; Tue, 10 Aug 1999 04:21:25 +0200 (MDT) Received: from localhost.kfunigraz.ac.at (IDENT:A8sF8g1ZMbs9bwls7sykmq1+/5blxgC9@BONLINEB38.kfunigraz.ac.at [143.50.33.38]) by balu.kfunigraz.ac.at (8.9.2/8.9.2) with ESMTP id EAA20964; Tue, 10 Aug 1999 04:23:28 +0200 (MDT) Received: from localhost (gfB9VGG830OxoRCaquXtT0qgTcgrYAdC@localhost.kfunigraz.ac.at [127.0.0.1]) by localhost.kfunigraz.ac.at (8.8.8/x.y.z) with ESMTP id EAA14845; Tue, 10 Aug 1999 04:13:49 +0200 (CEST) (envelope-from dada@localhost.kfunigraz.ac.at) Date: Tue, 10 Aug 1999 04:13:49 +0200 (CEST) From: Martin Kammerhofer Reply-To: Martin Kammerhofer To: Josh Gilliam Cc: Jun-ichiro Itoh , Yoshishige Arai , ports@freebsd.org Subject: Usage of ${OSREL} vs. ${OSVERSION} in FreeBSD port Makefiles Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello Josh! Your port textproc/aspell is the latest one in a long list of ports that are broken on FreeBSD 2.2.x. The problem is caused by the incorrect usage of ${OSREL} for numerical comparisons in make(1) if-statements. E.g. in your port the line .if ${OSREL} < 4 is expanded by make to .if 2.2.8 < 4 on my FreeBSD 2.2.8 system. This is considered a syntax error by make and make(1) therefore rejects the whole Makefile. I don't know who started this bug but now it seems to appear every week in another port. :( A robust way to check the OS Release is to use ${OSVERSION}. In the case of aspell replace .if ${OSREL} < 4 with .if ${OSVERSION} < 400000 and everything is fine for FreeBSD x.y.z sytems too. I cc'd this message to the authors of 'portlint' and ports@freebsd.org because I suggest this frequent bug should 1. be documented in the Handbook (a hint should be added to section 4.7.8.5 "Differentiating OS versions") 2. a check for incorrect usage of ${OSREL} in if-statements should be added to 'portlint'. Some make-targets ('make readmes', 'make index') traverse the whole port tree. This cannot work if ANY Makefile has a syntax error, even if you never intend to build that ports. That's why I spot these errors, because I cvsup the ports collection and rebuild the README.html files weekly. Even if 2.2.x is considered 'unsupported' this is still a concern, because 3.x.y and 4.x.y systems are likely to emerge. HTH, Martin -- Kommunikation läßt sich durch nichts ersetzen. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message