File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ gen/vars.mk::
3838 @printf ' MKDIR := %s\n' " $$ XMKDIR" >> $@
3939 @printf ' PKG_CONFIG := %s\n' " $$ XPKG_CONFIG" >> $@
4040 @printf ' RM := %s\n' " $$ XRM" >> $@
41+ @test -z " $$ VERSION" || printf ' export VERSION=%s\n' " $$ VERSION" >> $@
4142 ${VCAT} $@
4243
4344# Sets the build flags. This depends on vars.mk and uses a recursive make so
Original file line number Diff line number Diff line change 77
88set -eu
99
10+ # Get the relative path to the source tree based on how the script was run
11+ DIR=$( dirname -- " $0 " )
12+
1013# Print the help message
1114help () {
1215 cat << EOF
@@ -57,6 +60,8 @@ Packaging:
5760 Set the installation prefix (default: /usr)
5861 --mandir=/path
5962 Set the man page directory (default: \$ PREFIX/share/man)
63+ --version=X.Y.Z
64+ Set the version string (default: $( " $DIR /build/version.sh" ) )
6065
6166This script is a thin wrapper around a makefile-based configuration system.
6267Any other arguments will be passed directly to the $MAKE invocation, e.g.
@@ -134,7 +139,7 @@ for arg; do
134139 printf ' warning: Treating "%s" like "%s"\n' " $old " " $arg " >&2
135140 ;;
136141 esac
137- ;;
142+ ;;
138143 esac
139144
140145 case " $arg " in
@@ -165,7 +170,7 @@ for arg; do
165170 esac
166171 ;;
167172
168- --prefix=* |--mandir=* )
173+ --prefix=* |--mandir=* |--version= * )
169174 set -- " $@ " " $NAME =$value "
170175 ;;
171176
@@ -188,9 +193,6 @@ for arg; do
188193 esac
189194done
190195
191- # Get the relative path to the source tree based on how the script was run
192- DIR=$( dirname -- " $0 " )
193-
194196# Set up symbolic links for out-of-tree builds
195197for f in Makefile build completions docs src tests; do
196198 test -e " $f " || ln -s " $DIR /$f " " $f "
You can’t perform that action at this time.
0 commit comments