Skip to content

Commit c311741

Browse files
jrngitster
authored andcommitted
git-remote-mediawiki: honor DESTDIR in "make install"
So now you can run DESTDIR=$(pwd)/tmp make -Ccontrib/mw-to-git install to install the mediawiki remote helper, git-mw tool, and Git::Mediawiki perl module under tmp/ as preparation for zipping it up and extracting on another machine. While at it, make sure the directory that should contain Git::Mediawiki exists before putting a file there. Without this patch, the makefile uses DESTDIR when installing git-mw and git-remote-mediawiki but not the perl module, resulting in errors from "make install" if the $(INSTLIBDIR)/Git directory does not exist: install: cannot create regular file \ '/usr/share/perl/5.18.1/Git/Mediawiki.pm': No such file or directory Signed-off-by: Jonathan Nieder <[email protected]> Acked-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3176c59 commit c311741

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

contrib/mw-to-git/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
1818
all: build
1919

2020
install_pm:
21-
install $(GIT_MEDIAWIKI_PM) $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
21+
install -d -m 755 $(DESTDIR)$(INSTLIBDIR)/Git
22+
install -m 644 $(GIT_MEDIAWIKI_PM) \
23+
$(DESTDIR)$(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
2224

2325
build:
2426
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \

0 commit comments

Comments
 (0)