Lines Matching refs:fd

198     def gen_gnumake(self, pkg_arch,fd):  argument
201fd.write('%(stem)s.%(lang)s := %(srcs)s\n' % dict(stem=stem, lang=lang.replace('_','.'), srcs=' '.…
207 def gen_ninja(self, fd): argument
214fd.write('build %(obj)s : %(lang)s_COMPILE %(src)s\n' % dict(obj=obj, lang=lang.upper(), src=os.pa…
216 fd.write('\n')
217fd.write('build $libdir/libpetsc.so : %s_LINK_SHARED %s\n\n' % ('CF'[self.have_fortran], ' '.join(…
218 fd.write('build petsc : phony || $libdir/libpetsc.so\n\n')
222 with open(arch_files, 'w') as fd:
223 gendeps = petsc.gen_gnumake(pkg_arch,fd)
224 fd.write('\n')
225 fd.write('# Dependency to regenerate this file\n')
226 fd.write('%s : %s %s\n' % (os.path.relpath(arch_files, petsc.pkg_dir),
229 fd.write('\n')
230 fd.write('# Dummy dependencies in case makefiles are removed\n')
231 fd.write(''.join([dep + ':\n' for dep in gendeps]))
238 with open(build_ninja, 'w') as fd:
239 fd.write('objdir = obj-ninja\n')
240 fd.write('libdir = lib\n')
241 fd.write('c_compile = %(PCC)s\n' % conf)
242 fd.write('c_flags = %(PETSC_CC_INCLUDES)s %(PCC_FLAGS)s %(CCPPFLAGS)s\n' % conf)
243 fd.write('c_link = %(PCC_LINKER)s\n' % conf)
244 fd.write('c_link_flags = %(PCC_LINKER_FLAGS)s\n' % conf)
246 fd.write('f_compile = %(FC)s\n' % conf)
247 fd.write('f_flags = %(PETSC_FC_INCLUDES)s %(FC_FLAGS)s %(FCPPFLAGS)s\n' % conf)
248 fd.write('f_link = %(FC_LINKER)s\n' % conf)
249 fd.write('f_link_flags = %(FC_LINKER_FLAGS)s\n' % conf)
250 fd.write('petsc_external_lib = %(PETSC_EXTERNAL_LIB_BASIC)s\n' % conf)
251 fd.write('python = %(PYTHON)s\n' % conf)
252 fd.write('\n')
253 fd.write('rule C_COMPILE\n'
259 fd.write('rule C_LINK_SHARED\n'
264 fd.write('rule F_COMPILE\n'
269 fd.write('rule F_LINK_SHARED\n'
273 fd.write('rule GEN_NINJA\n'
277 petsc.gen_ninja(fd)
278 fd.write('\n')
279 fd.write('build %s : GEN_NINJA | %s %s %s %s\n' % (build_ninja,