#!/usr/bin/env python for line in open("headerFiles.list", "r").readlines(): name = line.strip() prefix = name.replace(".h", "") print """%(name)s.5D: %(name)s.sign \t$(FIND_5D_EXPORTS) %(name)s.sign >%(name)s.5D.new && mv %(name)s.5D.new %(name)s.5D %(name)s.sign: %(name)s.symbols prototypes \t../generateSignatures $< $(NATIVE_XML2_LIB) xml >%(name)s.sign.new && mv %(name)s.sign.new %(name)s.sign %(name)s.symbols: \t./extractFunctionNames %(name)s > %(name)s.symbols.new && mv %(name)s.symbols.new %(name)s.symbols all: %(name)s.5D """ % {"name": prefix}