]> granicus.if.org Git - clang/commitdiff
Put compiler headers in <prefix>/lib/clang/1.0/include (vs
authorDaniel Dunbar <daniel@zuster.org>
Sat, 21 Feb 2009 20:52:41 +0000 (20:52 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 21 Feb 2009 20:52:41 +0000 (20:52 +0000)
<prefix>/Headers, gross).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65247 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/clang.cpp
lib/Headers/Makefile

index 525c27faccc93429f405e95b2c8f5262ff9da685..d17f77b0a878d6e8d5c2154993fc4f5d727630e8 100644 (file)
@@ -1090,14 +1090,21 @@ void InitializeIncludePaths(const char *Argv0, HeaderSearch &Headers,
 
   Init.AddDefaultEnvVarPaths(Lang);
 
-  // Add the clang headers, which are relative to the clang driver.
+  // Add the clang headers, which are relative to the clang binary.
   llvm::sys::Path MainExecutablePath = 
      llvm::sys::Path::GetMainExecutable(Argv0,
                                     (void*)(intptr_t)InitializeIncludePaths);
   if (!MainExecutablePath.isEmpty()) {
     MainExecutablePath.eraseComponent();  // Remove /clang from foo/bin/clang
     MainExecutablePath.eraseComponent();  // Remove /bin   from foo/bin
-    MainExecutablePath.appendComponent("Headers"); // Get foo/Headers
+
+    // Get foo/lib/clang/1.0/include    
+    // 
+    // FIXME: Don't embed version here.
+    MainExecutablePath.appendComponent("lib");
+    MainExecutablePath.appendComponent("clang");
+    MainExecutablePath.appendComponent("1.0");
+    MainExecutablePath.appendComponent("include");
     
     // We pass true to ignore sysroot so that we *always* look for clang headers
     // relative to our executable, never relative to -isysroot.
index 98b82c3980338e681376736e36e8a09bd137e13b..77eb96dc4dc4c3ab542b3faf931f52d1e110181f 100644 (file)
@@ -10,7 +10,8 @@
 LEVEL = ../../../..
 include $(LEVEL)/Makefile.common
 
-HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/Headers
+# FIXME: Get version from a common place.
+HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/1.0/include
 
 HEADERS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.h))
 
@@ -19,16 +20,12 @@ OBJHEADERS := $(addprefix $(HeaderDir)/, $(HEADERS))
 
 $(OBJHEADERS): $(HeaderDir)/%.h: $(PROJ_SRC_DIR)/%.h $(HeaderDir)/.dir
        $(Verb) cp $< $@
-       @echo Copying $(notdir $<) to build dir
-        
-printit:
-       echo $(OBJHEADERS)
-       echo  $(PROJ_SRC_DIR)
+       $(Echo) Copying $(notdir $<) to build dir
+
 # Hook into the standard Makefile rules.
 all-local:: $(OBJHEADERS)
 
-PROJ_headers := $(DESTDIR)$(PROJ_prefix)/Headers
+PROJ_headers := $(DESTDIR)$(PROJ_prefix)/lib/clang/1.0/include
 
 INSTHEADERS := $(addprefix $(PROJ_headers)/, $(HEADERS))
 
@@ -37,6 +34,7 @@ $(PROJ_headers):
 
 $(INSTHEADERS): $(PROJ_headers)/%.h: $(HeaderDir)/%.h | $(PROJ_headers)
        $(Verb) $(DataInstall) $< $(PROJ_headers)
+       $(Echo) Installing compiler include file: $(notdir $<)
 
 install-local:: $(INSTHEADERS)