an alternative to my question about character classes is that i can
do this the *proper* way, and extract the major version number of
sqlite from the top of its source tree.

  there's a top-level VERSION file, whose contents will be something
like "3.2.2".  so, for now, i can use:

SRCDIR = [top of source tree]
FULL_VERSION := $(shell cat ${SRCDIR}/VERSION)
$(warning Full version is ${FULL_VERSION}.)

MAJOR_VERSION := $(shell expr ${FULL_VERSION} : "\([0-9]*\)")
$(warning version is ${MAJOR_VERSION}.)


  even though the above works, i'm just betting there's a more natural
way to do either of:

1) get the contents of a one-line text file
2) extract the leading fully-numeric substring of a string

  am i right?  or is the above pretty much it?

rday


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to