Makefile
branchstable
changeset 49366 288de6f5d724
parent 48988 8d7eaff92f9c
child 49419 2edb41ed6c49
equal deleted inserted replaced
49364:e8ea403b1c46 49366:288de6f5d724
   149 	[ -e $(HGPYTHONS)/$*/bin/python ] || ( \
   149 	[ -e $(HGPYTHONS)/$*/bin/python ] || ( \
   150 	cd $$(mktemp --directory --tmpdir) && \
   150 	cd $$(mktemp --directory --tmpdir) && \
   151         $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
   151         $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
   152 	cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
   152 	cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
   153 
   153 
   154 rust-tests: py_feature = $(shell $(PYTHON) -c \
       
   155  'import sys; print(["python27-bin", "python3-bin"][sys.version_info[0] >= 3])')
       
   156 rust-tests:
   154 rust-tests:
   157 	cd $(HGROOT)/rust/hg-cpython \
   155 	cd $(HGROOT)/rust/hg-cpython \
   158 		&& $(CARGO) test --quiet --all \
   156 		&& $(CARGO) test --quiet --all --features "$(HG_RUST_FEATURES)"
   159 			--no-default-features --features "$(py_feature) $(HG_RUST_FEATURES)"
       
   160 
   157 
   161 check-code:
   158 check-code:
   162 	hg manifest | xargs python contrib/check-code.py
   159 	hg manifest | xargs python contrib/check-code.py
   163 
   160 
   164 format-c:
   161 format-c:
   236 	  --install-lib=/Library/Python/2.7/site-packages/
   233 	  --install-lib=/Library/Python/2.7/site-packages/
   237 	make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
   234 	make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
   238         # Place a bogon .DS_Store file in the target dir so we can be
   235         # Place a bogon .DS_Store file in the target dir so we can be
   239         # sure it doesn't get included in the final package.
   236         # sure it doesn't get included in the final package.
   240 	touch build/mercurial/.DS_Store
   237 	touch build/mercurial/.DS_Store
   241         # install zsh completions - this location appears to be
       
   242         # searched by default as of macOS Sierra.
       
   243 	install -d build/mercurial/usr/local/share/zsh/site-functions/
       
   244 	install -m 0644 contrib/zsh_completion build/mercurial/usr/local/share/zsh/site-functions/_hg
       
   245         # install bash completions - there doesn't appear to be a
       
   246         # place that's searched by default for bash, so we'll follow
       
   247         # the lead of Apple's git install and just put it in a
       
   248         # location of our own.
       
   249 	install -d build/mercurial/usr/local/hg/contrib/
       
   250 	install -m 0644 contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash
       
   251 	make -C contrib/chg \
   238 	make -C contrib/chg \
   252 	  HGPATH=/usr/local/bin/hg \
   239 	  HGPATH=/usr/local/bin/hg \
   253 	  PYTHON=/usr/bin/python2.7 \
   240 	  PYTHON=/usr/bin/python2.7 \
   254 	  DESTDIR=../../build/mercurial \
   241 	  DESTDIR=../../build/mercurial \
   255 	  PREFIX=/usr/local \
   242 	  PREFIX=/usr/local \