annotate Makefile @ 50208:3f3fca243dca

dirstate: drop `identity` from the public API We no longer needs it.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 22 Feb 2023 02:08:11 +0100
parents 0f0880c8a7e5
children 87bfd1703597
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10134
821793e3049c Makefile: added instructions on how to override PREFIX
Martin Geisler <mg@lazybytes.net>
parents: 10073
diff changeset
1 # If you want to change PREFIX, do not just edit it below. The changed
821793e3049c Makefile: added instructions on how to override PREFIX
Martin Geisler <mg@lazybytes.net>
parents: 10073
diff changeset
2 # value wont get passed on to recursive make calls. You should instead
821793e3049c Makefile: added instructions on how to override PREFIX
Martin Geisler <mg@lazybytes.net>
parents: 10073
diff changeset
3 # override the variable on the command like:
821793e3049c Makefile: added instructions on how to override PREFIX
Martin Geisler <mg@lazybytes.net>
parents: 10073
diff changeset
4 #
821793e3049c Makefile: added instructions on how to override PREFIX
Martin Geisler <mg@lazybytes.net>
parents: 10073
diff changeset
5 # % make PREFIX=/opt/ install
821793e3049c Makefile: added instructions on how to override PREFIX
Martin Geisler <mg@lazybytes.net>
parents: 10073
diff changeset
6
29004
145cdc45b0df make: do assignment and export in a single statement
Augie Fackler <augie@google.com>
parents: 29003
diff changeset
7 export PREFIX=/usr/local
45821
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45609
diff changeset
8
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45609
diff changeset
9 # Default to Python 3.
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45609
diff changeset
10 #
45898
4f6816e8440b make: switch the PYTHON default to `py.exe -3` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 45835
diff changeset
11 # Windows ships Python 3 as `python.exe`, which may not be on PATH. py.exe is.
45821
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45609
diff changeset
12 ifeq ($(OS),Windows_NT)
45898
4f6816e8440b make: switch the PYTHON default to `py.exe -3` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 45835
diff changeset
13 PYTHON?=py -3
45821
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45609
diff changeset
14 else
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45609
diff changeset
15 PYTHON?=python3
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45609
diff changeset
16 endif
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45609
diff changeset
17
45833
be6544a05e8f make: add a pyoxidizer target
Augie Fackler <augie@google.com>
parents: 45821
diff changeset
18 PYOXIDIZER?=pyoxidizer
be6544a05e8f make: add a pyoxidizer target
Augie Fackler <augie@google.com>
parents: 45821
diff changeset
19
29009
c05cc1b95848 make: backout changeset 51f5fae84e43
Siddharth Agarwal <sid0@fb.com>
parents: 29005
diff changeset
20 $(eval HGROOT := $(shell pwd))
24194
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
21 HGPYTHONS ?= $(HGROOT)/build/pythons
7706
0ae7f0b312ea use PURE option in Makefile
Martin Geisler <mg@daimi.au.dk>
parents: 7687
diff changeset
22 PURE=
38813
4ca5932065ca i18n: avoid substitution of PYFILES at runtime for readability of output
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 38561
diff changeset
23 PYFILESCMD=find mercurial hgext doc -name '*.py'
4ca5932065ca i18n: avoid substitution of PYFILES at runtime for readability of output
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 38561
diff changeset
24 PYFILES:=$(shell $(PYFILESCMD))
43736
640bae94f2f3 cleanup: update references to /help/ that should now be /helptext/
Augie Fackler <augie@google.com>
parents: 43508
diff changeset
25 DOCFILES=mercurial/helptext/*.txt
19427
80983af366b5 doc: make i18n man and html
Takumi IINO <trot.thunder@gmail.com>
parents: 18598
diff changeset
26 export LANGUAGE=C
80983af366b5 doc: make i18n man and html
Takumi IINO <trot.thunder@gmail.com>
parents: 18598
diff changeset
27 export LC_ALL=C
24195
250d9cf97fb3 Makefile: allow setting HGTESTFLAGS in shell environment for TESTFLAGS
Augie Fackler <augie@google.com>
parents: 24194
diff changeset
28 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
33595
c5607b65fcb8 osx: wire up genosxversion script
Augie Fackler <augie@google.com>
parents: 33033
diff changeset
29 OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
42805
7521e6d18057 makefile: run Rust tests if cargo is installed
Raphaël Gomès <rgomes@octobus.net>
parents: 42058
diff changeset
30 CARGO = cargo
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
31
18056
7c9b07f0da73 makefile: allow local builds to work on windows/mingw32
Bryan O'Sullivan <bryano@fb.com>
parents: 17927
diff changeset
32 # Set this to e.g. "mingw32" to use a non-default compiler.
7c9b07f0da73 makefile: allow local builds to work on windows/mingw32
Bryan O'Sullivan <bryano@fb.com>
parents: 17927
diff changeset
33 COMPILER=
7c9b07f0da73 makefile: allow local builds to work on windows/mingw32
Bryan O'Sullivan <bryano@fb.com>
parents: 17927
diff changeset
34
29003
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
35 COMPILERFLAG_tmp_ =
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
36 COMPILERFLAG_tmp_${COMPILER} ?= -c $(COMPILER)
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
37 COMPILERFLAG=${COMPILERFLAG_tmp_${COMPILER}}
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
38
2244
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
39 help:
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
40 @echo 'Commonly used make targets:'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
41 @echo ' all - build program and documentation'
20311
8824009d2704 makefile: add $ to environment variables in help message
Matt Mackall <mpm@selenic.com>
parents: 20121
diff changeset
42 @echo ' install - install program and man pages to $$PREFIX ($(PREFIX))'
8824009d2704 makefile: add $ to environment variables in help message
Matt Mackall <mpm@selenic.com>
parents: 20121
diff changeset
43 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))'
4706
f0aa759b8f93 Makefile: change "make local" to build a fully working local version.
Markus F.X.J. Oberhumer <markus@oberhumer.com>
parents: 3969
diff changeset
44 @echo ' local - build for inplace usage'
2244
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
45 @echo ' tests - run all tests in the automatic test suite'
15379
3ca419fb435e Makefile: adjust example, test-merge1 is now test-merge1.t
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14815
diff changeset
46 @echo ' test-foo - run only specified tests (e.g. test-merge1.t)'
2244
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
47 @echo ' dist - run all tests and create a source tarball in dist/'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
48 @echo ' clean - remove files created by other targets'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
49 @echo ' (except installed files or dist source tarball)'
7648
02e358a3a8a7 i18n: let Makefile generate i18n/hg.pot
Martin Geisler <mg@daimi.au.dk>
parents: 4707
diff changeset
50 @echo ' update-pot - update i18n/hg.pot'
2244
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
51 @echo
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
52 @echo 'Example for a system-wide installation under /usr/local:'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
53 @echo ' make all && su -c "make install" && hg version'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
54 @echo
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
55 @echo 'Example for a local installation (usable in this directory):'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
56 @echo ' make local && ./hg version'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
57
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
58 all: build doc
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
59
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
60 local:
50092
010a1e73f69e setup: further improve the error path for version retrieval
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49831
diff changeset
61 MERCURIAL_SETUP_MAKE_LOCAL=1 $(PYTHON) setup.py $(PURE) \
18056
7c9b07f0da73 makefile: allow local builds to work on windows/mingw32
Bryan O'Sullivan <bryano@fb.com>
parents: 17927
diff changeset
62 build_py -c -d . \
29003
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
63 build_ext $(COMPILERFLAG) -i \
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
64 build_hgexe $(COMPILERFLAG) -i \
18056
7c9b07f0da73 makefile: allow local builds to work on windows/mingw32
Bryan O'Sullivan <bryano@fb.com>
parents: 17927
diff changeset
65 build_mo
17927
9796d5437e72 makefile: don't use system hgrc when running hg in-place
Bryan O'Sullivan <bryano@fb.com>
parents: 17062
diff changeset
66 env HGRCPATH= $(PYTHON) hg version
1020
f1b052db3515 Add default make rule
mpm@selenic.com
parents: 1008
diff changeset
67
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
68 build:
29003
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
69 $(PYTHON) setup.py $(PURE) build $(COMPILERFLAG)
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
70
46750
350e7f051e95 makefile: add a build-chg option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45968
diff changeset
71 build-chg:
350e7f051e95 makefile: add a build-chg option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45968
diff changeset
72 make -C contrib/chg
350e7f051e95 makefile: add a build-chg option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45968
diff changeset
73
46752
a20674f2055c makefile: add a build-rhg option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46751
diff changeset
74 build-rhg:
a20674f2055c makefile: add a build-rhg option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46751
diff changeset
75 (cd rust/rhg; cargo build --release)
a20674f2055c makefile: add a build-rhg option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46751
diff changeset
76
26601
c5c7c686d6a6 makefile: add wheel build target
Nathan Goldbaum <ngoldbau@ucsc.edu>
parents: 26108
diff changeset
77 wheel:
29003
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
78 FORCE_SETUPTOOLS=1 $(PYTHON) setup.py $(PURE) bdist_wheel $(COMPILERFLAG)
26601
c5c7c686d6a6 makefile: add wheel build target
Nathan Goldbaum <ngoldbau@ucsc.edu>
parents: 26108
diff changeset
79
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
80 doc:
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
81 $(MAKE) -C doc
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
82
29640
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
83 cleanbutpackages:
44201
64e104ca555e make: also delete hg.exe when cleaning
Matt Harbison <matt_harbison@yahoo.com>
parents: 43736
diff changeset
84 rm -f hg.exe
8365
94e91205d9b6 Makefile: fix grammar in comment
Greg Ward <greg-hg@gerg.ca>
parents: 8273
diff changeset
85 -$(PYTHON) setup.py clean --all # ignore errors from this command
33605
92f7dcf9a40b make: add new directory 'hgdemandimport' to cleanbutpackages rule
Sean Farley <sean@farley.io>
parents: 33596
diff changeset
86 find contrib doc hgext hgext3rd i18n mercurial tests hgdemandimport \
20007
23edc6673f0d make: restrict recursion in make clean
Matt Mackall <mpm@selenic.com>
parents: 19991
diff changeset
87 \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
22375
308ab71207ff build: don't clean __version__.py on 'make clean' in release tarballs
J. Lewis Muir <jlmuir@anl.gov>
parents: 22358
diff changeset
88 rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
28430
17b85d739b62 setup: create a module for the modulepolicy
timeless <timeless@mozdev.org>
parents: 27212
diff changeset
89 rm -f mercurial/__modulepolicy__.py
22375
308ab71207ff build: don't clean __version__.py on 'make clean' in release tarballs
J. Lewis Muir <jlmuir@anl.gov>
parents: 22358
diff changeset
90 if test -d .hg; then rm -f mercurial/__version__.py; fi
29640
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
91 rm -rf build mercurial/locale
1423
76239f0cb0dc Use $(MAKE) not make
levon@movementarian.org
parents: 1020
diff changeset
92 $(MAKE) -C doc clean
28974
ef5553fab197 make: add chg to clean rule
Sean Farley <sean@farley.io>
parents: 28457
diff changeset
93 $(MAKE) -C contrib/chg distclean
40833
9072a890e523 rust: make clean takes care of rust/target
Georges Racinet <gracinet@anybox.fr>
parents: 40585
diff changeset
94 rm -rf rust/target
40967
462a26756f70 rust-cpython: build via HGWITHRUSTEXT=cpython
Georges Racinet <gracinet@anybox.fr>
parents: 40833
diff changeset
95 rm -f mercurial/rustext.so
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
96
29640
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
97 clean: cleanbutpackages
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
98 rm -rf packages
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
99
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
100 install: install-bin install-doc
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
101
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
102 install-bin: build
10961
ce6d56b95f2e Respect the DESTDIR variable during 'make install'
Dévai Tamás <devait@vnet.hu>
parents: 10134
diff changeset
103 $(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
104
46751
a7204958ca21 makefile: add a install-chg option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46750
diff changeset
105 install-chg: build-chg
a7204958ca21 makefile: add a install-chg option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46750
diff changeset
106 make -C contrib/chg install PREFIX="$(PREFIX)"
a7204958ca21 makefile: add a install-chg option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46750
diff changeset
107
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
108 install-doc: doc
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
109 cd doc && $(MAKE) $(MFLAGS) install
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
110
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
111 install-home: install-home-bin install-home-doc
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
112
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
113 install-home-bin: build
20614
1bc68ff4e0a2 setup: specify --prefix="" for install-home-bin to avoid badness with defaults
Augie Fackler <raf@durin42.com>
parents: 20358
diff changeset
114 $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
115
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
116 install-home-doc: doc
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
117 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
118
46753
99c0b03894ee makefile: add a install option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46752
diff changeset
119 install-rhg: build-rhg
99c0b03894ee makefile: add a install option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46752
diff changeset
120 install -m 755 rust/target/release/rhg "$(PREFIX)"/bin/
99c0b03894ee makefile: add a install option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46752
diff changeset
121
3872
9d7ac8613340 fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3865
diff changeset
122 MANIFEST-doc:
9d7ac8613340 fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3865
diff changeset
123 $(MAKE) -C doc MANIFEST
9d7ac8613340 fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3865
diff changeset
124
14558
2ce7dfe17bc5 distutils: Create MANIFEST.in instead of MANIFEST in Makefile
Stephen Thorne <stephen@thorne.id.au>
parents: 14315
diff changeset
125 MANIFEST.in: MANIFEST-doc
2ce7dfe17bc5 distutils: Create MANIFEST.in instead of MANIFEST in Makefile
Stephen Thorne <stephen@thorne.id.au>
parents: 14315
diff changeset
126 hg manifest | sed -e 's/^/include /' > MANIFEST.in
2ce7dfe17bc5 distutils: Create MANIFEST.in instead of MANIFEST in Makefile
Stephen Thorne <stephen@thorne.id.au>
parents: 14315
diff changeset
127 echo include mercurial/__version__.py >> MANIFEST.in
2ce7dfe17bc5 distutils: Create MANIFEST.in instead of MANIFEST in Makefile
Stephen Thorne <stephen@thorne.id.au>
parents: 14315
diff changeset
128 sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
3872
9d7ac8613340 fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3865
diff changeset
129
2234
9ea93ff67a73 New make target "dist-notests" to create tarballs without running tests first.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2233
diff changeset
130 dist: tests dist-notests
9ea93ff67a73 New make target "dist-notests" to create tarballs without running tests first.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2233
diff changeset
131
14558
2ce7dfe17bc5 distutils: Create MANIFEST.in instead of MANIFEST in Makefile
Stephen Thorne <stephen@thorne.id.au>
parents: 14315
diff changeset
132 dist-notests: doc MANIFEST.in
3865
36a957364b1b Make make dist a bit quieter
Matt Mackall <mpm@selenic.com>
parents: 3864
diff changeset
133 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
134
14172
1a919c3271bf add make check: tests rule
Johan Euphrosine <proppy@google.com>
parents: 13101
diff changeset
135 check: tests
1a919c3271bf add make check: tests rule
Johan Euphrosine <proppy@google.com>
parents: 13101
diff changeset
136
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
137 tests:
42805
7521e6d18057 makefile: run Rust tests if cargo is installed
Raphaël Gomès <rgomes@octobus.net>
parents: 42058
diff changeset
138 # Run Rust tests if cargo is installed
7521e6d18057 makefile: run Rust tests if cargo is installed
Raphaël Gomès <rgomes@octobus.net>
parents: 42058
diff changeset
139 if command -v $(CARGO) >/dev/null 2>&1; then \
43289
8d432d3a2d7c rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org>
parents: 42805
diff changeset
140 $(MAKE) rust-tests; \
49939
0a58aaa2009c makefile: add `cargo clippy` to tests if cargo is available
Raphaël Gomès <rgomes@octobus.net>
parents: 49938
diff changeset
141 $(MAKE) cargo-clippy; \
42805
7521e6d18057 makefile: run Rust tests if cargo is installed
Raphaël Gomès <rgomes@octobus.net>
parents: 42058
diff changeset
142 fi
3969
edaf68032a27 add possibility to pass flags when testing with the Makefile
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3872
diff changeset
143 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
144
1426
e84c69b43cdb add a target for running only one test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1423
diff changeset
145 test-%:
3969
edaf68032a27 add possibility to pass flags when testing with the Makefile
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3872
diff changeset
146 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
1426
e84c69b43cdb add a target for running only one test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1423
diff changeset
147
24194
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
148 testpy-%:
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
149 @echo Looking for Python $* in $(HGPYTHONS)
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
150 [ -e $(HGPYTHONS)/$*/bin/python ] || ( \
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
151 cd $$(mktemp --directory --tmpdir) && \
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
152 $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
153 cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
154
43289
8d432d3a2d7c rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org>
parents: 42805
diff changeset
155 rust-tests:
49938
e3274e02d08e rust-tests: run `cargo` tests inside the `rust` folder
Raphaël Gomès <rgomes@octobus.net>
parents: 49831
diff changeset
156 cd $(HGROOT)/rust \
48842
649ff7f86f96 rust: enable Python 3 support unconditionally
Simon Sapin <simon.sapin@octobus.net>
parents: 48740
diff changeset
157 && $(CARGO) test --quiet --all --features "$(HG_RUST_FEATURES)"
43289
8d432d3a2d7c rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org>
parents: 42805
diff changeset
158
49939
0a58aaa2009c makefile: add `cargo clippy` to tests if cargo is available
Raphaël Gomès <rgomes@octobus.net>
parents: 49938
diff changeset
159 cargo-clippy:
0a58aaa2009c makefile: add `cargo clippy` to tests if cargo is available
Raphaël Gomès <rgomes@octobus.net>
parents: 49938
diff changeset
160 cd $(HGROOT)/rust \
49949
3c37cb7bce61 clippy: actually fail if there are any warnings
Raphaël Gomès <rgomes@octobus.net>
parents: 49939
diff changeset
161 && $(CARGO) clippy --all --features "$(HG_RUST_FEATURES)" -- -D warnings
49939
0a58aaa2009c makefile: add `cargo clippy` to tests if cargo is available
Raphaël Gomès <rgomes@octobus.net>
parents: 49938
diff changeset
162
18598
4723ccb62282 check-code: add Makefile target to run check-code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 18056
diff changeset
163 check-code:
4723ccb62282 check-code: add Makefile target to run check-code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 18056
diff changeset
164 hg manifest | xargs python contrib/check-code.py
4723ccb62282 check-code: add Makefile target to run check-code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 18056
diff changeset
165
34859
2bf152128d59 makefile: add target to apply clang-format in-place
Augie Fackler <augie@google.com>
parents: 34655
diff changeset
166 format-c:
2bf152128d59 makefile: add target to apply clang-format in-place
Augie Fackler <augie@google.com>
parents: 34655
diff changeset
167 clang-format --style file -i \
37184
0024961aa493 contrib: rename clang-format-blacklist to clang-format-ignorelist
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36922
diff changeset
168 `hg files 'set:(**.c or **.cc or **.h) and not "listfile:contrib/clang-format-ignorelist"'`
34859
2bf152128d59 makefile: add target to apply clang-format in-place
Augie Fackler <augie@google.com>
parents: 34655
diff changeset
169
7893
606723f4a327 enhance Makefile for language translators
Tobias Bell <tobias.bell@gmail.com>
parents: 7791
diff changeset
170 update-pot: i18n/hg.pot
606723f4a327 enhance Makefile for language translators
Tobias Bell <tobias.bell@gmail.com>
parents: 7791
diff changeset
171
20358
4276c906d90e Makefile: hg.pot depends on the scripts generating it
Simon Heimberg <simohe@besonet.ch>
parents: 20311
diff changeset
172 i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext
8542
de150a942ec8 i18n: accurately generate hg.pot
Martin Geisler <mg@lazybytes.net>
parents: 8365
diff changeset
173 $(PYTHON) i18n/hggettext mercurial/commands.py \
16126
0c4bec9596d8 filemerge: create detail of internal merge tools from documentation string
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15379
diff changeset
174 hgext/*.py hgext/*/__init__.py \
0c4bec9596d8 filemerge: create detail of internal merge tools from documentation string
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15379
diff changeset
175 mercurial/fileset.py mercurial/revset.py \
36922
521f6c7e1756 templater: split template functions to new module
Yuya Nishihara <yuya@tcha.org>
parents: 35909
diff changeset
176 mercurial/templatefilters.py \
521f6c7e1756 templater: split template functions to new module
Yuya Nishihara <yuya@tcha.org>
parents: 35909
diff changeset
177 mercurial/templatefuncs.py \
521f6c7e1756 templater: split template functions to new module
Yuya Nishihara <yuya@tcha.org>
parents: 35909
diff changeset
178 mercurial/templatekw.py \
16126
0c4bec9596d8 filemerge: create detail of internal merge tools from documentation string
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15379
diff changeset
179 mercurial/filemerge.py \
24859
64e3f97bdf08 i18n: extract doc string of each web commands as translatable one
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24601
diff changeset
180 mercurial/hgweb/webcommands.py \
33820
fa7e30efe05a i18n: get translation entries for description of each compression engines
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 33681
diff changeset
181 mercurial/util.py \
20121
2af9e1d40dc7 Makefile: temporary copy of hg.pot is hg.pot.tmp instead of hg.pot~
Simon Heimberg <simohe@besonet.ch>
parents: 20120
diff changeset
182 $(DOCFILES) > i18n/hg.pot.tmp
7710
88326ee85a1b i18n: extract strings with xgettext
Martin Geisler <mg@daimi.au.dk>
parents: 7706
diff changeset
183 # All strings marked for translation in Mercurial contain
88326ee85a1b i18n: extract strings with xgettext
Martin Geisler <mg@daimi.au.dk>
parents: 7706
diff changeset
184 # ASCII characters only. But some files contain string
88326ee85a1b i18n: extract strings with xgettext
Martin Geisler <mg@daimi.au.dk>
parents: 7706
diff changeset
185 # literals like this '\037\213'. xgettext thinks it has to
8273
a9c1172a025e Makefile: fixed comment
Martin Geisler <mg@lazybytes.net>
parents: 8272
diff changeset
186 # parse them even though they are not marked for translation.
a9c1172a025e Makefile: fixed comment
Martin Geisler <mg@lazybytes.net>
parents: 8272
diff changeset
187 # Extracting with an explicit encoding of ISO-8859-1 will make
a9c1172a025e Makefile: fixed comment
Martin Geisler <mg@lazybytes.net>
parents: 8272
diff changeset
188 # xgettext "parse" and ignore them.
38813
4ca5932065ca i18n: avoid substitution of PYFILES at runtime for readability of output
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 38561
diff changeset
189 $(PYFILESCMD) | xargs \
9278
3d9f77c03105 Makefile: remove non-default wrapping of hg.pot strings
Martin Geisler <mg@lazybytes.net>
parents: 9079
diff changeset
190 xgettext --package-name "Mercurial" \
30890
22a4f664c1a5 misc: replace domain of mercurial-devel ML address by mercurial-scm.org
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30705
diff changeset
191 --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \
46819
d4ba4d51f85f contributor: change mentions of mpm to olivia
Raphaël Gomès <rgomes@octobus.net>
parents: 46753
diff changeset
192 --copyright-holder "Olivia Mackall <olivia@selenic.com> and others" \
12806
57b9fd75b6f8 i18n: extract comments marked for translator hints
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 12500
diff changeset
193 --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
20121
2af9e1d40dc7 Makefile: temporary copy of hg.pot is hg.pot.tmp instead of hg.pot~
Simon Heimberg <simohe@besonet.ch>
parents: 20120
diff changeset
194 -d hg -p i18n -o hg.pot.tmp
2af9e1d40dc7 Makefile: temporary copy of hg.pot is hg.pot.tmp instead of hg.pot~
Simon Heimberg <simohe@besonet.ch>
parents: 20120
diff changeset
195 $(PYTHON) i18n/posplit i18n/hg.pot.tmp
20080
c845b1a95eed Makefile: intermediate steps work with temporary copy of hg.pot
Simon Heimberg <simohe@besonet.ch>
parents: 20007
diff changeset
196 # The target file is not created before the last step. So it never is in
c845b1a95eed Makefile: intermediate steps work with temporary copy of hg.pot
Simon Heimberg <simohe@besonet.ch>
parents: 20007
diff changeset
197 # an intermediate state.
20121
2af9e1d40dc7 Makefile: temporary copy of hg.pot is hg.pot.tmp instead of hg.pot~
Simon Heimberg <simohe@besonet.ch>
parents: 20120
diff changeset
198 mv -f i18n/hg.pot.tmp i18n/hg.pot
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
199
7893
606723f4a327 enhance Makefile for language translators
Tobias Bell <tobias.bell@gmail.com>
parents: 7791
diff changeset
200 %.po: i18n/hg.pot
19991
ce5d711475a3 Makefile: do update on a temporary copy of a po file
Simon Heimberg <simohe@besonet.ch>
parents: 19427
diff changeset
201 # work on a temporary copy for never having a half completed target
ce5d711475a3 Makefile: do update on a temporary copy of a po file
Simon Heimberg <simohe@besonet.ch>
parents: 19427
diff changeset
202 cp $@ $@.tmp
ce5d711475a3 Makefile: do update on a temporary copy of a po file
Simon Heimberg <simohe@besonet.ch>
parents: 19427
diff changeset
203 msgmerge --no-location --update $@.tmp $^
20120
872f81de2865 Makefile: fix po file updating by using same file name everywhere
Simon Heimberg <simohe@besonet.ch>
parents: 20080
diff changeset
204 mv -f $@.tmp $@
7893
606723f4a327 enhance Makefile for language translators
Tobias Bell <tobias.bell@gmail.com>
parents: 7791
diff changeset
205
21255
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents: 21229
diff changeset
206 # Packaging targets
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents: 21229
diff changeset
207
38014
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
208 packaging_targets := \
48740
6387562e68b3 contrib: refer to RHEL and derivatives instead of CentOS specifically
Mathias De Mare <mathias.de_mare@nokia.com>
parents: 47840
diff changeset
209 rhel7 \
6387562e68b3 contrib: refer to RHEL and derivatives instead of CentOS specifically
Mathias De Mare <mathias.de_mare@nokia.com>
parents: 47840
diff changeset
210 rhel8 \
49419
2edb41ed6c49 contrib: add support for rhel9
Mathias De Mare <mathias.de_mare@nokia.com>
parents: 48988
diff changeset
211 rhel9 \
38014
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
212 deb \
48740
6387562e68b3 contrib: refer to RHEL and derivatives instead of CentOS specifically
Mathias De Mare <mathias.de_mare@nokia.com>
parents: 47840
diff changeset
213 docker-rhel7 \
6387562e68b3 contrib: refer to RHEL and derivatives instead of CentOS specifically
Mathias De Mare <mathias.de_mare@nokia.com>
parents: 47840
diff changeset
214 docker-rhel8 \
49419
2edb41ed6c49 contrib: add support for rhel9
Mathias De Mare <mathias.de_mare@nokia.com>
parents: 48988
diff changeset
215 docker-rhel9 \
43508
e468ebfcb4ce packaging: remove references to debian jessie
Augie Fackler <augie@google.com>
parents: 43405
diff changeset
216 docker-debian-bullseye \
e468ebfcb4ce packaging: remove references to debian jessie
Augie Fackler <augie@google.com>
parents: 43405
diff changeset
217 docker-debian-buster \
38014
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
218 docker-debian-stretch \
43360
0b65f18edc4f packaging: refactor "fedora29" target to a single more generic "fedora" target
Mads Kiilerich <mads@kiilerich.com>
parents: 43354
diff changeset
219 docker-fedora \
38014
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
220 docker-ubuntu-xenial \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
221 docker-ubuntu-xenial-ppa \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
222 docker-ubuntu-bionic \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
223 docker-ubuntu-bionic-ppa \
45968
971424517e17 packaging: drop Disco (19.04) and add Focal (20.04)
Matt Harbison <matt_harbison@yahoo.com>
parents: 45967
diff changeset
224 docker-ubuntu-focal \
971424517e17 packaging: drop Disco (19.04) and add Focal (20.04)
Matt Harbison <matt_harbison@yahoo.com>
parents: 45967
diff changeset
225 docker-ubuntu-focal-ppa \
43360
0b65f18edc4f packaging: refactor "fedora29" target to a single more generic "fedora" target
Mads Kiilerich <mads@kiilerich.com>
parents: 43354
diff changeset
226 fedora \
38014
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
227 linux-wheels \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
228 linux-wheels-x86_64 \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
229 linux-wheels-i686 \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
230 ppa
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
231
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
232 # Forward packaging targets for convenience.
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
233 $(packaging_targets):
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
234 $(MAKE) -C contrib/packaging $@
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
235
21559
9a9de26ad99a make: add a basic osx mpkg target
Matt Mackall <mpm@selenic.com>
parents: 21255
diff changeset
236 osx:
31611
6359976b43be osx: always purge build/mercurial before starting build
Augie Fackler <augie@google.com>
parents: 31609
diff changeset
237 rm -rf build/mercurial
29535
da1848f07c6a osx: explicitly build hg with /usr/bin/python2.7
Augie Fackler <augie@google.com>
parents: 29036
diff changeset
238 /usr/bin/python2.7 setup.py install --optimize=1 \
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
239 --root=build/mercurial/ --prefix=/usr/local/ \
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
240 --install-lib=/Library/Python/2.7/site-packages/
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
241 make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
32575
197eb93560b3 osx: override default exclude filter for pkgbuild
Augie Fackler <augie@google.com>
parents: 32080
diff changeset
242 # Place a bogon .DS_Store file in the target dir so we can be
197eb93560b3 osx: override default exclude filter for pkgbuild
Augie Fackler <augie@google.com>
parents: 32080
diff changeset
243 # sure it doesn't get included in the final package.
197eb93560b3 osx: override default exclude filter for pkgbuild
Augie Fackler <augie@google.com>
parents: 32080
diff changeset
244 touch build/mercurial/.DS_Store
32472
a38ed42cd23c osx: include chg by default
Augie Fackler <augie@google.com>
parents: 32471
diff changeset
245 make -C contrib/chg \
a38ed42cd23c osx: include chg by default
Augie Fackler <augie@google.com>
parents: 32471
diff changeset
246 HGPATH=/usr/local/bin/hg \
a38ed42cd23c osx: include chg by default
Augie Fackler <augie@google.com>
parents: 32471
diff changeset
247 PYTHON=/usr/bin/python2.7 \
a38ed42cd23c osx: include chg by default
Augie Fackler <augie@google.com>
parents: 32471
diff changeset
248 DESTDIR=../../build/mercurial \
a38ed42cd23c osx: include chg by default
Augie Fackler <augie@google.com>
parents: 32471
diff changeset
249 PREFIX=/usr/local \
a38ed42cd23c osx: include chg by default
Augie Fackler <augie@google.com>
parents: 32471
diff changeset
250 clean install
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
251 mkdir -p $${OUTPUTDIR:-dist}
33668
8de8f8a91f2d osx: delay version computation on macOS builds
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 33605
diff changeset
252 HGVER=$$(python contrib/genosxversion.py $(OSXVERSIONFLAGS) build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py) && \
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
253 OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
32575
197eb93560b3 osx: override default exclude filter for pkgbuild
Augie Fackler <augie@google.com>
parents: 32080
diff changeset
254 pkgbuild --filter \\.DS_Store --root build/mercurial/ \
29777
afa74947a414 osx: stamp the hg version into the version field in the pkg
Augie Fackler <augie@google.com>
parents: 29640
diff changeset
255 --identifier org.mercurial-scm.mercurial \
afa74947a414 osx: stamp the hg version into the version field in the pkg
Augie Fackler <augie@google.com>
parents: 29640
diff changeset
256 --version "$${HGVER}" \
afa74947a414 osx: stamp the hg version into the version field in the pkg
Augie Fackler <augie@google.com>
parents: 29640
diff changeset
257 build/mercurial.pkg && \
38012
e5d2248dcc39 packaging: move contrib/macosx to contrib/packaging/
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38010
diff changeset
258 productbuild --distribution contrib/packaging/macosx/distribution.xml \
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
259 --package-path build/ \
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
260 --version "$${HGVER}" \
38012
e5d2248dcc39 packaging: move contrib/macosx to contrib/packaging/
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38010
diff changeset
261 --resources contrib/packaging/macosx/ \
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
262 "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg
21559
9a9de26ad99a make: add a basic osx mpkg target
Matt Mackall <mpm@selenic.com>
parents: 21255
diff changeset
263
45833
be6544a05e8f make: add a pyoxidizer target
Augie Fackler <augie@google.com>
parents: 45821
diff changeset
264 pyoxidizer:
be6544a05e8f make: add a pyoxidizer target
Augie Fackler <augie@google.com>
parents: 45821
diff changeset
265 $(PYOXIDIZER) build --path ./rust/hgcli --release
be6544a05e8f make: add a pyoxidizer target
Augie Fackler <augie@google.com>
parents: 45821
diff changeset
266
47835
da39b9c1c486 pyoxidized: add a copy of the `templates` directory in the right location
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47834
diff changeset
267
47834
d3f890e04525 pyoxidized: add a dedicated target in the tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46819
diff changeset
268 # a temporary target to setup all we need for run-tests.py --pyoxidizer
d3f890e04525 pyoxidized: add a dedicated target in the tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46819
diff changeset
269 # (should go away as the run-tests implementation improves
49831
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
270 pyoxidizer-windows-tests: PYOX_DIR=build/pyoxidizer/x86_64-pc-windows-msvc/release/app
47834
d3f890e04525 pyoxidized: add a dedicated target in the tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46819
diff changeset
271 pyoxidizer-windows-tests: pyoxidizer
47835
da39b9c1c486 pyoxidized: add a copy of the `templates` directory in the right location
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47834
diff changeset
272 rm -rf $(PYOX_DIR)/templates
da39b9c1c486 pyoxidized: add a copy of the `templates` directory in the right location
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47834
diff changeset
273 cp -ar $(PYOX_DIR)/lib/mercurial/templates $(PYOX_DIR)/templates
47837
6fc9bd898eec pyoxidized: add a copy of the `helptext` directory in the right location
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47835
diff changeset
274 rm -rf $(PYOX_DIR)/helptext
6fc9bd898eec pyoxidized: add a copy of the `helptext` directory in the right location
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47835
diff changeset
275 cp -ar $(PYOX_DIR)/lib/mercurial/helptext $(PYOX_DIR)/helptext
47838
a99ffbcdb6a9 pyoxidized: add a copy of the `defaultrc` file in the right location
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47837
diff changeset
276 rm -rf $(PYOX_DIR)/defaultrc
a99ffbcdb6a9 pyoxidized: add a copy of the `defaultrc` file in the right location
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47837
diff changeset
277 cp -ar $(PYOX_DIR)/lib/mercurial/defaultrc $(PYOX_DIR)/defaultrc
47839
a24e813db705 pyoxidized: add a copy of the `contrib` directory in the right location
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47838
diff changeset
278 rm -rf $(PYOX_DIR)/contrib
a24e813db705 pyoxidized: add a copy of the `contrib` directory in the right location
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47838
diff changeset
279 cp -ar contrib $(PYOX_DIR)/contrib
47840
f799355d8fe3 pyoxidized: add a copy of the `doc` directory in the right location
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47839
diff changeset
280 rm -rf $(PYOX_DIR)/doc
f799355d8fe3 pyoxidized: add a copy of the `doc` directory in the right location
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47839
diff changeset
281 cp -ar doc $(PYOX_DIR)/doc
47835
da39b9c1c486 pyoxidized: add a copy of the `templates` directory in the right location
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47834
diff changeset
282
47834
d3f890e04525 pyoxidized: add a dedicated target in the tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46819
diff changeset
283
49831
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
284 # a temporary target to setup all we need for run-tests.py --pyoxidizer
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
285 # (should go away as the run-tests implementation improves
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
286 pyoxidizer-macos-tests: PYOX_DIR=build/pyoxidizer/x86_64-apple-darwin/release/app
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
287 pyoxidizer-macos-tests: pyoxidizer
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
288 rm -rf $(PYOX_DIR)/templates
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
289 cp -a mercurial/templates $(PYOX_DIR)/templates
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
290 rm -rf $(PYOX_DIR)/helptext
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
291 cp -a mercurial/helptext $(PYOX_DIR)/helptext
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
292 rm -rf $(PYOX_DIR)/defaultrc
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
293 cp -a mercurial/defaultrc $(PYOX_DIR)/defaultrc
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
294 rm -rf $(PYOX_DIR)/contrib
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
295 cp -a contrib $(PYOX_DIR)/contrib
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
296 rm -rf $(PYOX_DIR)/doc
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
297 cp -a doc $(PYOX_DIR)/doc
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
298
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
299
29640
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
300 .PHONY: help all local build doc cleanbutpackages clean install install-bin \
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
301 install-doc install-home install-home-bin install-home-doc \
43289
8d432d3a2d7c rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org>
parents: 42805
diff changeset
302 dist dist-notests check tests rust-tests check-code format-c \
49831
d5b722ce9864 make: add a target for building pyoxidizer tests on macOS
Matt Harbison <matt_harbison@yahoo.com>
parents: 49419
diff changeset
303 update-pot pyoxidizer pyoxidizer-windows-tests pyoxidizer-macos-tests \
38014
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
304 $(packaging_targets) \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38012
diff changeset
305 osx