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