~ubuntu-branches/ubuntu/trusty/serf/trusty-security

« back to all changes in this revision

Viewing changes to serfmake

  • Committer: Bazaar Package Importer
  • Author(s): Peter Samuelson
  • Date: 2011-06-27 18:09:28 UTC
  • mfrom: (1.2.5 upstream)
  • mto: (3.3.1 sid)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20110627180928-ybwzd3hmx82nu3ir
Tags: 1.0.0~0+svn1514-1
* New upstream snapshot.
  - patches/abi-0.x: Remove as obsolete.
  - patches/kqueue: Forward-port.
  - Bump ABI: libserf0.7{,-dbg} -> libserf1{,-dbg}
  - patches/ip6-localhost: New patch: temporary (I hope) workaround for
    IPv4 / IPv6 confusion in testsuite.
* Implement Multi-Arch: same.
* libserf-dev Conflicts: libserf-0-0-dev, not Breaks.  Thanks, lintian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
import shutil
6
6
import sys
7
7
import stat
 
8
import copy
 
9
 
 
10
LIBNAME = 'libserf-1'
 
11
INCLUDES = 'serf-1'
8
12
 
9
13
FILES_HDR = [
10
14
  ('.', 'serf'),
16
20
  ('.', 'context'),
17
21
  ('.', 'incoming'),
18
22
  ('.', 'outgoing'),
 
23
  ('.', 'ssltunnel'),
19
24
 
20
25
  ('buckets', 'aggregate_buckets'),
21
26
  ('buckets', 'request_buckets'),
33
38
  ('buckets', 'ssl_buckets'),
34
39
  ('buckets', 'barrier_buckets'),
35
40
  ('buckets', 'chunk_buckets'),
 
41
  ('buckets', 'iovec_buckets'),
36
42
  ('auth', 'auth'),
37
43
  ('auth', 'auth_basic'),
38
44
  ('auth', 'auth_digest'),
46
52
  ('test', 'test_context'),
47
53
  ('test', 'test_buckets'),
48
54
  ('test', 'test_ssl'),
 
55
  ('test/server', 'test_server'),
49
56
  ]
50
57
 
51
58
TEST_HDR_FILES = [
121
128
 
122
129
def cmd_build(param):
123
130
  builder = Builder(param)
124
 
  builder.build_target(File('.', 'libserf-0', 'la'), False)
 
131
  builder.build_target(File('.', LIBNAME, 'la'), False)
125
132
 
126
133
 
127
134
def cmd_install(param):
128
135
  builder = Builder(param)
129
 
  builder.install_target(File('.', 'libserf-0', 'la'), False)
 
136
  builder.install_target(File('.', LIBNAME, 'la'), False)
130
137
 
131
138
 
132
139
def cmd_check(param):
149
156
def cmd_clean(param):
150
157
  targets = [File(dirpath, fname, 'o') for dirpath, fname in LIB_FILES]
151
158
  targets += [File(dirpath, fname, 'lo') for dirpath, fname in LIB_FILES]
152
 
  targets += [File('.', 'libserf-0', 'la')]
 
159
  targets += [File('.', LIBNAME, 'la')]
153
160
  targets += [File(dirpath, fname, 'o') for dirpath, fname in TEST_FILES]
154
161
  targets += [File(dirpath, fname, 'lo') for dirpath, fname in TEST_FILES]
155
162
  targets += [File(dirpath, fname, None) for dirpath, fname in TEST_FILES]
177
184
 
178
185
    try:
179
186
      self.libdir = os.path.join(params['prefix'], 'lib')
180
 
      self.includedir = os.path.join(params['prefix'], 'include', 'serf-0')
 
187
      self.includedir = os.path.join(params['prefix'], 'include', INCLUDES)
181
188
    except:
182
189
      self.libdir = '/usr/local/lib'
183
 
      self.includedir = '/usr/local/include/serf-0'
 
190
      self.includedir = '/usr/local/include/' + INCLUDES
184
191
 
185
192
    self.load_vars()
186
193
    self.load_deps()
220
227
 
221
228
    self.hdrs = hdrs
222
229
 
223
 
    lib = File('.', 'libserf-0', 'la')
 
230
    lib = File('.', LIBNAME, 'la')
224
231
    cmd = '%s --silent --mode=link %s %s -rpath %s -o %s %s %s' % (
225
232
      self.LIBTOOL, self.CC, self.LDFLAGS, self.libdir,
226
233
      lib.fname, ' '.join([l.fname for l in libobjs]), self.LIBS)
227
234
    self._add_dep(lib, libobjs, cmd)
228
235
 
229
236
    # load the test program dependencies now
230
 
    testhdrs = hdrs
 
237
    testhdrs = copy.deepcopy(hdrs)
231
238
    testhdrs += [File(dirpath, fname, 'h') for dirpath, fname in TEST_HDR_FILES]
232
239
    testdeps = [File(dirpath, fname, 'c') for dirpath, fname in TEST_DEPS]
233
240
    testobjs = [File(dirpath, fname, 'lo') for dirpath, fname in TEST_DEPS]