#!/bin/tcsh -f

# Get the major, minor, or sub-minor version of ROOT using
# the root-config script. This is needed because root-config
# itself will only supply a string like 5.26/04. This is a
# little difficult to parse in the makefile in order to get,
# say, just the minor version.

if ( $1 == "MAJOR" ) then
	root-config --version | awk '{print substr($1,1,1)}'
else if ($1 == "SUBMINOR" ) then
	root-config --version | awk '{print substr($1,6,2)}'
else
	root-config --version | awk '{print substr($1,3,2)}'
endif