Commit Graph

98 Commits

Author SHA1 Message Date
Chris Manchester
ff867ebf7c Bug 1184405 - Add a test to fail the build if file patterns are present in test dependency annotations that don't correspond to any files on disk. r=gps 2015-09-25 07:33:11 -07:00
Wes Kocher
632255b9e3 Backed out changeset f7a0080dfd6b (bug 1184405) for SM build bustage CLOSED TREE 2015-09-25 09:14:26 -07:00
Chris Manchester
43b52ce8f5 Bug 1184405 - Add a test to fail the build if file patterns are present in test dependency annotations that don't correspond to any files on disk. r=gps 2015-09-25 07:33:11 -07:00
Gregory Szorc
adf19d10b9 Bug 1132771 - Support and test for reading without a config object; r=glandium
We want the ability to read data from any moz.build file without needing
a full build configuration (running configure). This will enable tools
to consume metadata by merely having a copy of the source code and
nothing more.

This commit creates the EmptyConfig object. It is a config object that -
as its name implies - is empty. It will be used for reading moz.build
files in "no config" mode.

Many moz.build files make assumptions that variables in CONFIG are
defined and that they are strings. We create the EmptyValue type that
behaves like an empty unicode string. Since moz.build files also do some
type checking, we carve an exemption for EmptyValue, just like we do for
None.

We add a test to verify that reading moz.build files in "no config" mode
works. This required some minor changes to existing moz.build files to
make them work in the new execution mode.
2015-02-26 10:21:52 -08:00
Gregory Szorc
58337fe0d5 Bug 1132771 - Add a test for reading all moz.build files in filesystem traversal mode; r=glandium
moz.build files should execute in filesystem traversal mode. Add a test
that verifies this is true.

This test performs a brute force filesystem scan to find relevant
moz.build files. This can be a little slow. That's unfortunate. But it's
a price we need to pay in order to ensure metadata extraction mode
continues to work.
2015-03-02 09:43:11 -08:00
Joshua Cranmer
ea98d7eb48 Bug 1099430, mozilla-central parts: Eliminate the duplication of the build system in comm-central, r=glandium.
See the revisions a few steps prior for more fine-grained information. This just
needs to be relanded because our automation doesn't like non-ASCII commit
messages.

--HG--
extra : amend_source : 0ee4e0da1ea9ada815abfe989c51030db24aac56
2014-11-29 19:45:31 -06:00
Phil Ringnalda
372f1d5141 Backed out 3 changesets (bug 1099430) because 256 characters should be enough for anybody's commit message
CLOSED TREE

Backed out changeset 28abb8af2d62 (bug 1099430)
Backed out changeset 358aa39360d5 (bug 1099430)
Backed out changeset 3313e545f4f6 (bug 1099430)
2014-11-29 17:17:58 -08:00
Joshua Cranmer
e167ca3ee0 Bug 1099430, part 一: Define MOZILLA_DIR early in the base makefiles, r=glandium.
This change allows us to use use MOZILLA_DIR even for changes in config.mk. The
corollary is that comm-central needs to define MOZILLA_DIR before calling into
baseconfig.mk, which it already does.

The change to the test Makefile is needed since it decides to skip including
config.mk, and hence baseconfig.mk, where it would need to grab the MOZILLA_DIR
declaration.
2014-11-29 18:44:10 -06:00
Mike Hommey
38cd110ce5 Bug 1077151 - Always use expandlibs descriptors when they exist. r=mshal
Currently, when there is both an expandlibs descriptor and an actual static
library, expandlibs picks the static library. This has the side effect that
if there are object files in the static library that aren't directly used,
they're dropped when linking, even when they export symbols that would be
exported in the final linked binary.

In most cases in the code base, files are not dropped that way. The most
notable counter-example is xpcomglue, where actually not dropping files
leads to link failure because of missing symbols those files reference
(yes, that would tend to say the glue is broken in some way).

On the opposite side, there is mozglue, which does have both a descriptor
and a static library (the latter being necessary for the SDK), and that
linking as a static library drops files that shouldn't be dropped (like
jemalloc). We're currently relying on -Wl,--whole-archive for those files
not to be dropped, but that won't really be possible without much hassle
in a world where mozglue dependencies live in moz.build land.

Switching expandlibs to use descriptors when they exist, even when there
is a static library (so, the opposite of the current behavior) allows to
drop -Wl,--whole-archive and prepare for a better future. However, as
mentioned, xpcomglue does still require to be linked through the static
library, so we need to make it a static library only.

To achieve that, we make NO_EXPAND_LIBS now actually mean no expandlibs
and use that to build the various different xpcomglues.
2014-10-04 10:33:00 +09:00
Mike Hommey
cd12f78667 Bug 1043869 - Derive build dependencies for programs and libraries from make backend data instead of getting them from expandlibs. r=mshal 2014-07-29 08:59:56 +09:00
Mike Hommey
0fa0eb08c7 Bug 1027890 - Remove all sorts of build system code dedicated to pymake. r=gps 2014-06-25 08:38:28 +09:00
Mike Hommey
6fa9be32f0 Bug 1024620 - Use object files next to archives when extracting them at link time, or in a subdirectory. r=ted 2014-06-14 09:08:22 +09:00
Gregory Szorc
461b5aef7e Bug 774572 - Part 2: Define JAR_MANIFESTS in moz.build files; r=glandium
Every directory with a jar.mn now has JAR_MANIFESTS defined in its
moz.build file.

We also removed the may_skip special consideration of jar.mn files
because this information is now available during tier traversal by the
reader courtesy of the variables being present in moz.build files.

--HG--
extra : rebase_source : 21049b15e6bd9cf65b0805ccaccc4ba5aae93c98
extra : amend_source : 0b1ea866d725beef92d37c6f6d475369ac002e19
2013-12-10 16:18:11 +09:00
Mike Hommey
06d6d3c5cf Bug 943728 - Replace double quotes with single quotes in Makefiles (or remove them when it makes sense). r=mshal 2013-12-03 06:34:21 +09:00
Mike Hommey
dfa85e02f4 Bug 942377 - Fix check_mkdir.tpy with mozmake. r=mshal 2013-11-26 11:49:55 +09:00
Gregory Szorc
0442d6ffe1 Bug 937803 - os.path.exists should work with MockedOpen; r=glandium
--HG--
extra : rebase_source : 567b70b6a75f3c918da2c99ceb490ac569919ed0
2013-11-12 12:30:34 -08:00
Mike Hommey
91af4c88d7 Bug 935305 - Move preprocessor to mozbuild.action. r=gps
--HG--
rename : config/Preprocessor.py => python/mozbuild/mozbuild/preprocessor.py
rename : config/tests/unit-Expression.py => python/mozbuild/mozbuild/test/test_expression.py
rename : config/tests/unit-LineEndings.py => python/mozbuild/mozbuild/test/test_line_endings.py
rename : config/tests/unit-Preprocessor.py => python/mozbuild/mozbuild/test/test_preprocessor.py
2013-11-09 10:35:44 +09:00
Joshua Cranmer
fa4de4e669 Bug 900526, part 2: Move backend.mk inclusion to config.mk instead of rules.mk, r=gps 2013-10-21 13:08:00 -05:00
Gregory Szorc
c399347494 Bug 924615 - Move JarMaker.py into mozbuild; r=mshal
--HG--
rename : config/JarMaker.py => python/mozbuild/mozbuild/jar.py
rename : config/tests/unit-JarMaker.py => python/mozbuild/mozbuild/test/test_jarmaker.py
2013-10-11 13:19:11 -07:00
Gregory Szorc
ec3d3cdf0d Bug 585016 - Move buildlist.py to a mozbuild action; r=mshal
--HG--
rename : config/buildlist.py => python/mozbuild/mozbuild/action/buildlist.py
rename : config/tests/unit-buildlist.py => python/mozbuild/mozbuild/test/action/test_buildlist.py
2013-10-11 07:22:49 -07:00
Mike Hommey
05b3f24e0e Bug 912293 - Remove now redundant boilerplate from Makefile.in. r=gps 2013-09-05 09:01:46 +09:00
Mike Hommey
4dffcea061 Bug 912368 - Set relativesrcdir in config/tests/src-simple/Makefile and adjust so that it works. r=gps 2013-09-05 09:01:45 +09:00
Gregory Szorc
131c503dfb Bug 902619 - Write mozinfo.json as part of config.status; r=ted
There are both mechanical and logical changes in this patch.

The mechanical changes involve moving some files into the mozbuild
package.

The logical changes include move writing of mozinfo.json into
config.status (from configure.in). There were some variable assignments
being performed in configure.in. These variables were read from
writemozinfo.py. However, these variables don't appear to be necessary!
Now that mozinfo has full access to the underlying config.status data
structure, it can now access these variables directly. I verified that
every variable being assigned in configure.in had a corresponding
AC_SUBST earlier in the file.

The only variable that's a bit weird is the TOPSRCDIR and MOZCONFIG
environment variables. mozinfo continues to look in the environment for
MOZCONFIG. However TOPSRCDIR is now coming from config.status.

As part of moving the code, I also modernized the test file, cleaned up
some style, and removed some unused imports.

--HG--
rename : config/writemozinfo.py => python/mozbuild/mozbuild/mozinfo.py
rename : config/tests/unit-writemozinfo.py => python/mozbuild/mozbuild/test/test_mozinfo.py
2013-08-07 23:48:41 -07:00
Mike Hommey
e9ee5bb8ee Bug 892904 - Remove useless includes of config.mk. r=gps 2013-07-15 18:48:40 +09:00
Andrew Halberstadt
9c1d8dd81c Bug 746546 - writemozinfo.py should use the buildconfig module, r=ted 2013-05-21 16:06:42 -04:00
Matt Brubeck
430083b7bf Reapplied changeset 31ff9550fba6 (bug 870073) 2013-05-10 15:49:57 -07:00
Kyle Machulis
f5e3aadf0b Bug 855465 - Add emacs python mode comments to moz.build files; r=gps 2013-04-01 11:36:59 -07:00
Kyle Machulis
d2b6e6e01a Backout for changeset 03452b187c14 (Bug 855465) due to bustage on a CLOSED TREE; r=qdot 2013-03-29 15:12:58 -07:00
Kyle Machulis
5663b98bc5 Bug 855465 - Add emacs python mode comments to moz.build files; r=gps
--HG--
extra : rebase_source : 004a756492323e1a049586e85b3be5037159df20
2013-03-29 13:56:18 -07:00
Mike Hommey
90d6c70d7c Bug 648407 - Support expandlibs_exec.py --extract on windows. r=ted 2013-03-17 07:44:57 +01:00
Yati Sagade
54ec2ee3fd Bug 812179 - Removed hacks for Python < 2.6 from config/ [r=ted] 2013-02-27 22:30:56 +05:30
Gregory Szorc
aab3b7dd49 Bug 784841 - Part 18e: Convert /build, /config, and core build system; r=ted 2013-02-25 12:47:18 -08:00
Mike Hommey
0c57a1e0ba Fixup for unit-expandlibs.py after bug 840661 r=me 2013-02-14 09:14:12 +01:00
Mike Hommey
3fb1317218 Bug 820724 - Add support for more elaborate expressions for Preprocessor.py. r=ted 2012-12-12 16:00:40 +01:00
Axel Hecht
e092068350 bug 797745, add support for relativesrcdir overrides, r=ted
relativesrcdir is used for l10n packaging primarily. Being able to
override this in jar.mn allows to package individual files from toolkit
for an app.

--HG--
extra : rebase_source : 1b5b9028751cfe01a3810cea81a52b4c20919b51
2012-11-01 15:51:48 +01:00
Axel Hecht
4eea2e6ceb bug 797745, use l10n-base and relativesrcdir instead of config.mk for l10n-merge, r=ted
--HG--
extra : rebase_source : 0d280e5cfabe7efdbe112309da6ef87d3848c441
2012-11-01 13:25:53 +01:00
Axel Hecht
510269fa2f Bug 797745 - Multiple jar manifests in one run is not used, remove that. Also remove old perl options and un-used options of the perl version. r=ted 2012-10-13 04:37:15 -04:00
Siddharth Agarwal
64c39be049 Bug 767833 - Pymake on Windows is busted with config/tests/makefiles/autodeps/check_mkdir.tpy. r=khuey
Less MSYS, more Windows.

--HG--
extra : rebase_source : cd26706f245c69667ec3afbd6c6a51527dd1592e
2012-08-08 00:36:44 +05:30
Mike Hommey
c1b35e7b2a Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 20:26:44 +02:00
Mike Hommey
be451c22dc Backout changeset 2ef51674316a (bug 774032 bonus) for various Mochitest bustages on a CLOSED TREE 2012-08-04 10:38:41 +02:00
Mike Hommey
e79d87471e Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 08:48:56 +02:00
Mike Hommey
6496bd2502 Bug 774032 part 2 - Allow to disable markers in Preprocessor.py. r=ted 2012-08-04 08:47:28 +02:00
Mike Hommey
1d0b8ae35c Bug 774032 part 1 - Avoid Preprocessor.py replacing undefined variables with the attemptSubstitution filter. r=ted 2012-08-04 08:47:28 +02:00
Mike Hommey
c3a3e5c14f Bug 776035 part 3 - Use the new MockedOpen in unit-Preprocessor.py. r=ted 2012-07-25 07:44:08 +02:00
Mike Hommey
971da49975 Bug 776035 part 2 - Add an enhanced MockedOpen facility to mozunit.py. r=ted 2012-07-25 07:44:08 +02:00
Mike Hommey
088cfd60e3 Bug 776035 - Make mozunit even easier to use, and use it in config/tests python unit tests. r=ted 2012-07-25 07:44:08 +02:00
Ed Morley
3ccef88f32 Backout eecd3aa199e6 (bug 776305), 62facd5b3da9, c6a0ac7d47d2 & 2d56621abfee (bug 776035), e4e68cf2bd40 (bug 776016), 0853a4d49b4e & 31de6ffdedcb (bug 770426), 43a69b4981f5 (bug 756786) for Windows mochitest crashes 2012-07-25 09:35:32 +01:00
Mike Hommey
717427efcc Bug 776035 part 3 - Use the new MockedOpen in unit-Preprocessor.py. r=ted 2012-07-25 07:44:08 +02:00
Mike Hommey
49e8d2f8b0 Bug 776035 part 2 - Add an enhanced MockedOpen facility to mozunit.py. r=ted 2012-07-25 07:44:08 +02:00
Mike Hommey
2246448c83 Bug 776035 - Make mozunit even easier to use, and use it in config/tests python unit tests. r=ted 2012-07-25 07:44:08 +02:00