Skip to content

Commit 968182a

Browse files
committed
Merge branch 'jn/mediawiki-makefile-updates'
Build and installation procedure clean-up. * jn/mediawiki-makefile-updates: git-remote-mediawiki build: handle DESTDIR/INSTLIBDIR with whitespace git-remote-mediawiki build: make 'install' command configurable git-remote-mediawiki: honor DESTDIR in "make install" git-remote-mediawiki: do not remove installed files in "clean" target
2 parents c83386d + c635b05 commit 968182a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

contrib/mw-to-git/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ SCRIPT_PERL+=git-mw.perl
1818
GIT_ROOT_DIR=../..
1919
HERE=contrib/mw-to-git/
2020

21+
INSTALL = install
22+
2123
SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
2224
INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
2325
-s --no-print-directory instlibdir)
26+
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
27+
INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR))
2428

2529
all: build
2630

@@ -30,7 +34,9 @@ test: all
3034
check: perlcritic test
3135

3236
install_pm:
33-
install $(GIT_MEDIAWIKI_PM) $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
37+
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/Git'
38+
$(INSTALL) -m 644 $(GIT_MEDIAWIKI_PM) \
39+
'$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/$(GIT_MEDIAWIKI_PM)'
3440

3541
build:
3642
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
@@ -43,7 +49,6 @@ install: install_pm
4349
clean:
4450
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
4551
clean-perl-script
46-
rm $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
4752

4853
perlcritic:
4954
perlcritic -5 $(SCRIPT_PERL)

0 commit comments

Comments
 (0)