PERFORCE change 124948 for review
Gabor Kovesdan
gabor at FreeBSD.org
Thu Aug 9 06:42:10 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=124948
Change 124948 by gabor at gabor_server on 2007/08/09 13:41:47
- Change to a more convenient form of USE_PERL5. Now the following
can be used:
5.8.8 - Exactly Perl 5.8.8. is required
5.8.8+ - At least Perl 5.8.8 is required
5.8.8- - Only usable with Perl 5.8.8 or earlier
Affected files ...
.. //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#12 edit
Differences ...
==== //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#12 (text+ko) ====
@@ -48,18 +48,30 @@
__prefix=${USE_PERL5:C/[^[:digit:].]+$//}
__suffix=${USE_PERL5:C/^[0-9.]+//}
+_u_perl_major= ${__prefix:C|^([1-9]+).*|\1|}
+_u__perl_minor= 00${__prefix:C|^([1-9]+)\.([0-9]+).*|\2|}
+_u_perl_minor= ${_u__perl_minor:C|^.*(...)|\1|}
+.if ${_u_perl_minor} >= 100
+_u_perl_minor= ${__prefix:C|^([1-9]+)\.([0-9][0-9][0-9]).*|\2|}
+_u_perl_patch= ${__prefix:C|^.*(..)|\1|}
+.else # ${_u_perl_minor} < 100
+_u__perl_patch= 0${__prefix:C|^([1-9]+)\.([0-9]+)\.*|0|}
+_u_perl_patch= ${_u__perl_patch:C|^.*(..)|\1|}
+.endif # ${_u_perl_minor} < 100
+USE_PERL5_LEVEL= ${_u_perl_major}${_u_perl_minor}${_u_perl_patch}
+
.if ${__suffix} == "+"
-.if ${__prefix} > ${PERL_LEVEL}
+.if ${USE_PERL5_LEVEL} > ${PERL_LEVEL}
USE_PERL5_REASON?= You need Perl ${__prefix} or newer, please install latest lang/perl5.8
IGNORE= ${USE_PERL5_REASON)
.endif
.elif ${__suffix} == ""
-.if ${__prefix} != ${PERL_LEVEL}
+.if ${USE_PERL5_LEVEL} != ${PERL_LEVEL}
USE_PERL5_REASON?= You need Perl ${__prefix} exactly
IGNORE= ${USE_PERL5_REASON)
.endif
.elif ${__suffix} == "-"
-.if ${__prefix} < ${PERL_LEVEL}
+.if ${USE_PERL5_LEVEL} < ${PERL_LEVEL}
USE_PERL5_REASON?= You need Perl ${__prefix} or earlier
IGNORE= ${USE_PERL5_REASON)
.endif
More information about the p4-projects
mailing list