From: James Denholm <hidden> Date: 2016-06-15 23:01:01
contrib/subtree/Makefile is a shambles in regards to it's consistency
with other makefiles, which makes subtree overly painful to include in
build scripts.
The main issues are that calls are made to git itself in the build
process, and that a subtree-exclusive variable is used for specifying
the exec path. Patches 1/5 through 3/5 resolve these.
The "cleanup" fixes (4/5 and 5/5) are based on precedents set by other
makefiles across the project.
One problem is foreseen: 3/5 will necessitate that package maintainers
who already have git-subtree included in their packages update their
build-scripts.
Reviewed-by: Jeff King <redacted>
Signed-off-by: James Denholm <redacted>
Based-on-patch-by: Dan McGee [off-list ref]
James Denholm (5):
contrib/subtree/Makefile: scrap unused $(gitdir)
contrib/subtree/Makefile: Use GIT-VERSION-FILE
contrib/subtree/Makefile: s/libexecdir/gitexecdir
contrib/subtree/Makefile: Doc-gen rules cleanup
contrib/subtree/Makefile: clean rule cleanup
contrib/subtree/Makefile | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
--
1.9.2
From: James Denholm <hidden> Date: 2016-06-15 23:01:01
GVF is already being used in most/all other makefiles in the project,
and has been for _quite_ a while. Hence, drop file-unique gitver and
replace with GIT_VERSION.
Reviewed-by: Jeff King <redacted>
Signed-off-by: James Denholm <redacted>
---
contrib/subtree/Makefile | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
@@ -6,7 +6,10 @@ mandir ?= $(prefix)/share/manlibexecdir?=$(prefix)/libexec/git-coreman1dir?=$(mandir)/man1-gitver?=$(word3,$(shellgit--version))+../../GIT-VERSION-FILE:FORCE+$(MAKE)-C../../GIT-VERSION-FILE++-include ../../GIT-VERSION-FILE# this should be set to a 'standard' bsd-type install programINSTALL?=install
From: James Denholm <hidden> Date: 2016-06-15 23:01:01
git:Documentation/Makefile and others establish "RM ?= rm -f" as a
convention for rm calls in clean rules, hence follow this convention
instead of simply forcing clean to use rm.
subproj and mainline no longer need to be removed in clean, as they are
no longer created in git:contrib/subtree by "make test". Hence, remove
the rm call for those folders.
Other makefiles don't remove "*~" files, remove the rm call to prevent
unexpected behaviour in the future. Similarly, clean doesn't remove the
installable file, so rectify this.
Reviewed-by: Jeff King <redacted>
Signed-off-by: James Denholm <redacted>
---
contrib/subtree/Makefile | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
@@ -12,7 +12,8 @@ man1dir ?= $(mandir)/man1-include ../../GIT-VERSION-FILE# this should be set to a 'standard' bsd-type install program-INSTALL?=install+INSTALL?=install+RM?=rm-fASCIIDOC=asciidocXMLTO=xmlto
From: James Denholm <hidden> Date: 2016-06-15 23:01:01
$(libexecdir) isn't used anywhere else in the project, while
$(gitexecdir) is the standard in the other appropriate makefiles. Hence,
replace the former with the latter.
Reviewed-by: Jeff King <redacted>
Signed-off-by: James Denholm <redacted>
---
contrib/subtree/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
From: James Denholm <hidden> Date: 2016-06-15 23:01:01
git:Documentation/Makefile establishes asciidoc/xmlto calls as being
handled through their appropriate variables, Hence, change to bring into
congruency with.
Similarly, MANPAGE_XSL exists in git:Documentation/Makefile, while
MANPAGE_NORMAL_XSL does not outside contrib/subtree. Hence, replace
MANPAGE_NORMAL_XSL with MANPAGE_XSL.
Reviewed-by: Jeff King <redacted>
Signed-off-by: James Denholm <redacted>
---
contrib/subtree/Makefile | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
@@ -14,8 +14,11 @@ man1dir ?= $(mandir)/man1# this should be set to a 'standard' bsd-type install programINSTALL?=install-ASCIIDOC_CONF=../../Documentation/asciidoc.conf-MANPAGE_NORMAL_XSL=../../Documentation/manpage-normal.xsl+ASCIIDOC=asciidoc+XMLTO=xmlto++ASCIIDOC_CONF=../../Documentation/asciidoc.conf+MANPAGE_XSL=../../Documentation/manpage-normal.xslGIT_SUBTREE_SH:=git-subtree.shGIT_SUBTREE:=git-subtree
From: James Denholm <hidden> Date: 2016-06-15 23:01:01
In 7ff8463dba0d74fc07a766bed457ae7afcc902b5, the references to gitdir
were removed but the assignment itself wasn't. Hence, drop the gitdir
assignment.
Reviewed-by: Jeff King <redacted>
Signed-off-by: James Denholm <redacted>
---
contrib/subtree/Makefile | 1 -
1 file changed, 1 deletion(-)