Changeset 222
- Timestamp:
- 04/02/11 17:27:39 (14 years ago)
- Files:
-
- 2 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SConstruct
r221 r222 9 9 win32_targets=('reglookup-win32-trunk.zip',) 10 10 doc_targets=('reglookup-doc-trunk.tar.gz',) 11 all_targets = source_targets+win32_targets+doc_targets 11 12 12 13 def target2version(target): 13 return target.split('-')[2].split('.')[0] 14 chunks = target.split('-') 15 if len(chunks) != 3: 16 return None 17 return chunks[2].split('.')[0] 14 18 15 19 def version2input(version): … … 31 35 rm -rf .release && mkdir -p .release/%s 32 36 cp %s/src/*.exe .release/%s 33 cp win32/libiconv/bin/*.dll win32/libpthreads/bin/*.dll win32/libtalloc/bin/*.dll .release/%s37 cp win32/libiconv/bin/*.dll win32/libpthreads/bin/*.dll win32/libtalloc/bin/*.dll trunk/lib/*.dll .release/%s 34 38 cd .release && zip -r %s.zip %s 35 39 mv .release/%s.zip . && rm -rf .release … … 73 77 libtalloc_path+'lib'] 74 78 env['LIBS']=['m', libpthread_name, 'iconv', 'regfi', 'talloc'] 79 80 # Third-party dependencies 81 extra_obj=['%s/lib/lib%s.a' % (libpthreads_path, libpthread_name), 82 libiconv_path+'/lib/libiconv.dll.a', 83 libtalloc_path+'/lib/libtalloc.dll.a'] 75 84 76 77 # Libraries85 # Build libregfi.dll 86 # Core regfi source 78 87 lib_src = [input_prefix+'lib/regfi.c', 79 88 input_prefix+'lib/winsec.c', … … 81 90 input_prefix+'lib/lru_cache.c', 82 91 input_prefix+'lib/void_stack.c'] 83 libregfi_static = env.Library(lib_src)92 regfi_o = env.Object(lib_src) 84 93 85 extra_obj=['%s/lib/lib%s.a' % (libpthreads_path, libpthread_name), 86 libiconv_path+'/lib/libiconv.dll.a', 87 libtalloc_path+'/lib/libtalloc.dll.a', 88 input_prefix+'lib/libregfi.a',] 94 regfi_obj = [] 95 for s in lib_src: 96 regfi_obj.append(s[0:-1]+'o') 97 98 env.Command(input_prefix+'lib/libregfi.o', regfi_o+extra_obj, 99 'i586-mingw32msvc-dlltool --export-all-symbols' 100 +' --dllname libregfi.dll -e $TARGET' 101 +' -l %slib/libregfi.dll.a %s' 102 % (input_prefix, ' '.join(regfi_obj))) 103 104 env.Command(input_prefix+'lib/libregfi.dll', 105 input_prefix+'lib/libregfi.o', 106 'i586-mingw32msvc-gcc --shared -o $TARGET $SOURCE %s' 107 % ' '.join(regfi_obj+extra_obj)) 89 108 90 109 # Executables … … 99 118 elif t in doc_targets: 100 119 ret_val += doc_cmds % (t_base,t_base,t_base,t_base,t_base) 101 102 else:103 return '#ERROR: cannot build "%s". Acceptable targets: %s'\104 % (t, repr(source_targets+win32_targets+doc_targets))105 120 106 121 return ret_val … … 117 132 env['BUILDERS']['Release'] = release_builder 118 133 134 if len(COMMAND_LINE_TARGETS) == 0: 135 print('Acceptable targets: %s' % repr(all_targets)) 119 136 120 137 for target in COMMAND_LINE_TARGETS: 138 AlwaysBuild(target) 139 if target not in all_targets: 140 print('ERROR: cannot build "%s". Acceptable targets: %s' 141 % (target, repr(all_targets))) 142 break 121 143 env.Release(target, Dir(version2input(target2version(target)))) 122 144 123 124 145 Default(None)
Note: See TracChangeset
for help on using the changeset viewer.