[llvm-commits] [llvm] r143629 - /llvm/trunk/utils/llvm-build/llvmbuild/main.py
Daniel Dunbar
daniel at zuster.org
Thu Nov 3 10:56:31 PDT 2011
Author: ddunbar
Date: Thu Nov 3 12:56:31 2011
New Revision: 143629
URL: http://llvm.org/viewvc/llvm-project?rev=143629&view=rev
Log:
llvm-build: Update --write-llvmbuild to write out a standard LLVM style file
header.
Modified:
llvm/trunk/utils/llvm-build/llvmbuild/main.py
Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/main.py?rev=143629&r1=143628&r2=143629&view=diff
==============================================================================
--- llvm/trunk/utils/llvm-build/llvmbuild/main.py (original)
+++ llvm/trunk/utils/llvm-build/llvmbuild/main.py Thu Nov 3 12:56:31 2011
@@ -162,6 +162,31 @@
# 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)
More information about the llvm-commits
mailing list