< prev index next >

common/autoconf/jdk-version.m4

Print this page




 295       VERSION_PATCH=0
 296     else
 297       JDKVER_CHECK_AND_SET_NUMBER(VERSION_PATCH, $with_version_patch)
 298     fi
 299   else
 300     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
 301       # Default is 0, if unspecified
 302       VERSION_PATCH=0
 303     fi
 304   fi
 305 
 306   # Calculate derived version properties
 307 
 308   # Set pre to "pre-base" if debug level is empty (i.e. release), or
 309   # "pre-base.debug-level" otherwise.
 310   if test "x$VERSION_PRE_BASE" = x && test "x$VERSION_PRE_DEBUGLEVEL" != x; then
 311     AC_MSG_ERROR([Cannot set version-pre-debuglevel when version-pre-base is empty])
 312   fi
 313   VERSION_PRE=$VERSION_PRE_BASE${VERSION_PRE_DEBUGLEVEL:+.$VERSION_PRE_DEBUGLEVEL}
 314 







 315   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
 316   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
 317 
 318   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
 319   # Strip trailing zeroes from stripped_version_number
 320   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
 321   VERSION_NUMBER=$stripped_version_number
 322 
 323   # The complete version string, with additional build information
 324   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
 325     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
 326   else
 327     # If either build or opt is set, we need a + separator
 328     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
 329   fi
 330 
 331   # The short version string, just VERSION_NUMBER and PRE, if present.
 332   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
 333 
 334   AC_MSG_CHECKING([for version string])
 335   AC_MSG_RESULT([$VERSION_STRING])
 336 
 337   AC_SUBST(VERSION_MAJOR)
 338   AC_SUBST(VERSION_MINOR)
 339   AC_SUBST(VERSION_SECURITY)
 340   AC_SUBST(VERSION_PATCH)
 341   AC_SUBST(VERSION_PRE)
 342   AC_SUBST(VERSION_BUILD)
 343   AC_SUBST(VERSION_OPT)
 344   AC_SUBST(VERSION_NUMBER)
 345   AC_SUBST(VERSION_NUMBER_FOUR_POSITIONS)
 346   AC_SUBST(VERSION_STRING)
 347   AC_SUBST(VERSION_SHORT)

 348 ])


 295       VERSION_PATCH=0
 296     else
 297       JDKVER_CHECK_AND_SET_NUMBER(VERSION_PATCH, $with_version_patch)
 298     fi
 299   else
 300     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
 301       # Default is 0, if unspecified
 302       VERSION_PATCH=0
 303     fi
 304   fi
 305 
 306   # Calculate derived version properties
 307 
 308   # Set pre to "pre-base" if debug level is empty (i.e. release), or
 309   # "pre-base.debug-level" otherwise.
 310   if test "x$VERSION_PRE_BASE" = x && test "x$VERSION_PRE_DEBUGLEVEL" != x; then
 311     AC_MSG_ERROR([Cannot set version-pre-debuglevel when version-pre-base is empty])
 312   fi
 313   VERSION_PRE=$VERSION_PRE_BASE${VERSION_PRE_DEBUGLEVEL:+.$VERSION_PRE_DEBUGLEVEL}
 314 
 315   # Set VERSION_IS_GA based on if VERSION_PRE has a value
 316   if test "x$VERSION_PRE" = x; then
 317     VERSION_IS_GA=true
 318   else
 319     VERSION_IS_GA=false
 320   fi
 321 
 322   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
 323   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
 324 
 325   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
 326   # Strip trailing zeroes from stripped_version_number
 327   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
 328   VERSION_NUMBER=$stripped_version_number
 329 
 330   # The complete version string, with additional build information
 331   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
 332     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
 333   else
 334     # If either build or opt is set, we need a + separator
 335     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
 336   fi
 337 
 338   # The short version string, just VERSION_NUMBER and PRE, if present.
 339   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
 340 
 341   AC_MSG_CHECKING([for version string])
 342   AC_MSG_RESULT([$VERSION_STRING])
 343 
 344   AC_SUBST(VERSION_MAJOR)
 345   AC_SUBST(VERSION_MINOR)
 346   AC_SUBST(VERSION_SECURITY)
 347   AC_SUBST(VERSION_PATCH)
 348   AC_SUBST(VERSION_PRE)
 349   AC_SUBST(VERSION_BUILD)
 350   AC_SUBST(VERSION_OPT)
 351   AC_SUBST(VERSION_NUMBER)
 352   AC_SUBST(VERSION_NUMBER_FOUR_POSITIONS)
 353   AC_SUBST(VERSION_STRING)
 354   AC_SUBST(VERSION_SHORT)
 355   AC_SUBST(VERSION_IS_GA)
 356 ])
< prev index next >