From: Chris Lattner Date: Mon, 3 Mar 2008 01:22:28 +0000 (+0000) Subject: Add a makefile to build and install headers. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aba51227466131dd1455bb2afbbe9176ef67bd00;p=clang Add a makefile to build and install headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47833 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Headers/Makefile b/Headers/Makefile new file mode 100644 index 0000000000..8aedb4cf81 --- /dev/null +++ b/Headers/Makefile @@ -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) +