[llvm] r329191 - Remove llvm-build's --write-make-fragment which looks like a remnant from the autoconf build.

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 4 06:23:24 PDT 2018


Author: nico
Date: Wed Apr  4 06:23:24 2018
New Revision: 329191

URL: http://llvm.org/viewvc/llvm-project?rev=329191&view=rev
Log:
Remove llvm-build's --write-make-fragment which looks like a remnant from the autoconf build.

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=329191&r1=329190&r2=329191&view=diff
==============================================================================
--- llvm/trunk/utils/llvm-build/llvmbuild/main.py (original)
+++ llvm/trunk/utils/llvm-build/llvmbuild/main.py Wed Apr  4 06:23:24 2018
@@ -38,17 +38,6 @@ def cmake_quote_path(value):
 
     return value
 
-def mk_quote_string_for_target(value):
-    """
-    mk_quote_string_for_target(target_name) -> str
-
-    Return a quoted form of the given target_name suitable for including in a
-    Makefile as a target name.
-    """
-
-    # The only quoting we currently perform is for ':', to support msys users.
-    return value.replace(":", "\\:")
-
 def make_install_dir(path):
     """
     make_install_dir(path) -> None
@@ -651,87 +640,6 @@ set_property(TARGET %s PROPERTY IMPORTED
 
         f.close()
 
-    def write_make_fragment(self, output_path, enabled_optional_components):
-        """
-        write_make_fragment(output_path) -> None
-
-        Generate a Makefile fragment which includes all of the collated
-        LLVMBuild information in a format that is easily digestible by a
-        Makefile. The exact contents of this are closely tied to how the LLVM
-        Makefiles integrate LLVMBuild, see Makefile.rules in the top-level.
-        """
-
-        dependencies = list(self.get_fragment_dependencies())
-
-        # Write out the Makefile fragment.
-        make_install_dir(os.path.dirname(output_path))
-        f = open(output_path, 'w')
-
-        # Write the header.
-        header_fmt = '\
-#===-- %s - LLVMBuild Configuration for LLVM %s-*- Makefile -*--===#'
-        header_name = os.path.basename(output_path)
-        header_pad = '-' * (80 - len(header_fmt % (header_name, '')))
-        header_string = header_fmt % (header_name, header_pad)
-        f.write("""\
-%s
-#
-#                     The LLVM Compiler Infrastructure
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-#
-#===------------------------------------------------------------------------===#
-#
-# This file contains the LLVMBuild project information in a format easily
-# consumed by the Makefile based build system.
-#
-# This file is autogenerated by llvm-build, do not edit!
-#
-#===------------------------------------------------------------------------===#
-
-""" % header_string)
-
-        # Write the dependencies for the fragment.
-        #
-        # FIXME: Technically, we need to properly quote for Make here.
-        f.write("""\
-# Clients must explicitly enable LLVMBUILD_INCLUDE_DEPENDENCIES to get
-# these dependencies. This is a compromise to help improve the
-# performance of recursive Make systems.
-""")
-        f.write('ifeq ($(LLVMBUILD_INCLUDE_DEPENDENCIES),1)\n')
-        f.write("# The dependencies for this Makefile fragment itself.\n")
-        f.write("%s: \\\n" % (mk_quote_string_for_target(output_path),))
-        for dep in dependencies:
-            f.write("\t%s \\\n" % (dep,))
-        f.write('\n')
-
-        # Generate dummy rules for each of the dependencies, so that things
-        # continue to work correctly if any of those files are moved or removed.
-        f.write("""\
-# The dummy targets to allow proper regeneration even when files are moved or
-# removed.
-""")
-        for dep in dependencies:
-            f.write("%s:\n" % (mk_quote_string_for_target(dep),))
-        f.write('endif\n')
-
-        f.write("""
-# List of libraries to be exported for use by applications.
-# See 'cmake/modules/Makefile'.
-LLVM_LIBS_TO_EXPORT :=""")
-        self.foreach_cmake_library(
-            lambda ci:
-                f.write(' \\\n  %s' % ci.get_prefixed_library_name())
-            ,
-            enabled_optional_components,
-            skip_disabled = True,
-            skip_not_installed = True # Do not export internal libraries like gtest
-            )
-        f.write('\n')
-        f.close()
-
 def add_magic_target_components(parser, project, opts):
     """add_magic_target_components(project, opts) -> None
 
@@ -877,10 +785,6 @@ def main():
                      dest="write_cmake_exports_fragment", metavar="PATH",
                      help="Write the CMake exports information to PATH",
                      action="store", default=None)
-    group.add_option("", "--write-make-fragment",
-                      dest="write_make_fragment", metavar="PATH",
-                     help="Write the Makefile project information to PATH",
-                     action="store", default=None)
     group.add_option("", "--configure-target-def-file",
                      dest="configure_target_def_files",
                      help="""Configure the given file at SUBPATH (relative to
@@ -951,11 +855,6 @@ given by --build-root) at the same SUBPA
         project_info.write_library_table(opts.write_library_table,
                                          opts.optional_components)
 
-    # Write out the make fragment, if requested.
-    if opts.write_make_fragment:
-        project_info.write_make_fragment(opts.write_make_fragment,
-                                         opts.optional_components)
-
     # Write out the cmake fragment, if requested.
     if opts.write_cmake_fragment:
         project_info.write_cmake_fragment(opts.write_cmake_fragment,




More information about the llvm-commits mailing list