[cfe-commits] r65247 - in /cfe/trunk: Driver/clang.cpp lib/Headers/Makefile

Daniel Dunbar daniel at zuster.org
Sat Feb 21 12:52:41 PST 2009


Author: ddunbar
Date: Sat Feb 21 14:52:41 2009
New Revision: 65247

URL: http://llvm.org/viewvc/llvm-project?rev=65247&view=rev
Log:
Put compiler headers in <prefix>/lib/clang/1.0/include (vs
<prefix>/Headers, gross).

Modified:
    cfe/trunk/Driver/clang.cpp
    cfe/trunk/lib/Headers/Makefile

Modified: cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/clang.cpp?rev=65247&r1=65246&r2=65247&view=diff

==============================================================================
--- cfe/trunk/Driver/clang.cpp (original)
+++ cfe/trunk/Driver/clang.cpp Sat Feb 21 14:52:41 2009
@@ -1090,14 +1090,21 @@
 
   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.

Modified: cfe/trunk/lib/Headers/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/Makefile?rev=65247&r1=65246&r2=65247&view=diff

==============================================================================
--- cfe/trunk/lib/Headers/Makefile (original)
+++ cfe/trunk/lib/Headers/Makefile Sat Feb 21 14:52:41 2009
@@ -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): $(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 @@
 
 $(INSTHEADERS): $(PROJ_headers)/%.h: $(HeaderDir)/%.h | $(PROJ_headers)
 	$(Verb) $(DataInstall) $< $(PROJ_headers)
+	$(Echo) Installing compiler include file: $(notdir $<)
 
 install-local:: $(INSTHEADERS)
 





More information about the cfe-commits mailing list