mkversion.sh.in
1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/sh
#
# Copyright 1999, 2001, 2005 by Paul Mattes.
# RPQNAMES modifications copyright 2005 by Don Russell.
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permission notice appear in
# supporting documentation.
#
# c3270,s3270 and tcl3270 are distributed in the hope that they will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file LICENSE
# for more details.
#
# Create version.o from version.txt
#set -x
set -e
cd `dirname $0`
version="@PACKAGE_VERSION@"
builddate=`date`
sccsdate=`date +%Y/%m/%d`
user=${LOGNAME-$USER}
# Create an all numeric timestamp for rpqnames.
# rpq.c will return this string of numbers in bcd format
# It is OK to change the length (+ or -), but use
# decimal (0-9) digits only. Length must be even number of digits.
rpq_timestamp=`date +%Y%m%d%H%M%S`
cat <<EOF >version.c
char *build = "@PACKAGE@ v$version $builddate $user";
char *app_defaults_version = "$adversion";
char *sccsid = "@(#)@PACKAGE@ v$version $sccsdate $user";
const char *build_rpq_timestamp = "$rpq_timestamp";
const char *build_rpq_version = "$version";
EOF