[PATCH] Added lib/Headers/cuda subdirectory and Makefile to install headers located there.

Artem Belevich tra at google.com
Tue Apr 21 13:05:38 PDT 2015


Hi echristo,

Added lib/Headers/cuda subdirectory and Makefile to install headers located there.

http://reviews.llvm.org/D9171

Files:
  lib/Headers/Makefile
  lib/Headers/cuda/Makefile

Index: lib/Headers/Makefile
===================================================================
--- lib/Headers/Makefile
+++ lib/Headers/Makefile
@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 
 CLANG_LEVEL := ../..
+DIRS := cuda
 
 BUILT_SOURCES = arm_neon.h.inc
 TABLEGEN_INC_FILES_COMMON = 1
Index: lib/Headers/cuda/Makefile
===================================================================
--- lib/Headers/cuda/Makefile
+++ lib/Headers/cuda/Makefile
@@ -1,64 +1,41 @@
-##===- clang/lib/Headers/Makefile --------------------------*- Makefile -*-===##
+##===- clang/lib/Headers/cuda/Makefile ---------------------*- Makefile -*-===##
 #
 #                     The LLVM Compiler Infrastructure
 #
 # This file is distributed under the University of Illinois Open Source
 # License. See LICENSE.TXT for details.
-# 
+#
 ##===----------------------------------------------------------------------===##
 
-CLANG_LEVEL := ../..
-
-BUILT_SOURCES = arm_neon.h.inc
-TABLEGEN_INC_FILES_COMMON = 1
-
+CLANG_LEVEL := ../../..
 include $(CLANG_LEVEL)/Makefile
 
 CLANG_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \
 	$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
 
-HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/$(CLANG_VERSION)/include
+HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/$(CLANG_VERSION)/include/cuda
 
 HEADERS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.h))
 
 OBJHEADERS := $(addprefix $(HeaderDir)/, $(HEADERS))
+$(warn OBJHEADERS=$(OBJHEADERS))
 
-
-$(OBJHEADERS): $(HeaderDir)/%.h: $(PROJ_SRC_DIR)/%.h $(HeaderDir)/.dir $(HeaderDir)/arm_neon.h
-	$(Verb) cp $< $@
-	$(Echo) Copying $(notdir $<) to build dir
-
-$(HeaderDir)/arm_neon.h: $(BUILT_SOURCES) $(HeaderDir)/.dir
+$(OBJHEADERS): $(HeaderDir)/%.h: $(PROJ_SRC_DIR)/%.h $(HeaderDir)/.dir
 	$(Verb) cp $< $@
 	$(Echo) Copying $(notdir $<) to build dir
 
-$(HeaderDir)/module.modulemap: $(PROJ_SRC_DIR)/module.modulemap $(HeaderDir)/.dir
-	$(Verb) cp $< $@
-	$(Echo) Copying $(notdir $<) to build dir
-
-
 # Hook into the standard Makefile rules.
-all-local:: $(OBJHEADERS) $(HeaderDir)/module.modulemap
+all-local:: $(OBJHEADERS)
 
-PROJ_headers := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION)/include
+PROJ_headers := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION)/include/cuda
 
 INSTHEADERS := $(addprefix $(PROJ_headers)/, $(HEADERS))
-INSTHEADERS += $(PROJ_headers)/arm_neon.h
 
 $(PROJ_headers):
 	$(Verb) $(MKDIR) $@
 
 $(INSTHEADERS): $(PROJ_headers)/%.h: $(HeaderDir)/%.h | $(PROJ_headers)
 	$(Verb) $(DataInstall) $< $(PROJ_headers)
 	$(Echo) Installing compiler include file: $(notdir $<)
 
-$(PROJ_headers)/module.modulemap: $(HeaderDir)/module.modulemap | $(PROJ_headers)
-	$(Verb) $(DataInstall) $< $(PROJ_headers)
-	$(Echo) Installing compiler module map file: $(notdir $<)
-
-
-install-local:: $(INSTHEADERS) $(PROJ_headers)/module.modulemap
-
-$(ObjDir)/arm_neon.h.inc.tmp : $(CLANG_LEVEL)/include/clang/Basic/arm_neon.td $(CLANG_TBLGEN) $(ObjDir)/.dir
-	$(Echo) "Building Clang arm_neon.h.inc with tblgen"
-	$(Verb) $(ClangTableGen) -gen-arm-neon -o $(call SYSPATH, $@) $<
+install-local:: $(INSTHEADERS)

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9171.24165.patch
Type: text/x-patch
Size: 3187 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150421/79085f5d/attachment.bin>


More information about the cfe-commits mailing list