]> granicus.if.org Git - clang/commitdiff
Add a makefile to build and install headers.
authorChris Lattner <sabre@nondot.org>
Mon, 3 Mar 2008 01:22:28 +0000 (01:22 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 3 Mar 2008 01:22:28 +0000 (01:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47833 91177308-0d34-0410-b5e6-96231b3b80d8

Headers/Makefile [new file with mode: 0644]

diff --git a/Headers/Makefile b/Headers/Makefile
new file mode 100644 (file)
index 0000000..8aedb4c
--- /dev/null
@@ -0,0 +1,38 @@
+##===- clang/Headers/Makefile ------------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LEVEL = ../../..
+include $(LEVEL)/Makefile.common
+
+HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/Headers
+
+HEADERS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.h))
+
+OBJHEADERS := $(addprefix $(HeaderDir)/, $(HEADERS))
+
+
+$(OBJHEADERS): $(HeaderDir)/%.h: $(PROJ_SRC_DIR)/%.h $(HeaderDir)/.dir
+       cp $< $@
+        
+printit:
+       echo $(OBJHEADERS)
+       echo  $(PROJ_SRC_DIR)
+# Hook into the standard Makefile rules.
+all-local:: $(OBJHEADERS)
+
+PROJ_headers := $(DESTDIR)$(PROJ_prefix)/Headers
+
+INSTHEADERS := $(addprefix $(PROJ_headers)/, $(HEADERS))
+
+$(INSTHEADERS): $(PROJ_headers)/%.h: $(HeaderDir)/%.h $(PROJ_headers)/.dir
+       $(Verb) $(DataInstall) $< $(PROJ_headers)
+
+install-local:: $(INSTHEADERS)
+