Commit Graph

146 Commits

Author SHA1 Message Date
Anton Shestakov
78963e34c6 dockerdeb: add Ubuntu Trusty
One problem reported by lintian is "bad-distribution-in-changes-file unstable"
in changelog, but the current changelog for the official package in Ubuntu also
uses that distribution name (unstable), because they import from Debian. This
certainly doesn't stop the build process.
2016-03-10 23:46:19 +08:00
timeless
d54666f50a setup: create a module for the modulepolicy
Instead of rewriting __init__ to define the modulepolicy,
write out a __modulepolicy__.py file like __version__.py

This should work for both system-wide installation and in-place build. Therefore
we can avoid relying on two separate modulepolicy rules, '@MODULELOADPOLICY@'
and 'mercurial/modulepolicy'.
2016-03-09 15:47:01 +00:00
Anton Shestakov
11e3a4574b builddeb: read default distribution and codename from lsb_release
This makes `make deb` place packages into a more appropriately named directory
instead of just "debian-unknown".
2015-11-25 18:07:33 +08:00
Anton Shestakov
b61eeae0ab builddeb: add --distid option to specify Distributor ID
This allows builddeb to handle distributions that are not Debian.

Distributor ID is reported by lsb_release --id, and in case of builddeb it's
usually Debian or Ubuntu.
2015-11-25 15:15:03 +08:00
Anton Shestakov
b5106c63ef builddeb: rename --release option to --codename
Debian and Ubuntu releases have both codenames and traditional version numbers.
An entire "branch" of releases is referred to by its codename, and version
numbers (e.g. 8.2, 14.04.3) are used to address individual releases.

Since we use codenames for building .deb packages, let's call the option and
the variable appropriately.
2015-11-25 14:59:43 +08:00
Nathan Goldbaum
77c0959268 makefile: add wheel build target 2015-10-09 12:30:46 -05:00
Augie Fackler
bf1f880a9e builddeb: rework how output dir and platform are specified
This makes it possible to write tests for both builddeb and dockerdeb
that actually build .debs and then sanity check the contents.
2015-08-25 00:02:44 -04:00
Augie Fackler
196afc1244 docker-debian-jessie: fix errant mkdir 2015-08-24 23:47:43 -04:00
Augie Fackler
dfa5f19293 makefile: rename debian-jessie to deb
`make debian-jessie` was a poor name choice on my part, because it
really builds a package for the current debian platform, whatever that
happens to be, rather than a specific platform. Rename it to just
`make deb` so that it's a little clearer. As a result, it now places
built debs in a "debian-unknown" directory.
2015-08-27 14:24:39 -04:00
Augie Fackler
c491e8091f dockerdeb: rules to build a debian package using docker
Currently only supports jessie (current stable), but other version
should be trivial.
2015-05-06 13:15:39 -04:00
Augie Fackler
c2c147fe7a builddeb: new script for building a deb package
Future work will allow us to use docker to build debs.

Right now this doesn't install any config files. I plan to do that as
a followup, but getting something basic and working checked in seems
like more of a priority than getting everything done in one big step.

This also does not create a source deb yet. I haven't looked into that
process.

Note that this declares incompatibility with the `mercurial-common`
package. It's typical for debian packages to be split between
architecture-independent bits and native bits, meaning the python bits
downstream live in mercurial-common and the c extension bits live in
mercurial. We don't do that because we want to (ideally) give users a
single deb file to install.
2015-05-06 13:13:54 -04:00
FUJIWARA Katsunori
6d60352ea0 i18n: extract doc string of each web commands as translatable one
Before this patch, doc string of each web commands isn't extracted as
translatable one, even though web commands are listed up in "hg help
hgweb".

This patch adds "mercurial/hgweb/webcommands.py" on to arguments of
"i18n/hggettext". "i18nfunctions" added into "webcommands.py" is used
by "i18n/hggettext" to get the list of functions having translatable
doc string.
2015-04-28 00:38:16 +09:00
Yuya Nishihara
6c27e6c97a templater: tell hggettext to collect help of template functions 2015-04-03 21:36:39 +09:00
Augie Fackler
d5c405b03d Makefile: allow setting HGTESTFLAGS in shell environment for TESTFLAGS
I keep wanting to run 'make tests', but I forget to set TESTFLAGS='-j
16' or whatever is reasonable for my machine. This lets me just set it
once in my shell settings and forget it.
2015-02-04 15:17:13 -05:00
Augie Fackler
bc6c2de805 Makefile: introduce testpy-% target for testing with a specifc Python
This makes it easy to do 'make testpy-2.4.6 TESTFLAGS="-j 16"' and the
Makefile will build Python if needed and then run tests (with -j 16)
with the resulting Python.

You can set the environment variable HGPYTHONS to a nice location on
your machine to cache the Python builds globally. If that's not set,
it builds them inside build/pythons.
2015-02-04 12:26:16 -05:00
Mads Kiilerich
031d0b9afc osx: patch .pax.gz files in pkg bundles so they extract as root (issue4081)
The packages has to be installed by root but they would be installed
insecurely, owned by the uid of the unprivileged user that made the package.
The local user with that uid could thus write to /usr/local/bin/hg .

bdist_mpkg calls out to pax to create the package, but pax do apparently not
have the power to control what it is writing.

Instead, patch the pax files and set their uid fields to 0 before they are
wrapped in a dmg.
2015-01-23 06:28:28 +01:00
Mads Kiilerich
e7afe1bb24 osx: use bdist_mpkg.script_bdist_mpkg module instead of bdist_mpkg command
It seems like a default installation of bdist_mpkg makes it available as
Python module, but the corresponding executable is placed in a location like
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/bin which is
not in $PATH and thus not directly available. 'make osx' would thus fail.

Instead, skip the bdist_mpkg executable and invoke it as a Python module. That
works out of the box here.
2015-01-21 05:04:48 +01:00
Mads Kiilerich
fc3f4381fd osx: don't launch installer after building it with bdist_mpkg
bdist_mpkg do for some reason default to use the parameter --show ("Open with
Installer.app after building") if no parameters are specified. We do not like
that.

All the important parameters to bdist_mpkg are already specified in setup.py
and we don't have any to specify in the Makefile.

Instead, specify the parameter '--' which do no harm but will disable the
default opening of the installer. This makes it possible to build packages
"silently".
2015-01-21 05:04:46 +01:00
Mads Kiilerich
e8c3de8b41 docker: support Fedora 21 2014-11-02 02:36:47 +01:00
Mads Kiilerich
f8bf9f40a4 Makefile: update .PHONY
Based on
sed -n 's/^\([a-z0-9-]*\):\(\s.*\)\?$/\1/gp' Makefile | xargs echo
add check, check-code, update-pot, some packaging targets
2014-11-01 20:00:31 +01:00
Mads Kiilerich
79c175d696 docker: add centos7 target for CentOS / Red Hat 7 support 2014-10-16 17:44:14 +02:00
Mads Kiilerich
eff8053e22 docker: add CentOS 5
There is no official CentOS 5 docker template so we use one from saltstack.
2014-05-15 01:48:37 +02:00
Mads Kiilerich
b06c2984ad docker: use stable tags for fedora and centos
A moving target is rarely useful.
2014-08-31 13:41:09 +02:00
J. Lewis Muir
1c3ff4a87e build: don't clean __version__.py on 'make clean' in release tarballs
When running 'make clean' in an extracted release tarball, file
mercurial/__version__.py is removed, causing a subsequent install to
indicate 'version unknown'.

This problem was reported in the past [1] and a patch proposed in that mail,
but was never properly sent nor applied.

[1] http://selenic.com/pipermail/mercurial/2010-December/036249.html
2014-09-02 11:28:44 +02:00
Mads Kiilerich
03327f4889 osx: create dmg with installer instead of zip
OS X would offer to expand the zip so the (multi file) installer inside it
could be run ... but that would leave the expanded zip folder around.

Instead, use a .dmg file that automatically will be mounted - that seems more
common on OS X.

Still, there is two levels of levels of clicking before actually launching the
installer. Having a single file installer would be better ... but seems to be
hard. A more feasible improvement would be some fancy layout inside the .dmg .
2014-08-31 10:24:25 +02:00
Kevin Bullock
b5dafd9f52 build: don't use -s flag for which
`which -s` is a BSDism that doesn't exist on other versions of
`which`. That means that even on Mac OS X, `make osx` breaks if you have
another utils package installed (e.g. debianutils installed thru
fink). Redirect output to /dev/null instead.
2014-08-29 12:06:31 +02:00
Mads Kiilerich
d77462b1b9 buildrpm: remove prompt for uncommitted changes - it was a bad idea
We want a command that is useful in scripts, not an interactive command.
2014-05-15 01:48:37 +02:00
Matt Mackall
761e95b927 packaging: move output directory from build/ to packages/
setuptools owns build/ and dist/ and we want to have our own scheme
2014-05-27 11:52:39 -07:00
Matt Mackall
d9263873c7 make: add a basic osx mpkg target 2014-05-27 11:39:22 -07:00
Matt Mackall
dc3027aa51 build: initial support for in-tree autobuilding recipes 2014-05-07 17:58:13 -05:00
Thomas Arendsen Hein
aedd3b060c setup.py, make: avoid problems with outdated, existing hgext/__index__.py*
"make clean" already removed __index__.py[cdo], but not the __index__.py
(automatically generated by "python setup.py build_hgextindex").

"setup.py build_hgextindex" did not generate a new index if file
__index__.py[cdo] already existed, because if __index__.py was removed,
the compiled file containing the old information was imported and used.
Generate an empty file (with a new timestamp to generate a new .py[cdo])
instead and make mercurial.extensions ignore the unset docs attribute.

One of the problems was a failed test-help.t, to reproduce:

$ rm hgext/__index__.py*
$ echo 'docs = {"mq": "dummy"}' > hgext/__index__.py
$ make test-help.t

With this a "make clean" or "python setup.py build_hgextindex" helps.
2014-05-05 16:54:15 +02:00
Augie Fackler
4f3c51dea3 setup: specify --prefix="" for install-home-bin to avoid badness with defaults
Sometimes (I'm not sure when) setup.py gets a default value for
--prefix, which breaks --home. This fixes that for me.
2014-02-03 02:09:46 -05:00
Simon Heimberg
4160576860 Makefile: hg.pot depends on the scripts generating it
This is convenient when editing this scripts. And translators will get updated
translation files even if nothing else has changed.
2013-11-17 20:16:14 +01:00
Matt Mackall
ccdc2e59b8 makefile: add $ to environment variables in help message 2014-01-23 14:31:05 -06:00
Simon Heimberg
30b80bb630 Makefile: temporary copy of hg.pot is hg.pot.tmp instead of hg.pot~
The file ending of temporary files for generating XX.po has been changed to
.tmp (from ~). Use the same ending when generating hg.pot.
2013-11-17 12:18:26 +01:00
Simon Heimberg
e2f8f71e76 Makefile: fix po file updating by using same file name everywhere
The update is done on a temporary file since d6abb3586946. The name of this
file was first XX.po~ and has been changed to XX.po.tmp in all except of one
place. Do this now.
2013-11-17 12:17:55 +01:00
Simon Heimberg
f2d4dbb37b Makefile: intermediate steps work with temporary copy of hg.pot
In case of abortion or a failing step, the target file remains untouched
instead of being in an intermediate state.
2013-11-05 09:43:26 +01:00
Matt Mackall
1f8ae60dec make: restrict recursion in make clean 2013-11-14 17:17:44 -06:00
Simon Heimberg
31f38eee9f Makefile: do update on a temporary copy of a po file
This avoids having a half completed file (with a new timestamp) when msgmerge
has failed.
2013-11-05 09:43:36 +01:00
Takumi IINO
c57d1116da doc: make i18n man and html
Allow overwrite LANGUAGE and LC_ALL make variables, for make i18n man and html.
After this patch, we can make i18n man and html by following command:

  $ make clean all LANGUAGE=ja
2013-07-03 21:50:20 +09:00
Benoit Boissinot
957d1fe448 check-code: add Makefile target to run check-code 2013-02-09 15:57:04 +01:00
Bryan O'Sullivan
66236952ea makefile: allow local builds to work on windows/mingw32 2012-12-11 13:44:00 -08:00
Bryan O'Sullivan
6b7c221315 makefile: don't use system hgrc when running hg in-place
This suppresses the printing of spurious error messages if a global
hgrc refers to extensions that the in-place hg can't access.
2012-11-13 09:56:09 -08:00
Adrian Buehlmann
675c7eeaef Makefile: add build_hgexe -i for local 2012-06-29 13:12:35 +02:00
Thomas Arendsen Hein
6dc228e4f6 Makefile: remove generated mercurial/__version__.py 2012-05-15 12:44:07 +02:00
Matt Mackall
f23ed05e2d Makefile: be more careful when cleaning up pure/ components
The recent introduction of pure/__init__.py causes
mercurial/__init__.py to get clobbered by make clean.
2012-04-18 11:45:50 -05:00
FUJIWARA Katsunori
4629df01c9 filemerge: create detail of internal merge tools from documentation string
this patch introduces 'internaltoolsmarker' which creates detail of
each internal merge tools from documentation string for 'hg help merge-tools'.
2012-02-12 21:38:12 +09:00
Thomas Arendsen Hein
467f4af92f Makefile: adjust example, test-merge1 is now test-merge1.t 2011-10-28 12:59:50 +02:00
Alexander Sauta
6701bbd038 i18n-ru: translated missing strings for commands, some typos corrected 2011-07-01 00:14:30 +04:00
Wagner Bruna
52ee2c38d8 i18n: extract docstrings from fileset module 2011-06-20 19:08:41 -03:00
Stephen Thorne
e9d1e0bdc6 distutils: Create MANIFEST.in instead of MANIFEST in Makefile
When running 'python setup.py sdist' many files were omitted from the resulting
tarball that are required for a complete build, including the .h file for the
inotify extension due to a python2.7+ distutils bug. This would cause 'make dist'
to fail to build a correct dist on python2.7

By building a MANIFEST.in that is the same as the old MANIFEST with 'include'
at the start of each line will cause a correct MANIFEST to be built and used
by distutils.
2011-06-09 10:15:24 +10:00
Martin Geisler
5d355b29d6 Makefile: remove pure modules on clean 2011-05-13 11:26:29 +02:00
Johan Euphrosine
75a5be1c2e add make check: tests rule 2011-05-02 09:50:21 +02:00
Matt Mackall
4dbec2c466 build: don't delete precious version information on 'make clean'
setup.py rebuilds version information if it's locally available,
regardless if file already exists.
2010-12-08 11:18:26 -06:00
Wagner Bruna
0fe36cf09d i18n: extract docstrings from revset module 2010-10-26 23:07:14 -02:00
Martin Geisler
b6f1ee0482 Makefile: var for documentation files 2010-10-23 16:54:45 +02:00
Martin Geisler
6943ff68e7 Makefile: remove underscore in var name 2010-10-23 16:53:25 +02:00
Wagner Bruna
8f7ee64a82 i18n: extract comments marked for translator hints
Comments marked with "i18n:", like:

  # i18n: do not translate the field names
  msg = _("Valid entries for the format field are topic, bar, number.")

will become available for translators in the .po files:

  #. i18n: do not translate the field names
  msgid "Valid entries for the format field are topic, bar, number."
  msgstr ""
2010-10-21 11:45:02 -02:00
Brodie Rao
7d5a1c7775 Makefile: remove the build folder manually
Given a system Python version of 2.6, the following won't clean up build:

  $ make local PYTHON=python2.7
  $ make clean

Distutils only cleans up build subdirectories for the current Python
version.

This patch cleans up the build folder even if PYTHON=python2.7 isn't
specified to clean.
2010-09-25 19:47:45 -05:00
Brodie Rao
ba8e13497a Makefile: remove all .so files during clean
This ensures .so files in hgext are cleaned up.
2010-09-25 19:38:27 -05:00
Wagner Bruna
3eefab1b9b i18n: translate each paragraph separately
Makes translation work easier by reducing message sizes and avoiding
invalidating whole messages on small changes or additions to the
original text.
2010-04-06 22:30:50 -03:00
Dévai Tamás
e12c5e6824 Respect the DESTDIR variable during 'make install'
The DESTDIR variable used to tell 'make install' an alternate system root
to install the software to. Since setup.py supports the same via its --root
parameter, it's easy to make life easier for many packagers.
2010-04-16 23:59:43 +02:00
Martin Geisler
19729a94cb Makefile: added instructions on how to override PREFIX 2009-12-23 23:28:53 +01:00
Martin Geisler
1ec2086f5b Makefile: update "make clean" target after 0e00643abaf7 2009-12-14 23:14:50 +01:00
Martin Geisler
848461c4a9 Makefile: help/ was moved in 0e00643abaf7 update paths to match 2009-12-03 22:54:33 +01:00
Martin Geisler
524b665b54 help: move help topics from mercurial/help.py to help/*.txt
The help topics are loaded on demand so we wont hit the disk unless we
really have to.
2009-10-04 09:59:13 +02:00
Martin Geisler
73aa0f7c81 Makefile: remove non-default wrapping of hg.pot strings 2009-07-26 02:14:30 +02:00
Martin Geisler
e2bd1b593f Makefile: wrap hg.pot strings at 82 chars
By default, xgettext will wrap strings at 79 characters. This width
includes the two double-quotes and the '\n' added. Our strings are now
wrapped at 78 characters and a line can therefore be up to 82
characters wide in the .po file.

Setting the width to 82 characters ensures that xgettext does no silly
wrapping on our already-wrapped strings while still wrapping long
one-liners at 82 characters.
2009-07-07 23:54:42 +02:00
Martin Geisler
ded47ba985 Makefile: do not create i18n/, it is already there 2009-05-26 19:51:22 +02:00
Martin Geisler
b205b95666 i18n: accurately generate hg.pot 2009-05-21 23:43:13 +02:00
Greg Ward
83279aa18a Makefile: fix grammar in comment 2009-05-12 10:03:36 -04:00
Martin Geisler
17001eef4e Makefile: fixed comment 2009-05-02 12:10:38 +02:00
Martin Geisler
e0ae3d3d5f Makefile: add more meta data to hg.pot 2009-05-02 11:44:57 +02:00
Tobias Bell
afe3a2b645 enhance Makefile for language translators
To update a po-file just do 'make i18n/xx.po'. No other po-file will
be touched.
2009-03-26 08:07:28 +01:00
Brodie Rao
0f571034a3 Makefile: remove locale folder during clean 2009-02-17 18:47:28 -05:00
Martin Geisler
874562649b i18n: extract strings with xgettext
The xgettext program knows about Python string formatting and will
mark messages with a special "#, python-format" comment in the hg.pot
file. When msgfmt compiles the file, it can check these messages to
ensure that the translated string uses the same conversion specifiers
as the original string.

The pygettext program is still used to extract the docstrings.
2009-01-25 21:31:54 +01:00
Martin Geisler
80b277c7ef use PURE option in Makefile 2009-01-24 01:47:36 +01:00
Martin Geisler
10cca14739 i18n: sort by file when generating hg.pot
This will make the order more stable and give smaller patches when
translations merge in new and deleted strings from the hg.pot file.
2009-01-25 12:33:47 +01:00
Martin Geisler
f6d8487386 i18n: make local now builds .mo files 2009-01-15 20:23:18 +01:00
Martin Geisler
12b2d519d0 i18n: let Makefile generate i18n/hg.pot
The target update-pot extracts strings using pygettext and updates the
i18n/hg.pot file. The translators can then use msgmerge to merge the
new strings in hg.pot with their xx.po file when they want to.

The setup.py file now includes files under both templates/ and i18n/
as data files.
2009-01-15 00:10:54 +01:00
Markus F.X.J. Oberhumer
5460408a1e Makefile: remove *.pyd files on "make clean". 2007-06-25 14:46:20 +02:00
Markus F.X.J. Oberhumer
b7dfc7940e Makefile: change "make local" to build a fully working local version. 2007-06-25 14:46:20 +02:00
Benoit Boissinot
3e0275e2f8 add possibility to pass flags when testing with the Makefile 2006-12-26 03:11:37 +01:00
Benoit Boissinot
253a9af902 fix MANIFEST generation 2006-12-12 11:39:05 +01:00
Matt Mackall
9403306d21 Make make dist a bit quieter 2006-12-10 19:20:35 -06:00
Matt Mackall
69037db249 Automatically build MANIFEST for make dist 2006-12-10 19:16:38 -06:00
Sascha Wilde
7730ef1ab7 Split installation targets into install-bin and install-doc.
install-bin will only install the program, and install-doc will install
the documentation.  The main install target still installs both.
2006-06-27 09:57:06 +02:00
Thomas Arendsen Hein
2fe1d1ce64 Just using 'make' now shows help. 'make all' doesn't perform inplace build. 2006-05-10 18:53:32 +02:00
Thomas Arendsen Hein
bd197a81db New make targets:
local: build extensions inplace (the former "all" target")
all: "local" (for people who expect this) and build everything else
install: install pre-built things (so root doesn't have to write to $HOME)
install-home: use setup.py's --home option instead of --prefix
2006-05-09 18:03:15 +02:00
Thomas Arendsen Hein
3a7a2777d1 New make target "dist-notests" to create tarballs without running tests first. 2006-05-09 17:21:53 +02:00
wilde@trapperkeeper.sha-bang.de
5d9b2c557e Added install target. 2006-05-09 17:05:49 +02:00
Stephen Darnell
fb04fe7b4b Delete the shell version of run-tests
Use the python version instead
2006-05-04 15:47:18 -07:00
Benoit Boissinot
c0239b9f56 add a target for running only one test 2005-10-24 14:53:36 -07:00
levon@movementarian.org
0b2a614b26 Use $(MAKE) not make 2005-10-24 14:52:49 -07:00
mpm@selenic.com
d1b22ca24c Add default make rule
The default make rule builds the extensions "in-place" so that hg can
be run out of the working directory.
2005-08-24 00:36:12 -07:00
Thomas Arendsen Hein
f9b6b4b91f Add Makefile for generating release tarballs.
- test suite is run
- documentation is generated and included
2005-08-22 08:46:43 +02:00