Skip to content

Commit

Permalink
Use version string in configure.ac when git repo is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
masamichitakagi committed Jan 23, 2018
1 parent 5d60a8c commit 46fb9f3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 28 deletions.
3 changes: 1 addition & 2 deletions config.h.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* config.h.in. Generated from configure.ac by autoheader. */

/* Id of IHK.ko maching of which is checked at run-time by reboot script and
mcexec */
/* IHK build-id to confirm IHK and McKernel built at the same time are used */
#undef BUILDID

/* whether memdump feature is enabled */
Expand Down
34 changes: 16 additions & 18 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for ihk 0.9.0.
# Generated by GNU Autoconf 2.69 for ihk 1.4.0.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ihk'
PACKAGE_TARNAME='ihk'
PACKAGE_VERSION='0.9.0'
PACKAGE_STRING='ihk 0.9.0'
PACKAGE_VERSION='1.4.0'
PACKAGE_STRING='ihk 1.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1247,7 +1247,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures ihk 0.9.0 to adapt to many kinds of systems.
\`configure' configures ihk 1.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1308,7 +1308,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ihk 0.9.0:";;
short | recursive ) echo "Configuration of ihk 1.4.0:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1406,7 +1406,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ihk configure 0.9.0
ihk configure 1.4.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1704,7 +1704,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ihk $as_me 0.9.0, which was
It was created by ihk $as_me 1.4.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -2053,12 +2053,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu



IHK_VERSION=0.9.0
MCKERNEL_VERSION=0.9.0
DCFA_VERSION=0.9.0
IHK_RELEASE_DATE=2013-11-18
MCKERNEL_RELEASE_DATE=2013-11-18
DCFA_RELEASE_DATE=2013-11-18
IHK_VERSION=1.4.0
MCKERNEL_VERSION=1.4.0
DCFA_VERSION=1.4.0
IHK_RELEASE_DATE=2017-10-30
MCKERNEL_RELEASE_DATE=2017-10-30
DCFA_RELEASE_DATE=2017-10-30



Expand Down Expand Up @@ -5072,9 +5072,7 @@ fi

ABS_SRCDIR=$( cd $( dirname $0 ); pwd )
IHK_ABS_SRCDIR=${ABS_SRCDIR}/../ihk
{ $as_echo "$as_me:${as_lineno-$LINENO}: IHK_ABS_SRCDIR=$IHK_ABS_SRCDIR" >&5
$as_echo "$as_me: IHK_ABS_SRCDIR=$IHK_ABS_SRCDIR" >&6;}
BUILDID=$( cd $IHK_ABS_SRCDIR; git rev-list -1 HEAD | cut -c1-8 )
BUILDID=$( cd $IHK_ABS_SRCDIR; if [ ! -d .git ]; then echo $IHK_VERSION; else bash -c 'git rev-list -1 HEAD | cut -c1-8'; fi )
{ $as_echo "$as_me:${as_lineno-$LINENO}: BUILDID=$BUILDID" >&5
$as_echo "$as_me: BUILDID=$BUILDID" >&6;}
if test "x$BUILDID" != "x" ; then
Expand Down Expand Up @@ -5637,7 +5635,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by ihk $as_me 0.9.0, which was
This file was extended by ihk $as_me 1.4.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -5699,7 +5697,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
ihk config.status 0.9.0
ihk config.status 1.4.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down
15 changes: 7 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# configure.ac COPYRIGHT FUJITSU LIMITED 2015-2016
AC_PREREQ(2.63)
m4_define([IHK_VERSION_m4],[0.9.0])dnl
m4_define([MCKERNEL_VERSION_m4],[0.9.0])dnl
m4_define([DCFA_VERSION_m4],[0.9.0])dnl
m4_define([IHK_RELEASE_DATE_m4],[2013-11-18])dnl
m4_define([MCKERNEL_RELEASE_DATE_m4],[2013-11-18])dnl
m4_define([DCFA_RELEASE_DATE_m4],[2013-11-18])dnl
m4_define([IHK_VERSION_m4],[1.4.0])dnl
m4_define([MCKERNEL_VERSION_m4],[1.4.0])dnl
m4_define([DCFA_VERSION_m4],[1.4.0])dnl
m4_define([IHK_RELEASE_DATE_m4],[2017-10-30])dnl
m4_define([MCKERNEL_RELEASE_DATE_m4],[2017-10-30])dnl
m4_define([DCFA_RELEASE_DATE_m4],[2017-10-30])dnl

AC_INIT([ihk], IHK_VERSION_m4)

Expand Down Expand Up @@ -414,11 +414,10 @@ fi

ABS_SRCDIR=$( cd $( dirname $0 ); pwd )
IHK_ABS_SRCDIR=${ABS_SRCDIR}/../ihk
BUILDID=$( cd $IHK_ABS_SRCDIR; git rev-list -1 HEAD | cut -c1-8 )
BUILDID=$( cd $IHK_ABS_SRCDIR; if @<:@ ! -d .git @:>@; then echo $IHK_VERSION; else bash -c 'git rev-list -1 HEAD | cut -c1-8'; fi )
AC_MSG_NOTICE([BUILDID=$BUILDID])
if test "x$BUILDID" != "x" ; then
AC_DEFINE_UNQUOTED(BUILDID,"$BUILDID",[IHK build-id to confirm IHK and McKernel built at the same time are used])
)
fi
AC_SUBST(BUILDID)

Expand Down

0 comments on commit 46fb9f3

Please sign in to comment.