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
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
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits