Commit 4a19f1eced611e7c3a0fba07d13515cbc73da09f

Authored by pbrook
1 parent 9bd7e6d9

Add --with-pkgversion.

Allows distributors to identify their builds without needing to hack the
sources.

Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7036 c046a42c-6fe2-441c-8c8c-71466251a162
configure
... ... @@ -190,6 +190,7 @@ aix=&quot;no&quot;
190 190 blobs="yes"
191 191 fdt="yes"
192 192 sdl_x11="no"
  193 +pkgversion=""
193 194  
194 195 # OS specific
195 196 if check_define __linux__ ; then
... ... @@ -470,6 +471,8 @@ for opt do
470 471 ;;
471 472 --kerneldir=*) kerneldir="$optarg"
472 473 ;;
  474 + --with-pkgversion=*) pkgversion=" ($optarg)"
  475 + ;;
473 476 *) echo "ERROR: unknown option $opt"; show_help="yes"
474 477 ;;
475 478 esac
... ... @@ -1479,6 +1482,8 @@ qemu_version=`head $source_path/VERSION`
1479 1482 echo "VERSION=$qemu_version" >>$config_mak
1480 1483 echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h
1481 1484  
  1485 +echo "#define QEMU_PKGVERSION \"$pkgversion\"" >> $config_h
  1486 +
1482 1487 echo "SRC_PATH=$source_path" >> $config_mak
1483 1488 if [ "$source_path_used" = "yes" ]; then
1484 1489 echo "VPATH=$source_path" >> $config_mak
... ...
linux-user/main.c
... ... @@ -2202,7 +2202,7 @@ void cpu_loop (CPUState *env)
2202 2202  
2203 2203 static void usage(void)
2204 2204 {
2205   - printf("qemu-" TARGET_ARCH " version " QEMU_VERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n"
  2205 + printf("qemu-" TARGET_ARCH " version " QEMU_VERSION QEMU_PKGVERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n"
2206 2206 "usage: qemu-" TARGET_ARCH " [options] program [arguments...]\n"
2207 2207 "Linux CPU emulator (compiled for %s emulation)\n"
2208 2208 "\n"
... ...
monitor.c
... ... @@ -273,7 +273,7 @@ static void do_info(Monitor *mon, const char *item)
273 273  
274 274 static void do_info_version(Monitor *mon)
275 275 {
276   - monitor_printf(mon, "%s\n", QEMU_VERSION);
  276 + monitor_printf(mon, "%s\n", QEMU_VERSION QEMU_PKGVERSION);
277 277 }
278 278  
279 279 static void do_info_name(Monitor *mon)
... ...
... ... @@ -3942,7 +3942,7 @@ static int main_loop(void)
3942 3942  
3943 3943 static void version(void)
3944 3944 {
3945   - printf("QEMU PC emulator version " QEMU_VERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n");
  3945 + printf("QEMU PC emulator version " QEMU_VERSION QEMU_PKGVERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n");
3946 3946 }
3947 3947  
3948 3948 static void help(int exitcode)
... ...