summaryrefslogtreecommitdiff
path: root/src/system.h
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-08-13 22:30:14 +0200
committerJim Meyering <meyering@redhat.com>2008-08-26 18:45:06 +0200
commit0c1fc1c715aa18605eb11c6c25867277824e8f8d (patch)
treeff9bcd27a498b8892e98015a7cd69fb299ed66ab /src/system.h
parentf03a67735a3143ff684fc0ddf4d4c4477019f079 (diff)
downloadcoreutils-0c1fc1c715aa18605eb11c6c25867277824e8f8d.tar.xz
use new global, "Version", rather than macro, VERSION
With this change, a version-string update no longer forces recompilation of 100+ src/*.o files. * src/version.c (Version): New global. New file. * src/version.h: Declare it. * src/Makefile.am: Put it in a library that everyone links to. (noinst_LIBRARIES, libver_a_SOURCES): Define. (LDADD): Add libver.a. (sc_tight_scope): Use perl (was sed), and a more relaxed regexp to build the global-variable-name-recognizing regexp list. * src/system.h: Include "version.h". (case_GETOPT_VERSION_CHAR): Use Version rather than VERSION. * src/basename.c (main): Use Version rather than VERSION. * src/chroot.c (main): Likewise. * src/cksum.c (main): Likewise. * src/dd.c (main): Likewise. * src/dirname.c (main): Likewise. * src/echo.c (main): Likewise. * src/hostid.c (main): Likewise. * src/hostname.c (main): Likewise. * src/link.c (main): Likewise. * src/logname.c (main): Likewise. * src/nice.c (main): Likewise. * src/nohup.c (main): Likewise. * src/printenv.c (main): Likewise. * src/printf.c (main): Likewise. * src/pwd.c (main): Likewise. * src/setuidgid.c (main): Likewise. * src/sleep.c (main): Likewise. * src/sync.c (main): Likewise. * src/test.c (main): Likewise. * src/timeout.c (main): Likewise. * src/true.c (main): Likewise. * src/tsort.c (main): Likewise. * src/unlink.c (main): Likewise. * src/uptime.c (main): Likewise. * src/users.c (main): Likewise. * src/whoami.c (main): Likewise. * src/yes.c (main): Likewise.
Diffstat (limited to 'src/system.h')
-rw-r--r--src/system.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/system.h b/src/system.h
index 4b8e58e1f..e88b1bb3b 100644
--- a/src/system.h
+++ b/src/system.h
@@ -115,6 +115,7 @@ you must include <sys/types.h> before including this file
#include <stdbool.h>
#include <stdlib.h>
+#include "version.h"
/* Exit statuses for programs like 'env' that exec other programs. */
enum
@@ -466,7 +467,7 @@ enum
#define case_GETOPT_VERSION_CHAR(Program_name, Authors) \
case GETOPT_VERSION_CHAR: \
- version_etc (stdout, Program_name, PACKAGE_NAME, VERSION, Authors, \
+ version_etc (stdout, Program_name, PACKAGE_NAME, Version, Authors, \
(char *) NULL); \
exit (EXIT_SUCCESS); \
break;