Vladimir Merzliakov
2005-Mar-01 16:21 UTC
[LLVMdev] Typo in Makefile.rules and suugestion for Makefile.config.in
1) I find typo in Makefile.rules in printvars rule: - $(Echo) "Preconditions: " '$(Preconditions)' + $(Echo) "PreConditions: " '$(PreConditions)' 2) In Makefile.config.in PROJ_SRC_DIR define for LLVM build mode as PROJ_SRC_DIR := $(subst //,/,$(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) and for other project build mode as PROJ_SRC_DIR := $(subst //,/,$(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) This two definition is equal (in LLVM build mode $(LLVM_SRC_ROOT) == $(PROJ_SRC_ROOT) ) and have common problem. If generated Makefile.config used in Makefile not in root of project object tree $(PROJ_SRC_DIR) != $(PROJ_SRC_ROOT) it set PROJ_SRC_DIR to correct not slash terminated path. But if it used in Makefile in root of project object tree $(PROJ_SRC_DIR)==$(PROJ_SRC_ROOT) it set PROJ_SRC_DIR to "$(PROJ_SRC_ROOT)/" instead "$(PROJ_SRC_ROOT)" I suggest replace this lines by code: ifeq ($(PROJ_OBJ_DIR),$(PROJ_OBJ_ROOT)) PROJ_SRC_DIR := $(PROJ_SRC_ROOT) else PROJ_SRC_DIR := $(subst //,/,$(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) endif Vladimir -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile.rules.patch Type: application/octet-stream Size: 465 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050301/34772bf4/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile.config.in.patch Type: application/octet-stream Size: 1067 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050301/34772bf4/attachment-0001.obj>