Open
Bug 688356
Opened 14 years ago
Updated 3 years ago
make export step is skipped when XPCSHELL_TESTS is defined
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
NEW
People
(Reporter: bholley, Unassigned)
Details
I ran into this over in bug 684327.
In js/src/xpconnect/tests, we will soon have, among other things:
1 - an 'idl' directory, containing test interfaces
2 - a 'components' directory that depends on the relevant idl
3 - a 'unit' directory, which contains xpcshell tests that exercise 1 and 2.
I noticed that, for some reason, running make in js/src/xpconnect/tests would generate the xpt typelib files in idl/_xpidlgen, but not the headers. Running 'make -C idl' would generate both.
With some experimentation, I discovered that it worked if I commented out XPCSHELL_TESTS=unit in js/src/xpconnect/tests/Makefile.in. To quote bsmedberg on irc, 'that is...unexpected'.
The relevant block is here: http://mxr.mozilla.org/mozilla-central/source/config/rules.mk#125 . I think the problem has to do with the use of a double-colon rule on libs. When I run make --debug=b, I get:
> Reading makefiles...
> Updating goal targets....
> File `libs' does not exist.
> Target `libs' is double-colon and has no prerequisites.
> Must remake target `libs'.
> File `libs' does not exist.
> Must remake target `libs'.
Commenting out XPCSHELL_TESTS=unit, I get:
> Reading makefiles...
> Updating goal targets....
> File `default' does not exist.
> Target `default' is double-colon and has no prerequisites.
> Must remake target `default'.
> GNU Make 3.81
> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
>
> This program built for i386-apple-darwin11.0
> Reading makefiles...
> Updating goal targets....
> File `export' does not exist.
> Must remake target `export'.
This seems to have bitten others before: http://lists.gnu.org/archive/html/help-make/2002-04/msg00047.html . It appears that the double colon is causing libs to take precedence over the default rule somehow.
I'm working around this for now by doing adding a libs:export dependency within idl/Makefile.in. Seems like something we ought to fix though.
No, the problem is just the order. When no target is specified, make makes the first target in the makefile. If XPCSHELL_TESTS or CPP_UNIT_TESTS are defined then the default target at http://mxr.mozilla.org/mozilla-central/source/config/rules.mk#700 is superseded by either http://mxr.mozilla.org/mozilla-central/source/config/rules.mk#137 or http://mxr.mozilla.org/mozilla-central/source/config/rules.mk#231.
Comment 2•14 years ago
|
||
We should probably either move the XPCSHELL_TESTS blocks down, or move the default rules way up to the top (which sounds preferable).
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•