diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-11-03 17:56:31 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-11-03 17:56:31 +0000 |
commit | 453146e569b1f81c746c3aab1f685e0b051956be (patch) | |
tree | be85f9728cd08e3c969683ae980f6b5e5155a13d /llvm/utils/llvm-build | |
parent | 445e8f9d3554979a74bf7418be0b5878bc68b355 (diff) | |
download | bcm5719-llvm-453146e569b1f81c746c3aab1f685e0b051956be.tar.gz bcm5719-llvm-453146e569b1f81c746c3aab1f685e0b051956be.zip |
llvm-build: Update --write-llvmbuild to write out a standard LLVM style file
header.
llvm-svn: 143629
Diffstat (limited to 'llvm/utils/llvm-build')
-rw-r--r-- | llvm/utils/llvm-build/llvmbuild/main.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/utils/llvm-build/llvmbuild/main.py b/llvm/utils/llvm-build/llvmbuild/main.py index 892242dc30e..9baf2c0816e 100644 --- a/llvm/utils/llvm-build/llvmbuild/main.py +++ b/llvm/utils/llvm-build/llvmbuild/main.py @@ -162,6 +162,31 @@ class LLVMProjectInfo(object): # Create the LLVMBuild file. file_path = os.path.join(directory_path, 'LLVMBuild.txt') f = open(file_path, "w") + + # Write the header. + header_fmt = ';===- %s %s-*- Conf -*--===;' + header_name = '.' + os.path.join(subpath, 'LLVMBuild.txt') + header_pad = '-' * (80 - len(header_fmt % (header_name, ''))) + header_string = header_fmt % (header_name, header_pad) + print >>f, """\ +%s +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; +""" % header_string + for i,fragment in enumerate(fragments): print >>f, '[component_%d]' % i f.write(fragment) |