diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-11-04 23:40:11 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-11-04 23:40:11 +0000 |
commit | 20fb32b3922ea23d4c83b2c54c565bdf95bb4ad5 (patch) | |
tree | 5340e6a084fe49db2d46f9be70304f1e917e7c34 /utils/llvm-build | |
parent | 1688961d4e148638f42c19b8d5ede48c63e28510 (diff) | |
download | external_llvm-20fb32b3922ea23d4c83b2c54c565bdf95bb4ad5.zip external_llvm-20fb32b3922ea23d4c83b2c54c565bdf95bb4ad5.tar.gz external_llvm-20fb32b3922ea23d4c83b2c54c565bdf95bb4ad5.tar.bz2 |
llvm-build: Quote colons in target names, in an attempt to make msys happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143745 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/llvm-build')
-rw-r--r-- | utils/llvm-build/llvmbuild/main.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/utils/llvm-build/llvmbuild/main.py b/utils/llvm-build/llvmbuild/main.py index d361559..698b61d 100644 --- a/utils/llvm-build/llvmbuild/main.py +++ b/utils/llvm-build/llvmbuild/main.py @@ -7,6 +7,19 @@ from util import * ### +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(":", "\\:") + +### + class LLVMProjectInfo(object): @staticmethod def load_infos_from_path(llvmbuild_source_root): @@ -427,7 +440,7 @@ configure_file(\"%s\" # performance of recursive Make systems.""" print >>f, 'ifeq ($(LLVMBUILD_INCLUDE_DEPENDENCIES),1)' print >>f, "# The dependencies for this Makefile fragment itself." - print >>f, "%s: \\" % (output_path,) + print >>f, "%s: \\" % (mk_quote_string_for_target(output_path),) for dep in dependencies: print >>f, "\t%s \\" % (dep,) print >>f @@ -438,7 +451,7 @@ configure_file(\"%s\" # The dummy targets to allow proper regeneration even when files are moved or # removed.""" for dep in dependencies: - print >>f, "%s:" % (dep,) + print >>f, "%s:" % (mk_quote_string_for_target(dep),) print >>f, 'endif' f.close() |