summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-11-03 17:56:31 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-11-03 17:56:31 +0000
commitfb6d79a58e710b3b4aef34ecacc28603b6d5042e (patch)
treea7ffc99b0635895a85401ff26e662e1f71f9fd12 /utils
parentefe2f644ec15913aa84460bb7ac97b8fa6164b3f (diff)
downloadllvm-fb6d79a58e710b3b4aef34ecacc28603b6d5042e.tar.gz
llvm-fb6d79a58e710b3b4aef34ecacc28603b6d5042e.tar.bz2
llvm-fb6d79a58e710b3b4aef34ecacc28603b6d5042e.tar.xz
llvm-build: Update --write-llvmbuild to write out a standard LLVM style file
header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143629 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/llvm-build/llvmbuild/main.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/utils/llvm-build/llvmbuild/main.py b/utils/llvm-build/llvmbuild/main.py
index 892242dc30..9baf2c0816 100644
--- a/utils/llvm-build/llvmbuild/main.py
+++ b/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)