]> git.proxmox.com Git - qemu.git/commitdiff
Add --with-pkgversion.
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 7 Apr 2009 23:17:49 +0000 (23:17 +0000)
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 7 Apr 2009 23:17:49 +0000 (23:17 +0000)
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
linux-user/main.c
monitor.c
vl.c

index 853541d5912acf6a68441deffbbf97164ab6a1ba..0ea24c20b3131aab0a3384eb48a9c3a666893630 100755 (executable)
--- a/configure
+++ b/configure
@@ -190,6 +190,7 @@ aix="no"
 blobs="yes"
 fdt="yes"
 sdl_x11="no"
+pkgversion=""
 
 # OS specific
 if check_define __linux__ ; then
@@ -470,6 +471,8 @@ for opt do
   ;;
   --kerneldir=*) kerneldir="$optarg"
   ;;
+  --with-pkgversion=*) pkgversion=" ($optarg)"
+  ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
   ;;
   esac
@@ -1479,6 +1482,8 @@ qemu_version=`head $source_path/VERSION`
 echo "VERSION=$qemu_version" >>$config_mak
 echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h
 
+echo "#define QEMU_PKGVERSION \"$pkgversion\"" >> $config_h
+
 echo "SRC_PATH=$source_path" >> $config_mak
 if [ "$source_path_used" = "yes" ]; then
   echo "VPATH=$source_path" >> $config_mak
index 3b9dfc76732e0aaa5f33539ee40b05078b554a7c..dd0058c0bf5b282e9dc57deb6e0cd68eb772ce86 100644 (file)
@@ -2202,7 +2202,7 @@ void cpu_loop (CPUState *env)
 
 static void usage(void)
 {
-    printf("qemu-" TARGET_ARCH " version " QEMU_VERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n"
+    printf("qemu-" TARGET_ARCH " version " QEMU_VERSION QEMU_PKGVERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n"
            "usage: qemu-" TARGET_ARCH " [options] program [arguments...]\n"
            "Linux CPU emulator (compiled for %s emulation)\n"
            "\n"
index ca1c11c478110e2503802dae292524f6c05b22b9..e764b5df4ef06d24977d210df1981209a875583e 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -273,7 +273,7 @@ static void do_info(Monitor *mon, const char *item)
 
 static void do_info_version(Monitor *mon)
 {
-    monitor_printf(mon, "%s\n", QEMU_VERSION);
+    monitor_printf(mon, "%s\n", QEMU_VERSION QEMU_PKGVERSION);
 }
 
 static void do_info_name(Monitor *mon)
diff --git a/vl.c b/vl.c
index e444f9c2c649758ee07b0bcc276fa3f803ec16f6..ddbcc6c2a6bc0a9d339815f5a28075448de6acab 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -3942,7 +3942,7 @@ static int main_loop(void)
 
 static void version(void)
 {
-    printf("QEMU PC emulator version " QEMU_VERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n");
+    printf("QEMU PC emulator version " QEMU_VERSION QEMU_PKGVERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n");
 }
 
 static void help(int exitcode)