~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to srclib/apr/build/win32ver.awk

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
BEGIN {
 
2
 
 
3
  # ff bits: 1(debug), 2(prerelease), 4(patched), 8(vendor) and 32(special)
 
4
  # debug is summed based on the /Define _DEBUG
 
5
  # prerelease is based on the -dev extension,
 
6
  # patched is based on a non-standard "-ver" extension, 
 
7
  # special and vendor are toggled by their args.
 
8
  #
 
9
  ff = 0;
 
10
 
 
11
  file=ARGV[1];
 
12
  desc=ARGV[2];
 
13
  rel_h=ARGV[3];
 
14
 
 
15
  filename = file;
 
16
  if (match(file, /\./)) {
 
17
    sub(/\.[^\.]*$/, "", file);
 
18
  }
 
19
 
 
20
  i = 4;
 
21
  while (length(ARGV[i])) {
 
22
    if (match(ARGV[i], /icon=/)) {
 
23
      icon = substr(ARGV[i], 6);
 
24
    }
 
25
    if (match(ARGV[i], /vendor=/)) {
 
26
      vendor = substr(ARGV[i], 8);
 
27
      ff = ff + 8;
 
28
    }
 
29
    if (match(ARGV[i], /special=/)) {
 
30
      special = substr(ARGV[i], 9);
 
31
      ff = ff + 32;
 
32
    }
 
33
    i = i + 1
 
34
  }
 
35
 
 
36
  i = i - 1;
 
37
  while (i) {
 
38
    delete ARGV[i];
 
39
    i = i - 1;
 
40
  }
 
41
 
 
42
  while ((getline < rel_h) > 0) {
 
43
    if (match ($0, /^#define AP._MAJOR_VERSION/)) {
 
44
      ver_major = $3;
 
45
    }
 
46
    if (match ($0, /^#define AP._MINOR_VERSION/)) {
 
47
      ver_minor = $3;
 
48
    }
 
49
    if (match ($0, /^#define AP._PATCH_VERSION/)) {
 
50
      ver_patch = $3;
 
51
    }
 
52
    if (match ($0, /^#define AP._IS_DEV_VERSION/)) {
 
53
      ver_suffix = "-dev";
 
54
      ver_build = "0";
 
55
    }
 
56
    if (match ($0, /^#undef AP._IS_DEV_VERSION/)) {
 
57
      ver_build = "100";
 
58
    }
 
59
    if (match ($0, /^.*Copyright /)) {
 
60
      copyright = substr($0, RLENGTH + 1);
 
61
    }
 
62
  }
 
63
  ver = ver_major "." ver_minor "." ver_patch ver_suffix;
 
64
  verc = ver_major "," ver_minor "," ver_patch "," ver_build;   
 
65
 
 
66
  if (length(vendor)) {
 
67
    ff = ff + 8;
 
68
  }
 
69
 
 
70
  if (length(icon)) {
 
71
    print "1 ICON DISCARDABLE \"" icon "\"";
 
72
  }
 
73
  print "1 VERSIONINFO";
 
74
  print " FILEVERSION " verc "";
 
75
  print " PRODUCTVERSION " verc "";
 
76
  print " FILEFLAGSMASK 0x3fL";
 
77
  print "#if defined(_DEBUG)"
 
78
  print " FILEFLAGS 0x" sprintf("%02x", ff + 1) "L";
 
79
  print "#else"
 
80
  print " FILEFLAGS 0x" sprintf("%02x", ff) "L";
 
81
  print "#endif"
 
82
  print " FILEOS 0x40004L";
 
83
  print " FILETYPE 0x1L";
 
84
  print " FILESUBTYPE 0x0L";
 
85
  print "BEGIN";
 
86
  print "  BLOCK \"StringFileInfo\"";
 
87
  print "  BEGIN";
 
88
  print "    BLOCK \"040904b0\"";
 
89
  print "    BEGIN";
 
90
  print "    VALUE \"Comments\", "\
 
91
     "\"Licensed under the Apache License, Version 2.0 (the \"\"License\"\"); "\
 
92
     "you may not use this file except in compliance with the License.  "\
 
93
     "You may obtain a copy of the License at\\r\\n\\r\\n"\
 
94
     "http://www.apache.org/licenses/LICENSE-2.0\\r\\n\\r\\n"\
 
95
     "Unless required by applicable law or agreed to in writing, "\
 
96
     "software distributed under the License is distributed on an "\
 
97
     "\"\"AS IS\"\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, "\
 
98
     "either express or implied.  See the License for the specific "\
 
99
     "language governing permissions and limitations under the License.\\0\"";
 
100
  print "      VALUE \"CompanyName\", \"Apache Software Foundation\\0\"";
 
101
  print "      VALUE \"FileDescription\", \"" desc "\\0\"";
 
102
  print "      VALUE \"FileVersion\", \"" ver "\\0\"";
 
103
  print "      VALUE \"InternalName\", \"" file "\\0\"";
 
104
  print "      VALUE \"LegalCopyright\", \"Copyright " copyright "\\0\"";
 
105
  print "      VALUE \"OriginalFilename\", \"" filename "\\0\"";
 
106
  if (vendor) {
 
107
    print "      VALUE \"PrivateBuild\", \"" vendor "\\0\"";
 
108
  }
 
109
  if (special) {
 
110
    print "      VALUE \"SpecialBuild\", \"" vendor "\\0\"";
 
111
  }
 
112
  print "      VALUE \"ProductName\", \"Apache Portable Runtime\\0\"";
 
113
  print "      VALUE \"ProductVersion\", \"" ver "\\0\"";
 
114
  print "    END";
 
115
  print "  END";
 
116
  print "  BLOCK \"VarFileInfo\"";
 
117
  print "  BEGIN";
 
118
  print "    VALUE \"Translation\", 0x409, 1200";
 
119
  print "  END";
 
120
  print "END";
 
121
}