From e2906f1219860145b2449a8236cf5ff6c30ce19d Mon Sep 17 00:00:00 2001 From: z3APA3A <3APA3A@3proxy.ru> Date: Sat, 21 Apr 2018 03:26:49 +0300 Subject: [PATCH] pass version thorugh building environment --- .gitignore | 1 + Makefile.msvc | 7 +++++-- Makefile.msvc64 | 4 ++-- Makefile.msvcARM64 | 4 ++-- Makefile.watcom | 4 ++-- src/plugins/PCREPlugin/config.h | 2 ++ src/version.h | 2 +- 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 55f9e3d..f213c79 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ tmp/ *.err res version.c +version 3proxy.res src/3proxy diff --git a/Makefile.msvc b/Makefile.msvc index 5e08524..f2636be 100644 --- a/Makefile.msvc +++ b/Makefile.msvc @@ -8,7 +8,7 @@ BUILDDIR = ../bin/ CC = cl -CFLAGS = /nologo /MT /W3 /Ox /GS /EHs- /GA /GF /D "MSVC" /D "WITH_STD_MALLOC" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c +CFLAGS = /nologo /MT /W3 /Ox /GS /EHs- /GA /GF /D "MSVC" /D "WITH_STD_MALLOC" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c $(VERSION) $(BUILDDATE) COUT = /Fo LN = link LDFLAGS = /nologo /subsystem:console /incremental:no /machine:I386 @@ -30,11 +30,14 @@ COMPATLIBS = MAKEFILE = Makefile.msvc PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin FilePlugin SSLPlugin VERFILE = $(VERFILE) +VERSION = $(VERSION) +BUILDDATE = $(BUILDDATE) + include Makefile.inc ../3proxy.res: - rc /fo../3proxy.res ../3proxy.rc + rc /fo../3proxy.res ../3proxy.rc $(VERSION) $(BUILDDATE) 3proxyres.obj: ../3proxy.res cvtres /out:3proxyres.obj /MACHINE:I386 ../3proxy.res diff --git a/Makefile.msvc64 b/Makefile.msvc64 index 961403a..fdbf35f 100644 --- a/Makefile.msvc64 +++ b/Makefile.msvc64 @@ -8,7 +8,7 @@ BUILDDIR = ../bin64/ CC = cl -CFLAGS = /nologo /MT /W3 /Ox /EHs- /GS /GA /GF /D "MSVC" /D "WITH_STD_MALLOC" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c +CFLAGS = /nologo /MT /W3 /Ox /EHs- /GS /GA /GF /D "MSVC" /D "WITH_STD_MALLOC" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c $(VERSION) $(BUILDDATE) COUT = /Fo LN = link LDFLAGS = /nologo /subsystem:console /incremental:no /machine:x64 @@ -40,7 +40,7 @@ VERFILE = $(VERFILE) include Makefile.inc ../3proxy.res: - rc /fo../3proxy.res ../3proxy.rc + rc /fo../3proxy.res ../3proxy.rc $(VERSION) $(BUILDDATE) 3proxyres.obj: ../3proxy.res cvtres /out:3proxyres.obj /machine:x64 ../3proxy.res diff --git a/Makefile.msvcARM64 b/Makefile.msvcARM64 index 9051fd3..a7c5586 100644 --- a/Makefile.msvcARM64 +++ b/Makefile.msvcARM64 @@ -8,7 +8,7 @@ BUILDDIR = ../bin64/ CC = cl -CFLAGS = /nologo /MT /W3 /Ox /EHs- /GS /GA /GF /D "MSVC" /D "WITH_STD_MALLOC" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c +CFLAGS = /nologo /MT /W3 /Ox /EHs- /GS /GA /GF /D "MSVC" /D "WITH_STD_MALLOC" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c $(VERSION) $(BUILDDATE) COUT = /Fo LN = link LDFLAGS = /nologo /subsystem:console /incremental:no /machine:arm64 @@ -40,7 +40,7 @@ VERFILE = $(VERFILE) include Makefile.inc ../3proxy.res: - rc /fo../3proxy.res ../3proxy.rc + rc /fo../3proxy.res ../3proxy.rc $(VERSION) $(BUILDDATE) 3proxyres.obj: ../3proxy.res cvtres /out:3proxyres.obj /machine:x64 ../3proxy.res diff --git a/Makefile.watcom b/Makefile.watcom index 9ebbfac..1889883 100644 --- a/Makefile.watcom +++ b/Makefile.watcom @@ -8,7 +8,7 @@ BUILDDIR = ../bin/ CC = cl -CFLAGS = /nologo /Ox /MT /D "NOIPV6" /D "NODEBUG" /D "NOODBC" /D "NORADIUS" /D"WATCOM" /D "MSVC" /D "WITH_STD_MALLOC" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /c +CFLAGS = /nologo /Ox /MT /D "NOIPV6" /D "NODEBUG" /D "NOODBC" /D "NORADIUS" /D"WATCOM" /D "MSVC" /D "WITH_STD_MALLOC" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /c $(VERSION) $(BUILDDATE) COUT = /Fo LN = link LDFLAGS = /nologo /subsystem:console /incremental:no @@ -34,7 +34,7 @@ VERFILE = $(VERFILE) include Makefile.inc ../3proxy.res: - rc /fo../3proxy.res ../3proxy.rc + rc /fo../3proxy.res ../3proxy.rc $(VERSION) $(BUILDDATE) 3proxyres.obj: ../3proxy.res cvtres /out:3proxyres.obj ../3proxy.res diff --git a/src/plugins/PCREPlugin/config.h b/src/plugins/PCREPlugin/config.h index b8f3237..50e6ee5 100644 --- a/src/plugins/PCREPlugin/config.h +++ b/src/plugins/PCREPlugin/config.h @@ -337,7 +337,9 @@ sure both macros are undefined; an emulation function will then be used. */ /* #undef SUPPORT_VALGRIND */ /* Version number of package */ +#ifndef VERSION #define VERSION "8.39" +#endif /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/src/version.h b/src/version.h index 8c92d86..834f050 100644 --- a/src/version.h +++ b/src/version.h @@ -2,5 +2,5 @@ #define VERSION "3proxy-0.9-devel" #endif #ifndef BUILDDATE -#define BUILDDATE __DATE__ ", " __TIME__ +#define BUILDDATE "" #endif