Install git-subtree from contrib
Build git-subtree in its contrib directory and install from there. The main Makefile no longer discovers subcommands build in the main build area so we cannot count on it to install git-subtree. The user should make && make install in contrib/subtree to install git-subtree. Change the rule to install the git-subtree manpage. The main Documentation area doesn't directly support installing documentation from other directories so the user will have to do that from within contrib/subtree for now. Signed-off-by: David A. Greene <greened@obbligato.org>maint
							parent
							
								
									187bc2da5b
								
							
						
					
					
						commit
						7ff8463dba
					
				|  | @ -3,43 +3,44 @@ | ||||||
|  |  | ||||||
| prefix ?= /usr/local | prefix ?= /usr/local | ||||||
| mandir ?= $(prefix)/share/man | mandir ?= $(prefix)/share/man | ||||||
|  | libexecdir ?= $(prefix)/libexec/git-core | ||||||
| gitdir ?= $(shell git --exec-path) | gitdir ?= $(shell git --exec-path) | ||||||
|  | man1dir ?= $(mandir)/man1 | ||||||
|  |  | ||||||
| gitver ?= $(word 3,$(shell git --version)) | gitver ?= $(word 3,$(shell git --version)) | ||||||
|  |  | ||||||
| # this should be set to a 'standard' bsd-type install program | # this should be set to a 'standard' bsd-type install program | ||||||
| INSTALL ?= install | INSTALL ?= install | ||||||
| INSTALL_DATA = $(INSTALL) -c -m 0644 |  | ||||||
| INSTALL_EXE = $(INSTALL) -c -m 0755 |  | ||||||
| INSTALL_DIR = $(INSTALL) -c -d -m 0755 |  | ||||||
|  |  | ||||||
| ASCIIDOC_CONF      = ../../Documentation/asciidoc.conf | ASCIIDOC_CONF      = ../../Documentation/asciidoc.conf | ||||||
| MANPAGE_NORMAL_XSL =  ../../Documentation/manpage-normal.xsl | MANPAGE_NORMAL_XSL =  ../../Documentation/manpage-normal.xsl | ||||||
|  |  | ||||||
| default: | GIT_SUBTREE_SH := git-subtree.sh | ||||||
| 	@echo "git-subtree doesn't need to be built." | GIT_SUBTREE    := git-subtree | ||||||
| 	@echo "Just copy it somewhere on your PATH, like /usr/local/bin." |  | ||||||
| 	@echo |  | ||||||
| 	@echo "Try: make doc" |  | ||||||
| 	@echo " or: make test" |  | ||||||
| 	@false |  | ||||||
|  |  | ||||||
| install: install-exe install-doc | GIT_SUBTREE_DOC := git-subtree.1 | ||||||
|  | GIT_SUBTREE_XML := git-subtree.xml | ||||||
|  | GIT_SUBTREE_TXT := git-subtree.txt | ||||||
|  |  | ||||||
| install-exe: git-subtree.sh | all: $(GIT_SUBTREE) | ||||||
| 	$(INSTALL_DIR) $(DESTDIR)/$(gitdir) |  | ||||||
| 	$(INSTALL_EXE) $< $(DESTDIR)/$(gitdir)/git-subtree |  | ||||||
|  |  | ||||||
| install-doc: git-subtree.1 | $(GIT_SUBTREE): $(GIT_SUBTREE_SH) | ||||||
| 	$(INSTALL_DIR) $(DESTDIR)/$(mandir)/man1/ | 	cp $< $@ && chmod +x $@ | ||||||
| 	$(INSTALL_DATA) $< $(DESTDIR)/$(mandir)/man1/ |  | ||||||
|  |  | ||||||
| doc: git-subtree.1 | doc: $(GIT_SUBTREE_DOC) | ||||||
|  |  | ||||||
| %.1: %.xml | install: $(GIT_SUBTREE) | ||||||
|  | 	$(INSTALL) -m 755 $(GIT_SUBTREE) $(libexecdir) | ||||||
|  |  | ||||||
|  | install-doc: install-man | ||||||
|  |  | ||||||
|  | install-man: $(GIT_SUBTREE_DOC) | ||||||
|  | 	$(INSTALL) -m 644 $^ $(man1dir) | ||||||
|  |  | ||||||
|  | $(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML) | ||||||
| 	xmlto -m $(MANPAGE_NORMAL_XSL)  man $^ | 	xmlto -m $(MANPAGE_NORMAL_XSL)  man $^ | ||||||
|  |  | ||||||
| %.xml: %.txt | $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT) | ||||||
| 	asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \ | 	asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \ | ||||||
| 		-agit_version=$(gitver) $^ | 		-agit_version=$(gitver) $^ | ||||||
|  |  | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 David A. Greene
						David A. Greene