-
Notifications
You must be signed in to change notification settings - Fork 10
/
bootstrap
executable file
·46 lines (39 loc) · 1.18 KB
/
bootstrap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
# Copyright 2003 Michael A. Muller <[email protected]>
# Copyright 2009-2011 Google Inc.
# Copyright 2011 Shannon Weyrick <[email protected]>
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# --- embedded python ---
# generate Makefile.am from Makefile.am.in
python <<__eof__
import re
varRx = re.compile(r'(.*)%(\w+)%(.*)', re.DOTALL)
# get the source files
sourceModules = open('sourceModules.txt').read().strip().split('\n')
runtimeModules = open('runtimeModules.txt').read().strip().split('\n')
vars = {
'libCrackSources': sourceModules,
'libRuntimeSources': runtimeModules
}
def expand(dst, m):
sources = vars[m.group(2)]
dst.write(m.group(1) + ' \\\\\n '.join(sources) + m.group(3))
src = open('Makefile.am.in')
dst = open('Makefile.am', 'w')
for line in src:
m = varRx.match(line)
if m:
expand(dst, m)
else:
dst.write(line)
__eof__
# --- end of embedded python ---
if [ ! -e ltmain.sh ]; then libtoolize; fi
aclocal -I m4 --install
autoconf
autoheader
automake --add-missing