[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
about the version number of the package
From: |
Vincent Torri |
Subject: |
about the version number of the package |
Date: |
Sun, 1 Nov 2009 12:00:13 +0100 (CET) |
Hey,
I wanted to write an m4 macro to be put in a lot of our configure.ac
files. The problem is that the code contain '$1' to compute the parts of
the version of the package (major, minor, etc...). The code is the
following:
VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
So, actually, my first question is: is there a better way to compute the
major, etc.. parts of the version number ?
If not, how can I tell m4 to not expand $* in the printf command ?
thank you
Vincent Torri
- about the version number of the package,
Vincent Torri <=