From: William A. Rowe Jr Date: Thu, 12 Jan 2006 16:17:30 +0000 (+0000) Subject: Determined that yes; apr_general.h may be included in .rc files, X-Git-Tag: 2.2.1~149 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=702eb61aa8c784cb30dc9dccd07149543ee4a9fb;p=thirdparty%2Fapache%2Fhttpd.git Determined that yes; apr_general.h may be included in .rc files, so eliminate a substitute declaration. Correct version and copyright generation, this involves 'long line' flavor of the first ASF copyright line; next step will be no more awk generation of .rc files, so there we will use the new macro AP_SERVER_COPYRIGHT and defined tokens from this file for versions. Backports; 368395 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@368396 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/build/win32/win32ver.awk b/build/win32/win32ver.awk index 739bf877088..0f4f8de24e5 100644 --- a/build/win32/win32ver.awk +++ b/build/win32/win32ver.awk @@ -50,35 +50,37 @@ BEGIN { } while ((getline < rel_h) > 0) { - if (match ($0, /^.*Copyright /)) { + if (match ($0, /^.*\* Copyright /)) { copyright = substr($0, RLENGTH + 1); } - if (match ($0, /^#define AP_SERVER_MAJORVERSION_NUMBER [^*]/)) { + if (match ($0, /^#define AP_SERVER_MAJORVERSION_NUMBER /)) { ver_major = $3; } - else if (match ($0, /^#define AP_SERVER_MINORVERSION_NUMBER [^*]/)) { + else if (match ($0, /^#define AP_SERVER_MINORVERSION_NUMBER /)) { ver_minor = $3; } - else if (match ($0, /^#define AP_SERVER_PATCHLEVEL_NUMBER [^*]/)) { + else if (match ($0, /^#define AP_SERVER_PATCHLEVEL_NUMBER /)) { ver_patch = $3; } - else if (match ($0, /^#define AP_SERVER_ADD_STRING [^"]+"/)) { - ver_patch_modifier = substr($3, 2, length($3) - 2); + else if (match ($0, /^#define AP_SERVER_DEVBUILD_BOOLEAN /)) { + ver_devbuild = $3; + } + else if (match ($0, /^#define AP_SERVER_ADD_STRING +"[^"]+"/)) { + ver_build = substr($3, 2, length($3) - 2); } } - ver = ver_major "." ver_minor "." ver_patch ver_patch_modifier; - verc = ver_major "," ver_minor "," ver_patch; - if (build) { - sub(/-.*/, "", verc) - verc = verc "," build; - } else if (sub(/-dev/, ",0", verc)) { - ff = ff + 2; - } else if (!sub(/-alpha/, ",10", verc) \ - && !sub(/-beta/, ",100", verc) \ - && !sub(/-gold/, ",200", verc)) { - sub(/-.*/, "", verc); - verc = verc "," 0; + ver = ver_major "." ver_minor "." ver_patch; + if (!ver_devbuild) { + verc = ver_major "," ver_minor "," ver_patch; + } else if (!match (ver_build, /-dev/)) { + ff = ff + 2; + verc = ver_major "," ver_minor "," ver_patch "," 100; + ver = ver ver_build; + } else { + ff = ff + 2; + verc = ver_major "," ver_minor "," ver_patch "," 0; + ver = ver ver_build; } if (length(vendor)) { diff --git a/include/ap_release.h b/include/ap_release.h index a5bf7b72b60..3879bb4d719 100644 --- a/include/ap_release.h +++ b/include/ap_release.h @@ -1,5 +1,4 @@ -/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as - * applicable. +/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,13 +21,11 @@ #ifndef AP_RELEASE_H #define AP_RELEASE_H -/* The numeric compile-time version constants. These constants are the - * authoritative version numbers for APR. - */ -/** Properly quote a value as a string in the C preprocessor */ -#define AP_STRINGIFY(n) AP_STRINGIFY_HELPER(n) -/** Helper macro for AP_STRINGIFY */ -#define AP_STRINGIFY_HELPER(n) #n +#include "apr_general.h" /* stringify */ + +#define AP_SERVER_COPYRIGHT \ + "Copyright 2001-2005 The Apache Software Foundation " \ + "or its licensors, as applicable." /* * The below defines the base string of the Server: header. Additional @@ -57,9 +54,9 @@ #endif /* keep old macros as well */ -#define AP_SERVER_MAJORVERSION AP_STRINGIFY(AP_SERVER_MAJORVERSION_NUMBER) -#define AP_SERVER_MINORVERSION AP_STRINGIFY(AP_SERVER_MINORVERSION_NUMBER) -#define AP_SERVER_PATCHLEVEL AP_STRINGIFY(AP_SERVER_PATCHLEVEL_NUMBER) \ +#define AP_SERVER_MAJORVERSION APR_STRINGIFY(AP_SERVER_MAJORVERSION_NUMBER) +#define AP_SERVER_MINORVERSION APR_STRINGIFY(AP_SERVER_MINORVERSION_NUMBER) +#define AP_SERVER_PATCHLEVEL APR_STRINGIFY(AP_SERVER_PATCHLEVEL_NUMBER) \ AP_SERVER_ADD_STRING #define AP_SERVER_MINORREVISION AP_SERVER_MAJORVERSION "." AP_SERVER_MINORVERSION diff --git a/support/win32/ApacheMonitor.dsp b/support/win32/ApacheMonitor.dsp index 14616aa991e..42f8575b254 100644 --- a/support/win32/ApacheMonitor.dsp +++ b/support/win32/ApacheMonitor.dsp @@ -43,11 +43,11 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /Oy- /Zi /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "STRICT" /Fd"Release/ApacheMonitor_src" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /Oy- /Zi /I "../../include" /I "../../srclib/apr/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "STRICT" /Fd"Release/ApacheMonitor_src" /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /i "../../include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "../../include" /I "../../srclib/apr/include" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo @@ -69,11 +69,11 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "STRICT" /Fd"Debug/ApacheMonitor_src" /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /I "../../srclib/apr/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "STRICT" /Fd"Debug/ApacheMonitor_src" /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /i "../../include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "../../include" /I "../../srclib/apr/include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo