From bcc8b3be5568b4dd3cecfd3ebd613325c49c67b3 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Thu, 3 May 2012 23:45:51 -0700 Subject: [PATCH] Move the cctools source version number into version.mak Also have version.c now use that rather than being hard coded. --- Makefile | 4 ++-- version.c | 7 ++++++- version.mak | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 version.mak diff --git a/Makefile b/Makefile index 85bed45..57f7771 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ # dealings in this Software without prior written authorization from the # author(s). -CCTOOLSVER = 822 +include version.mak .PHONY : all clean @@ -95,7 +95,7 @@ else ARCH += -isysroot$(XSDK)/MacOSX10.5.sdk endif -COPTS += -include preinc.h +COPTS += -include preinc.h -DCCTOOLSVER=$(CCTOOLSVER) LDOPTS = -Wl,-no_uuid -Wl,-dead_strip LDOPTS += $(LDEXTRA) diff --git a/version.c b/version.c index 891ee01..d5cb8e5 100644 --- a/version.c +++ b/version.c @@ -17,8 +17,13 @@ extern const char apple_version[]; #else #define ARCHNAME #endif +#ifdef CCTOOLSVER +#define CCTOOLSVERSTR "-"STRINGIZE_PN(CCTOOLSVER) +#else +#define CCTOOLSVERSTR +#endif __attribute__((__used__)) const char apple_version[] = /* Create a string that is compatible with the ident program */ "@(#)$PROGRAM: " STRINGIZE_PN(PROGRAMNAME) ARCHNAME - " PROJECT: cctools-822 $" + " PROJECT: cctools"CCTOOLSVERSTR" $" ; diff --git a/version.mak b/version.mak new file mode 100644 index 0000000..2427b2b --- /dev/null +++ b/version.mak @@ -0,0 +1,5 @@ +# The cctools version suffix these sources are based on +# The tarball can be found at: +# http://opensource.apple.com/tarballs/cctools/cctools-$(CCTOOLSVER).tar.gz + +CCTOOLSVER = 822 -- 2.11.4.GIT