##// END OF EJS Templates
chg: remove outdated rule to start test server...
Yuya Nishihara -
r34656:01c57eeb default
parent child Browse files
Show More
@@ -1,316 +1,315 b''
1 # If you want to change PREFIX, do not just edit it below. The changed
1 # If you want to change PREFIX, do not just edit it below. The changed
2 # value wont get passed on to recursive make calls. You should instead
2 # value wont get passed on to recursive make calls. You should instead
3 # override the variable on the command like:
3 # override the variable on the command like:
4 #
4 #
5 # % make PREFIX=/opt/ install
5 # % make PREFIX=/opt/ install
6
6
7 export PREFIX=/usr/local
7 export PREFIX=/usr/local
8 PYTHON=python
8 PYTHON=python
9 $(eval HGROOT := $(shell pwd))
9 $(eval HGROOT := $(shell pwd))
10 HGPYTHONS ?= $(HGROOT)/build/pythons
10 HGPYTHONS ?= $(HGROOT)/build/pythons
11 PURE=
11 PURE=
12 PYFILES:=$(shell find mercurial hgext doc -name '*.py')
12 PYFILES:=$(shell find mercurial hgext doc -name '*.py')
13 DOCFILES=mercurial/help/*.txt
13 DOCFILES=mercurial/help/*.txt
14 export LANGUAGE=C
14 export LANGUAGE=C
15 export LC_ALL=C
15 export LC_ALL=C
16 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
16 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
17 OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
17 OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
18
18
19 # Set this to e.g. "mingw32" to use a non-default compiler.
19 # Set this to e.g. "mingw32" to use a non-default compiler.
20 COMPILER=
20 COMPILER=
21
21
22 COMPILERFLAG_tmp_ =
22 COMPILERFLAG_tmp_ =
23 COMPILERFLAG_tmp_${COMPILER} ?= -c $(COMPILER)
23 COMPILERFLAG_tmp_${COMPILER} ?= -c $(COMPILER)
24 COMPILERFLAG=${COMPILERFLAG_tmp_${COMPILER}}
24 COMPILERFLAG=${COMPILERFLAG_tmp_${COMPILER}}
25
25
26 help:
26 help:
27 @echo 'Commonly used make targets:'
27 @echo 'Commonly used make targets:'
28 @echo ' all - build program and documentation'
28 @echo ' all - build program and documentation'
29 @echo ' install - install program and man pages to $$PREFIX ($(PREFIX))'
29 @echo ' install - install program and man pages to $$PREFIX ($(PREFIX))'
30 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))'
30 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))'
31 @echo ' local - build for inplace usage'
31 @echo ' local - build for inplace usage'
32 @echo ' tests - run all tests in the automatic test suite'
32 @echo ' tests - run all tests in the automatic test suite'
33 @echo ' test-foo - run only specified tests (e.g. test-merge1.t)'
33 @echo ' test-foo - run only specified tests (e.g. test-merge1.t)'
34 @echo ' dist - run all tests and create a source tarball in dist/'
34 @echo ' dist - run all tests and create a source tarball in dist/'
35 @echo ' clean - remove files created by other targets'
35 @echo ' clean - remove files created by other targets'
36 @echo ' (except installed files or dist source tarball)'
36 @echo ' (except installed files or dist source tarball)'
37 @echo ' update-pot - update i18n/hg.pot'
37 @echo ' update-pot - update i18n/hg.pot'
38 @echo
38 @echo
39 @echo 'Example for a system-wide installation under /usr/local:'
39 @echo 'Example for a system-wide installation under /usr/local:'
40 @echo ' make all && su -c "make install" && hg version'
40 @echo ' make all && su -c "make install" && hg version'
41 @echo
41 @echo
42 @echo 'Example for a local installation (usable in this directory):'
42 @echo 'Example for a local installation (usable in this directory):'
43 @echo ' make local && ./hg version'
43 @echo ' make local && ./hg version'
44
44
45 all: build doc
45 all: build doc
46
46
47 local:
47 local:
48 $(PYTHON) setup.py $(PURE) \
48 $(PYTHON) setup.py $(PURE) \
49 build_py -c -d . \
49 build_py -c -d . \
50 build_ext $(COMPILERFLAG) -i \
50 build_ext $(COMPILERFLAG) -i \
51 build_hgexe $(COMPILERFLAG) -i \
51 build_hgexe $(COMPILERFLAG) -i \
52 build_mo
52 build_mo
53 env HGRCPATH= $(PYTHON) hg version
53 env HGRCPATH= $(PYTHON) hg version
54
54
55 build:
55 build:
56 $(PYTHON) setup.py $(PURE) build $(COMPILERFLAG)
56 $(PYTHON) setup.py $(PURE) build $(COMPILERFLAG)
57
57
58 wheel:
58 wheel:
59 FORCE_SETUPTOOLS=1 $(PYTHON) setup.py $(PURE) bdist_wheel $(COMPILERFLAG)
59 FORCE_SETUPTOOLS=1 $(PYTHON) setup.py $(PURE) bdist_wheel $(COMPILERFLAG)
60
60
61 doc:
61 doc:
62 $(MAKE) -C doc
62 $(MAKE) -C doc
63
63
64 cleanbutpackages:
64 cleanbutpackages:
65 -$(PYTHON) setup.py clean --all # ignore errors from this command
65 -$(PYTHON) setup.py clean --all # ignore errors from this command
66 find contrib doc hgext hgext3rd i18n mercurial tests hgdemandimport \
66 find contrib doc hgext hgext3rd i18n mercurial tests hgdemandimport \
67 \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
67 \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
68 rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
68 rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
69 rm -f mercurial/__modulepolicy__.py
69 rm -f mercurial/__modulepolicy__.py
70 if test -d .hg; then rm -f mercurial/__version__.py; fi
70 if test -d .hg; then rm -f mercurial/__version__.py; fi
71 rm -rf build mercurial/locale
71 rm -rf build mercurial/locale
72 $(MAKE) -C doc clean
72 $(MAKE) -C doc clean
73 $(MAKE) -C contrib/chg distclean
73 $(MAKE) -C contrib/chg distclean
74
74
75 clean: cleanbutpackages
75 clean: cleanbutpackages
76 rm -rf packages
76 rm -rf packages
77
77
78 install: install-bin install-doc
78 install: install-bin install-doc
79
79
80 install-bin: build
80 install-bin: build
81 $(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force
81 $(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force
82
82
83 install-doc: doc
83 install-doc: doc
84 cd doc && $(MAKE) $(MFLAGS) install
84 cd doc && $(MAKE) $(MFLAGS) install
85
85
86 install-home: install-home-bin install-home-doc
86 install-home: install-home-bin install-home-doc
87
87
88 install-home-bin: build
88 install-home-bin: build
89 $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force
89 $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force
90
90
91 install-home-doc: doc
91 install-home-doc: doc
92 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
92 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
93
93
94 MANIFEST-doc:
94 MANIFEST-doc:
95 $(MAKE) -C doc MANIFEST
95 $(MAKE) -C doc MANIFEST
96
96
97 MANIFEST.in: MANIFEST-doc
97 MANIFEST.in: MANIFEST-doc
98 hg manifest | sed -e 's/^/include /' > MANIFEST.in
98 hg manifest | sed -e 's/^/include /' > MANIFEST.in
99 echo include mercurial/__version__.py >> MANIFEST.in
99 echo include mercurial/__version__.py >> MANIFEST.in
100 sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
100 sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
101
101
102 dist: tests dist-notests
102 dist: tests dist-notests
103
103
104 dist-notests: doc MANIFEST.in
104 dist-notests: doc MANIFEST.in
105 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
105 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
106
106
107 check: tests
107 check: tests
108
108
109 tests:
109 tests:
110 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
110 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
111
111
112 test-%:
112 test-%:
113 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
113 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
114
114
115 testpy-%:
115 testpy-%:
116 @echo Looking for Python $* in $(HGPYTHONS)
116 @echo Looking for Python $* in $(HGPYTHONS)
117 [ -e $(HGPYTHONS)/$*/bin/python ] || ( \
117 [ -e $(HGPYTHONS)/$*/bin/python ] || ( \
118 cd $$(mktemp --directory --tmpdir) && \
118 cd $$(mktemp --directory --tmpdir) && \
119 $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
119 $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
120 cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
120 cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
121
121
122 check-code:
122 check-code:
123 hg manifest | xargs python contrib/check-code.py
123 hg manifest | xargs python contrib/check-code.py
124
124
125 update-pot: i18n/hg.pot
125 update-pot: i18n/hg.pot
126
126
127 i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext
127 i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext
128 $(PYTHON) i18n/hggettext mercurial/commands.py \
128 $(PYTHON) i18n/hggettext mercurial/commands.py \
129 hgext/*.py hgext/*/__init__.py \
129 hgext/*.py hgext/*/__init__.py \
130 mercurial/fileset.py mercurial/revset.py \
130 mercurial/fileset.py mercurial/revset.py \
131 mercurial/templatefilters.py mercurial/templatekw.py \
131 mercurial/templatefilters.py mercurial/templatekw.py \
132 mercurial/templater.py \
132 mercurial/templater.py \
133 mercurial/filemerge.py \
133 mercurial/filemerge.py \
134 mercurial/hgweb/webcommands.py \
134 mercurial/hgweb/webcommands.py \
135 mercurial/util.py \
135 mercurial/util.py \
136 $(DOCFILES) > i18n/hg.pot.tmp
136 $(DOCFILES) > i18n/hg.pot.tmp
137 # All strings marked for translation in Mercurial contain
137 # All strings marked for translation in Mercurial contain
138 # ASCII characters only. But some files contain string
138 # ASCII characters only. But some files contain string
139 # literals like this '\037\213'. xgettext thinks it has to
139 # literals like this '\037\213'. xgettext thinks it has to
140 # parse them even though they are not marked for translation.
140 # parse them even though they are not marked for translation.
141 # Extracting with an explicit encoding of ISO-8859-1 will make
141 # Extracting with an explicit encoding of ISO-8859-1 will make
142 # xgettext "parse" and ignore them.
142 # xgettext "parse" and ignore them.
143 echo $(PYFILES) | xargs \
143 echo $(PYFILES) | xargs \
144 xgettext --package-name "Mercurial" \
144 xgettext --package-name "Mercurial" \
145 --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \
145 --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \
146 --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \
146 --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \
147 --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
147 --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
148 -d hg -p i18n -o hg.pot.tmp
148 -d hg -p i18n -o hg.pot.tmp
149 $(PYTHON) i18n/posplit i18n/hg.pot.tmp
149 $(PYTHON) i18n/posplit i18n/hg.pot.tmp
150 # The target file is not created before the last step. So it never is in
150 # The target file is not created before the last step. So it never is in
151 # an intermediate state.
151 # an intermediate state.
152 mv -f i18n/hg.pot.tmp i18n/hg.pot
152 mv -f i18n/hg.pot.tmp i18n/hg.pot
153
153
154 %.po: i18n/hg.pot
154 %.po: i18n/hg.pot
155 # work on a temporary copy for never having a half completed target
155 # work on a temporary copy for never having a half completed target
156 cp $@ $@.tmp
156 cp $@ $@.tmp
157 msgmerge --no-location --update $@.tmp $^
157 msgmerge --no-location --update $@.tmp $^
158 mv -f $@.tmp $@
158 mv -f $@.tmp $@
159
159
160 # Packaging targets
160 # Packaging targets
161
161
162 osx:
162 osx:
163 rm -rf build/mercurial
163 rm -rf build/mercurial
164 /usr/bin/python2.7 setup.py install --optimize=1 \
164 /usr/bin/python2.7 setup.py install --optimize=1 \
165 --root=build/mercurial/ --prefix=/usr/local/ \
165 --root=build/mercurial/ --prefix=/usr/local/ \
166 --install-lib=/Library/Python/2.7/site-packages/
166 --install-lib=/Library/Python/2.7/site-packages/
167 make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
167 make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
168 # Place a bogon .DS_Store file in the target dir so we can be
168 # Place a bogon .DS_Store file in the target dir so we can be
169 # sure it doesn't get included in the final package.
169 # sure it doesn't get included in the final package.
170 touch build/mercurial/.DS_Store
170 touch build/mercurial/.DS_Store
171 # install zsh completions - this location appears to be
171 # install zsh completions - this location appears to be
172 # searched by default as of macOS Sierra.
172 # searched by default as of macOS Sierra.
173 install -d build/mercurial/usr/local/share/zsh/site-functions/
173 install -d build/mercurial/usr/local/share/zsh/site-functions/
174 install -m 0644 contrib/zsh_completion build/mercurial/usr/local/share/zsh/site-functions/_hg
174 install -m 0644 contrib/zsh_completion build/mercurial/usr/local/share/zsh/site-functions/_hg
175 # install bash completions - there doesn't appear to be a
175 # install bash completions - there doesn't appear to be a
176 # place that's searched by default for bash, so we'll follow
176 # place that's searched by default for bash, so we'll follow
177 # the lead of Apple's git install and just put it in a
177 # the lead of Apple's git install and just put it in a
178 # location of our own.
178 # location of our own.
179 install -d build/mercurial/usr/local/hg/contrib/
179 install -d build/mercurial/usr/local/hg/contrib/
180 install -m 0644 contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash
180 install -m 0644 contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash
181 make -C contrib/chg \
181 make -C contrib/chg \
182 HGPATH=/usr/local/bin/hg \
182 HGPATH=/usr/local/bin/hg \
183 PYTHON=/usr/bin/python2.7 \
183 PYTHON=/usr/bin/python2.7 \
184 HG=/usr/local/bin/hg \
185 HGEXTDIR=/Library/Python/2.7/site-packages/hgext \
184 HGEXTDIR=/Library/Python/2.7/site-packages/hgext \
186 DESTDIR=../../build/mercurial \
185 DESTDIR=../../build/mercurial \
187 PREFIX=/usr/local \
186 PREFIX=/usr/local \
188 clean install
187 clean install
189 mkdir -p $${OUTPUTDIR:-dist}
188 mkdir -p $${OUTPUTDIR:-dist}
190 HGVER=$$(python contrib/genosxversion.py $(OSXVERSIONFLAGS) build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py) && \
189 HGVER=$$(python contrib/genosxversion.py $(OSXVERSIONFLAGS) build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py) && \
191 OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
190 OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
192 pkgbuild --filter \\.DS_Store --root build/mercurial/ \
191 pkgbuild --filter \\.DS_Store --root build/mercurial/ \
193 --identifier org.mercurial-scm.mercurial \
192 --identifier org.mercurial-scm.mercurial \
194 --version "$${HGVER}" \
193 --version "$${HGVER}" \
195 build/mercurial.pkg && \
194 build/mercurial.pkg && \
196 productbuild --distribution contrib/macosx/distribution.xml \
195 productbuild --distribution contrib/macosx/distribution.xml \
197 --package-path build/ \
196 --package-path build/ \
198 --version "$${HGVER}" \
197 --version "$${HGVER}" \
199 --resources contrib/macosx/ \
198 --resources contrib/macosx/ \
200 "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg
199 "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg
201
200
202 deb:
201 deb:
203 contrib/builddeb
202 contrib/builddeb
204
203
205 ppa:
204 ppa:
206 contrib/builddeb --source-only
205 contrib/builddeb --source-only
207
206
208 contrib/docker/debian-%: contrib/docker/debian.template
207 contrib/docker/debian-%: contrib/docker/debian.template
209 sed "s/__CODENAME__/$*/" $< > $@
208 sed "s/__CODENAME__/$*/" $< > $@
210
209
211 docker-debian-jessie: contrib/docker/debian-jessie
210 docker-debian-jessie: contrib/docker/debian-jessie
212 mkdir -p packages/debian-jessie
211 mkdir -p packages/debian-jessie
213 contrib/dockerdeb debian jessie
212 contrib/dockerdeb debian jessie
214
213
215 docker-debian-stretch: contrib/docker/debian-stretch
214 docker-debian-stretch: contrib/docker/debian-stretch
216 mkdir -p packages/debian-stretch
215 mkdir -p packages/debian-stretch
217 contrib/dockerdeb debian stretch
216 contrib/dockerdeb debian stretch
218
217
219 contrib/docker/ubuntu-%: contrib/docker/ubuntu.template
218 contrib/docker/ubuntu-%: contrib/docker/ubuntu.template
220 sed "s/__CODENAME__/$*/" $< > $@
219 sed "s/__CODENAME__/$*/" $< > $@
221
220
222 docker-ubuntu-trusty: contrib/docker/ubuntu-trusty
221 docker-ubuntu-trusty: contrib/docker/ubuntu-trusty
223 contrib/dockerdeb ubuntu trusty
222 contrib/dockerdeb ubuntu trusty
224
223
225 docker-ubuntu-trusty-ppa: contrib/docker/ubuntu-trusty
224 docker-ubuntu-trusty-ppa: contrib/docker/ubuntu-trusty
226 contrib/dockerdeb ubuntu trusty --source-only
225 contrib/dockerdeb ubuntu trusty --source-only
227
226
228 docker-ubuntu-xenial: contrib/docker/ubuntu-xenial
227 docker-ubuntu-xenial: contrib/docker/ubuntu-xenial
229 contrib/dockerdeb ubuntu xenial
228 contrib/dockerdeb ubuntu xenial
230
229
231 docker-ubuntu-xenial-ppa: contrib/docker/ubuntu-xenial
230 docker-ubuntu-xenial-ppa: contrib/docker/ubuntu-xenial
232 contrib/dockerdeb ubuntu xenial --source-only
231 contrib/dockerdeb ubuntu xenial --source-only
233
232
234 docker-ubuntu-yakkety: contrib/docker/ubuntu-yakkety
233 docker-ubuntu-yakkety: contrib/docker/ubuntu-yakkety
235 contrib/dockerdeb ubuntu yakkety
234 contrib/dockerdeb ubuntu yakkety
236
235
237 docker-ubuntu-yakkety-ppa: contrib/docker/ubuntu-yakkety
236 docker-ubuntu-yakkety-ppa: contrib/docker/ubuntu-yakkety
238 contrib/dockerdeb ubuntu yakkety --source-only
237 contrib/dockerdeb ubuntu yakkety --source-only
239
238
240 docker-ubuntu-zesty: contrib/docker/ubuntu-zesty
239 docker-ubuntu-zesty: contrib/docker/ubuntu-zesty
241 contrib/dockerdeb ubuntu zesty
240 contrib/dockerdeb ubuntu zesty
242
241
243 docker-ubuntu-zesty-ppa: contrib/docker/ubuntu-zesty
242 docker-ubuntu-zesty-ppa: contrib/docker/ubuntu-zesty
244 contrib/dockerdeb ubuntu zesty --source-only
243 contrib/dockerdeb ubuntu zesty --source-only
245
244
246 fedora20:
245 fedora20:
247 mkdir -p packages/fedora20
246 mkdir -p packages/fedora20
248 contrib/buildrpm
247 contrib/buildrpm
249 cp rpmbuild/RPMS/*/* packages/fedora20
248 cp rpmbuild/RPMS/*/* packages/fedora20
250 cp rpmbuild/SRPMS/* packages/fedora20
249 cp rpmbuild/SRPMS/* packages/fedora20
251 rm -rf rpmbuild
250 rm -rf rpmbuild
252
251
253 docker-fedora20:
252 docker-fedora20:
254 mkdir -p packages/fedora20
253 mkdir -p packages/fedora20
255 contrib/dockerrpm fedora20
254 contrib/dockerrpm fedora20
256
255
257 fedora21:
256 fedora21:
258 mkdir -p packages/fedora21
257 mkdir -p packages/fedora21
259 contrib/buildrpm
258 contrib/buildrpm
260 cp rpmbuild/RPMS/*/* packages/fedora21
259 cp rpmbuild/RPMS/*/* packages/fedora21
261 cp rpmbuild/SRPMS/* packages/fedora21
260 cp rpmbuild/SRPMS/* packages/fedora21
262 rm -rf rpmbuild
261 rm -rf rpmbuild
263
262
264 docker-fedora21:
263 docker-fedora21:
265 mkdir -p packages/fedora21
264 mkdir -p packages/fedora21
266 contrib/dockerrpm fedora21
265 contrib/dockerrpm fedora21
267
266
268 centos5:
267 centos5:
269 mkdir -p packages/centos5
268 mkdir -p packages/centos5
270 contrib/buildrpm --withpython
269 contrib/buildrpm --withpython
271 cp rpmbuild/RPMS/*/* packages/centos5
270 cp rpmbuild/RPMS/*/* packages/centos5
272 cp rpmbuild/SRPMS/* packages/centos5
271 cp rpmbuild/SRPMS/* packages/centos5
273
272
274 docker-centos5:
273 docker-centos5:
275 mkdir -p packages/centos5
274 mkdir -p packages/centos5
276 contrib/dockerrpm centos5 --withpython
275 contrib/dockerrpm centos5 --withpython
277
276
278 centos6:
277 centos6:
279 mkdir -p packages/centos6
278 mkdir -p packages/centos6
280 contrib/buildrpm --withpython
279 contrib/buildrpm --withpython
281 cp rpmbuild/RPMS/*/* packages/centos6
280 cp rpmbuild/RPMS/*/* packages/centos6
282 cp rpmbuild/SRPMS/* packages/centos6
281 cp rpmbuild/SRPMS/* packages/centos6
283
282
284 docker-centos6:
283 docker-centos6:
285 mkdir -p packages/centos6
284 mkdir -p packages/centos6
286 contrib/dockerrpm centos6 --withpython
285 contrib/dockerrpm centos6 --withpython
287
286
288 centos7:
287 centos7:
289 mkdir -p packages/centos7
288 mkdir -p packages/centos7
290 contrib/buildrpm
289 contrib/buildrpm
291 cp rpmbuild/RPMS/*/* packages/centos7
290 cp rpmbuild/RPMS/*/* packages/centos7
292 cp rpmbuild/SRPMS/* packages/centos7
291 cp rpmbuild/SRPMS/* packages/centos7
293
292
294 docker-centos7:
293 docker-centos7:
295 mkdir -p packages/centos7
294 mkdir -p packages/centos7
296 contrib/dockerrpm centos7
295 contrib/dockerrpm centos7
297
296
298 linux-wheels: linux-wheels-x86_64 linux-wheels-i686
297 linux-wheels: linux-wheels-x86_64 linux-wheels-i686
299
298
300 linux-wheels-x86_64:
299 linux-wheels-x86_64:
301 docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_x86_64 /src/contrib/build-linux-wheels.sh
300 docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_x86_64 /src/contrib/build-linux-wheels.sh
302
301
303 linux-wheels-i686:
302 linux-wheels-i686:
304 docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_i686 linux32 /src/contrib/build-linux-wheels.sh
303 docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_i686 linux32 /src/contrib/build-linux-wheels.sh
305
304
306 .PHONY: help all local build doc cleanbutpackages clean install install-bin \
305 .PHONY: help all local build doc cleanbutpackages clean install install-bin \
307 install-doc install-home install-home-bin install-home-doc \
306 install-doc install-home install-home-bin install-home-doc \
308 dist dist-notests check tests check-code update-pot \
307 dist dist-notests check tests check-code update-pot \
309 osx deb ppa docker-debian-jessie docker-debian-stretch \
308 osx deb ppa docker-debian-jessie docker-debian-stretch \
310 docker-ubuntu-trusty docker-ubuntu-trusty-ppa \
309 docker-ubuntu-trusty docker-ubuntu-trusty-ppa \
311 docker-ubuntu-xenial docker-ubuntu-xenial-ppa \
310 docker-ubuntu-xenial docker-ubuntu-xenial-ppa \
312 docker-ubuntu-yakkety docker-ubuntu-yakkety-ppa \
311 docker-ubuntu-yakkety docker-ubuntu-yakkety-ppa \
313 docker-ubuntu-zesty docker-ubuntu-zesty-ppa \
312 docker-ubuntu-zesty docker-ubuntu-zesty-ppa \
314 fedora20 docker-fedora20 fedora21 docker-fedora21 \
313 fedora20 docker-fedora20 fedora21 docker-fedora21 \
315 centos5 docker-centos5 centos6 docker-centos6 centos7 docker-centos7 \
314 centos5 docker-centos5 centos6 docker-centos6 centos7 docker-centos7 \
316 linux-wheels
315 linux-wheels
@@ -1,52 +1,40 b''
1 HG = $(CURDIR)/../../hg
2
3 TARGET = chg
1 TARGET = chg
4 SRCS = chg.c hgclient.c procutil.c util.c
2 SRCS = chg.c hgclient.c procutil.c util.c
5 OBJS = $(SRCS:.c=.o)
3 OBJS = $(SRCS:.c=.o)
6
4
7 CFLAGS ?= -O2 -Wall -Wextra -pedantic -g
5 CFLAGS ?= -O2 -Wall -Wextra -pedantic -g
8 CPPFLAGS ?= -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
6 CPPFLAGS ?= -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
9 override CFLAGS += -std=gnu99
7 override CFLAGS += -std=gnu99
10 ifdef HGPATH
8 ifdef HGPATH
11 override CPPFLAGS += -DHGPATH=\"$(HGPATH)\"
9 override CPPFLAGS += -DHGPATH=\"$(HGPATH)\"
12 endif
10 endif
13
11
14 DESTDIR =
12 DESTDIR =
15 PREFIX = /usr/local
13 PREFIX = /usr/local
16 MANDIR = $(PREFIX)/share/man/man1
14 MANDIR = $(PREFIX)/share/man/man1
17
15
18 CHGSOCKDIR = /tmp/chg$(shell id -u)
19 CHGSOCKNAME = $(CHGSOCKDIR)/server
20
21 .PHONY: all
16 .PHONY: all
22 all: $(TARGET)
17 all: $(TARGET)
23
18
24 $(TARGET): $(OBJS)
19 $(TARGET): $(OBJS)
25 $(CC) $(LDFLAGS) -o $@ $(OBJS)
20 $(CC) $(LDFLAGS) -o $@ $(OBJS)
26
21
27 chg.o: hgclient.h procutil.h util.h
22 chg.o: hgclient.h procutil.h util.h
28 hgclient.o: hgclient.h procutil.h util.h
23 hgclient.o: hgclient.h procutil.h util.h
29 procutil.o: procutil.h util.h
24 procutil.o: procutil.h util.h
30 util.o: util.h
25 util.o: util.h
31
26
32 .PHONY: install
27 .PHONY: install
33 install: $(TARGET)
28 install: $(TARGET)
34 install -d "$(DESTDIR)$(PREFIX)"/bin
29 install -d "$(DESTDIR)$(PREFIX)"/bin
35 install -m 755 "$(TARGET)" "$(DESTDIR)$(PREFIX)"/bin
30 install -m 755 "$(TARGET)" "$(DESTDIR)$(PREFIX)"/bin
36 install -d "$(DESTDIR)$(MANDIR)"
31 install -d "$(DESTDIR)$(MANDIR)"
37 install -m 644 chg.1 "$(DESTDIR)$(MANDIR)"
32 install -m 644 chg.1 "$(DESTDIR)$(MANDIR)"
38
33
39 .PHONY: serve
40 serve:
41 [ -d "$(CHGSOCKDIR)" ] || ( umask 077; mkdir "$(CHGSOCKDIR)" )
42 "$(HG)" serve --cwd / --cmdserver chgunix \
43 --address $(CHGSOCKNAME) \
44 --config cmdserver.log=/dev/stderr
45
46 .PHONY: clean
34 .PHONY: clean
47 clean:
35 clean:
48 $(RM) $(OBJS)
36 $(RM) $(OBJS)
49
37
50 .PHONY: distclean
38 .PHONY: distclean
51 distclean:
39 distclean:
52 $(RM) $(OBJS) $(TARGET)
40 $(RM) $(OBJS) $(TARGET)
General Comments 0
You need to be logged in to leave comments. Login now