* [PATCH] contrib/subtree: fix Makefile to respect non-configure `make`
@ 2012-07-01 18:55 Dan McGee
0 siblings, 0 replies; 2+ messages in thread
From: Dan McGee @ 2012-07-01 18:55 UTC (permalink / raw)
To: git, David A. Greene
* DESTDIR being defined had no effect.
* prefix was handled inconsistently.
* Unlike the top-level Makefile, this required libexecdir to be defined,
not gitexecdir.
* The Makefile assumed the git it could use via the shell was the
correct version, which is not true at all from a packager's
standpoint. Don't shell out to git at all, use the standard version
logic like Documentation/ does.
After these changes, it is actually possible to install git-subtree when
packaging git into a temporary install directory, rather than installing
it on the running system.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---
Packaging this tool in the git package for Arch Linux turned out to be much
more of a process than I expected. We've used the non-configure-based make
system since git has been in our repositories, and it looks like the install
process for this command was never tested with this build system.
The one thing I didn't do here was add some of the sophistication around
relative vs. absolute paths in mandir and gitexecdir that the top-level
Makefile performs. Opinions or thoughts on that? This version will support
relative paths only.
contrib/subtree/Makefile | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index 05cdd5c..919464a 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -2,12 +2,14 @@
-include ../../config.mak
prefix ?= /usr/local
-mandir ?= $(prefix)/share/man
-libexecdir ?= $(prefix)/libexec/git-core
-gitdir ?= $(shell git --exec-path)
+mandir ?= share/man
+gitexecdir ?= libexec/git-core
man1dir ?= $(mandir)/man1
-gitver ?= $(word 3,$(shell git --version))
+../../GIT-VERSION-FILE: FORCE
+ $(MAKE) -C ../../ GIT-VERSION-FILE
+
+-include ../../GIT-VERSION-FILE
# this should be set to a 'standard' bsd-type install program
INSTALL ?= install
@@ -30,19 +32,19 @@ $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
doc: $(GIT_SUBTREE_DOC)
install: $(GIT_SUBTREE)
- $(INSTALL) -m 755 $(GIT_SUBTREE) $(libexecdir)
+ $(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(prefix)/$(gitexecdir)
install-doc: install-man
install-man: $(GIT_SUBTREE_DOC)
- $(INSTALL) -m 644 $^ $(man1dir)
+ $(INSTALL) -m 644 $^ $(DESTDIR)$(prefix)/$(man1dir)
$(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
xmlto -m $(MANPAGE_NORMAL_XSL) man $^
$(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \
- -agit_version=$(gitver) $^
+ -agit_version=$(GIT_VERSION) $^
test:
$(MAKE) -C t/ test
@@ -50,3 +52,5 @@ test:
clean:
rm -f *~ *.xml *.html *.1
rm -rf subproj mainline
+
+.PHONY: FORCE
--
1.7.11.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] contrib/subtree: fix Makefile to respect non-configure `make`
@ 2013-02-27 13:09 Jan Rueegg
0 siblings, 0 replies; 2+ messages in thread
From: Jan Rueegg @ 2013-02-27 13:09 UTC (permalink / raw)
To: git
Hello
There was a message in this list before to try to fix the Makefile:
http://marc.info/?l=git&m=134116914230460&w=2
However, without any reaction following. See also here whats the problem:
https://bugs.archlinux.org/task/30473
Anyone there who can have a look at the patch and integrate it upstream?
Regards
Jan Rüegg
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-27 13:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-01 18:55 [PATCH] contrib/subtree: fix Makefile to respect non-configure `make` Dan McGee
-- strict thread matches above, loose matches on Subject: below --
2013-02-27 13:09 Jan Rueegg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).