[PATCH] D12919: [clang-format] Make configure installation consistent with CMake
Eugene Zelenko via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 16 17:43:24 PDT 2015
Eugene.Zelenko created this revision.
Eugene.Zelenko added a reviewer: hans.
Eugene.Zelenko added a subscriber: cfe-commits.
Eugene.Zelenko set the repository for this revision to rL LLVM.
During D12700 review I was asked to make configure installation consistent with CMake. Since I modeled implementation of Clang-format, I decided to fix problem in Clang-format make file too.
Just in case, possible improvements to configure (if it'll be around for awhile and somebody with more knowledge then me willing to do them):
* Make PROJ_sharedir in top-level Makefile.rules, since it's used for LLVM CMake modules and will be used for Clang-tidy.
* Since git-clang-format is Python script, it should be link from bin to share directory.
Repository:
rL LLVM
http://reviews.llvm.org/D12919
Files:
tools/clang-format/Makefile
Index: tools/clang-format/Makefile
===================================================================
--- tools/clang-format/Makefile
+++ tools/clang-format/Makefile
@@ -20,3 +20,36 @@
clangLex.a clangBasic.a
include $(CLANG_LEVEL)/Makefile
+
+PROJ_sharedir := $(DESTDIR)$(PROJ_prefix)/share/clang
+
+FILESLIST := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.applescript))
+FILESLIST += $(notdir $(wildcard $(PROJ_SRC_DIR)/*.el))
+FILESLIST += $(notdir $(wildcard $(PROJ_SRC_DIR)/*.py))
+
+SRCFILES := $(addprefix $(PROJ_SRC_DIR)/, $(FILESLIST))
+DESTFILES := $(addprefix $(PROJ_sharedir)/, $(FILESLIST))
+
+$(PROJ_sharedir):
+ $(Echo) Making install directory: $@
+ $(Verb) $(MKDIR) $@
+
+$(DESTFILES): $(SRCFILES)
+
+$(PROJ_sharedir)/%.applescript: $(PROJ_SRC_DIR)/%.applescript
+ $(Echo) Installing script file: $(notdir $<)
+ $(Verb) $(DataInstall) $< $(PROJ_sharedir)
+
+$(PROJ_sharedir)/%.el: $(PROJ_SRC_DIR)/%.el
+ $(Echo) Installing script file: $(notdir $<)
+ $(Verb) $(DataInstall) $< $(PROJ_sharedir)
+
+$(PROJ_sharedir)/%.py: $(PROJ_SRC_DIR)/%.py
+ $(Echo) Installing script file: $(notdir $<)
+ $(Verb) $(ScriptInstall) $< $(PROJ_sharedir)
+
+$(PROJ_bindir)/git-clang-format: $(PROJ_SRC_DIR)/git-clang-format
+ $(Echo) Installing script file: $(notdir $<)
+ $(Verb) $(ScriptInstall) $< $(PROJ_bindir)
+
+install-local:: $(PROJ_sharedir) $(DESTFILES) $(PROJ_bindir)/git-clang-format
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12919.34951.patch
Type: text/x-patch
Size: 1405 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150917/cbb00d75/attachment.bin>
More information about the cfe-commits
mailing list