1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/utils/llvm-lit/Makefile
NAKAMURA Takumi 480ca6a46d utils/llvm-lit: Generate "llvm-lit.py" rather than "llvm-lit" on Win32 hosts to let llvm-lit.py --use-processes work.
llvm-lit needs suffix.py for multiprocess to find a main module.

llvm-svn: 196328
2013-12-03 23:22:18 +00:00

28 lines
857 B
Makefile

##===- utils/llvm-lit/Makefile -----------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
include $(LEVEL)/Makefile.common
# llvm-lit needs suffix.py for multiprocess to find a main module.
ifeq ($(HOST_OS),MingW)
Suffix := .py
endif
all:: $(ToolDir)/llvm-lit$(Suffix)
$(ToolDir)/llvm-lit$(Suffix): llvm-lit.in Makefile $(ToolDir)/.dir
$(Echo) "Creating 'llvm-lit' script..."
$(Verb)$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
$(Verb)$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
$(Verb)sed -f lit.tmp $< > $@
$(Verb)chmod +x $@
$(Verb)rm -f lit.tmp