Merge branch 'jn/mediawiki-makefile-updates'
authorJunio C Hamano <gitster@pobox.com>
Thu, 5 Dec 2013 21:00:23 +0000 (13:00 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Dec 2013 21:00:23 +0000 (13:00 -0800)
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

1  2 
contrib/mw-to-git/Makefile
index f206f9655b4c078c66cb885fd079c4a7b95f7949,37b68e2571e1e65968eab88c068aea3e6cbc22de..a4b6f7a2cd4122adbb74a565b34270578b7b6aed
@@@ -24,16 -21,13 +28,18 @@@ INSTLIBDIR_SQ = $(subst ','\'',$(INSTLI
  
  all: build
  
 +test: all
 +      $(MAKE) -C t
 +
 +check: perlcritic test
 +
  install_pm:
-       install $(GIT_MEDIAWIKI_PM) $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
+       $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/Git'
+       $(INSTALL) -m 644 $(GIT_MEDIAWIKI_PM) \
+               '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/$(GIT_MEDIAWIKI_PM)'
  
  build:
 -      $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \
 +      $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
                  build-perl-script
  
  install: install_pm
                  install-perl-script
  
  clean:
 -      $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \
 +      $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
                  clean-perl-script
-       rm $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
  
  perlcritic:
 -      perlcritic -2 *.perl
 +      perlcritic -5 $(SCRIPT_PERL)
 +      -perlcritic -2 $(SCRIPT_PERL)
 +
 +.PHONY: all test check install_pm install clean perlcritic