LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 848 - PROJ_SRC_DIR != PROJ_OBJ_DIR in srcdir=objdir build due to symlinks
Summary: PROJ_SRC_DIR != PROJ_OBJ_DIR in srcdir=objdir build due to symlinks
Status: RESOLVED FIXED
Alias: None
Product: Build scripts
Classification: Unclassified
Component: Makefiles (show other bugs)
Version: 1.7
Hardware: All All
: P normal
Assignee: Reid Spencer
URL:
Keywords: build-problem
Depends on:
Blocks:
 
Reported: 2006-07-26 15:27 PDT by Chris Lattner
Modified: 2010-03-06 14:00 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lattner 2006-07-26 15:27:35 PDT
I have the following source layout:

~/cvs/llvm is my llvm tree
~/llvm is a symlink to ~/cvs/llvm

Because PROJ_OBJ_DIR and PROJ_OBJ_ROOT are defined as:

PROJ_OBJ_DIR  := $(shell pwd)
PROJ_OBJ_ROOT := $(subst //,/,$(shell cd $(PROJ_OBJ_DIR)/$(LEVEL); pwd))

They fully resolve the symlink to ~/cvs/llvm, but PROJ_SRC_ROOT is the un-fully-resolved path ~/llvm.  
This breaks stuff that checks to see if SRCDIR==OBJDIR, such as 'make dist' and other stuff:

# If the Makefile in the source tree has been updated, copy it over into the
# build tree.

# We MUST build distribution with OBJ_DIR != SRC_DIR

-Chris
Comment 1 Reid Spencer 2006-07-27 23:14:42 PDT
Mine.
Comment 2 Reid Spencer 2006-07-27 23:32:34 PDT
Chris:

I have a patch for this, but not sure how to test it.
I've recreate the symlink situation and everything builds fine in it.
To test, is it sufficient to touch lib/System/Makefile and see if the "Updating
Makefile" message appears? If it doesn't, are we good to go on this?