Closed Bug 437896 Opened 12 years ago Closed 12 years ago

make-makefile gets confused with new mailsuite build structure

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: kairo, Assigned: kairo)

Details

Attachments

(1 file)

When trying to build the new mailnews build structure for bug 437643 with --enable-tests, the Makfile for e.g. mailnews/base/test needs to be constructed via make-makefile as the configure-driven makefiles.sh stuff does not list test-only Makefiles.
Somehow, creation of that Makefile fails though. I tried to get more info by doing |make -d| in mailnews/base, revealing that make realizes it must remake test/Makefile from /mnt/mozilla/sm2/mozilla/../mailnews/base/test/Makefile.in and calls the following:
/usr/bin/perl /mnt/mozilla/sm2/mozilla/build/autoconf/make-makefile -t /mnt/mozilla/sm2/mozilla -d ../../mozilla  test/Makefile
It says |Successfully remade target file `test/Makefile'.| but there is no test/Makefile present after that.
hah, manually calling the make-makefile command reveals an error:

robert@robert:/mnt/mozilla/build/seamonkey2/mailnews/base> /usr/bin/perl /mnt/mozilla/sm2/mozilla/build/autoconf/make-makefile -t /mnt/mozilla/sm2/mozilla -d ../../mozilla  test/Makefile
creating /mnt/mozilla/build/seamonkey2/mailnews/base/test/Makefile
/mnt/mozilla/sm2/mozilla/build/autoconf/make-makefile: Cannot read /mnt/mozilla/sm2/mozilla//mnt/mozilla/build/seamonkey2/mailnews/base/test/Makefile.in: No such file or directory
uncommenting $debug=1 in make-makefile gives me the following:

ac_given_srcdir = /mnt/mozilla/sm2/mozilla
depth           = ../../mozilla
ac_given_srcdir = /mnt/mozilla/sm2/mozilla
ac_given_srcdir = /mnt/mozilla/sm2/mozilla
depth           = ../../mozilla
ac_given_srcdir = /mnt/mozilla/sm2/mozilla
object_fullpath = /mnt/mozilla/build/seamonkey2/mailnews/base
object_root     = /mnt/mozilla/build/seamonkey2/mozilla
source_subdir   = /mnt/mozilla/build/seamonkey2/mailnews/base/
makefiles       = /mnt/mozilla/build/seamonkey2/mailnews/base/test/Makefile
given_srcdir    = /mnt/mozilla/sm2/mozilla
ac_dir     = /mnt/mozilla/build/seamonkey2/mailnews/base/test
ac_file    = /mnt/mozilla/build/seamonkey2/mailnews/base/test/Makefile
ac_file_in = /mnt/mozilla/sm2/mozilla//mnt/mozilla/build/seamonkey2/mailnews/base/test/Makefile.in
srcdir     = /mnt/mozilla/sm2/mozilla//mnt/mozilla/build/seamonkey2/mailnews/base/test
top_srcdir = /mnt/mozilla/sm2/mozilla
cwd        = /mnt/mozilla/build/seamonkey2/mozilla

Doing the same in a conventional cvs trunk tree gives me the following:

robert@robert:/mnt/mozilla/build/seamonkey/mailnews/base> /usr/bin/perl /mnt/mozilla/src/mozilla/build/autoconf/make-makefile -t /mnt/mozilla/src/mozilla -d ../..  test/Makefile
ac_given_srcdir = /mnt/mozilla/src/mozilla
depth           = ../..
ac_given_srcdir = /mnt/mozilla/src/mozilla
ac_given_srcdir = /mnt/mozilla/src/mozilla
depth           = ../..
ac_given_srcdir = /mnt/mozilla/src/mozilla
object_fullpath = /mnt/mozilla/build/seamonkey/mailnews/base
object_root     = /mnt/mozilla/build/seamonkey
source_subdir   = mailnews/base/
makefiles       = mailnews/base/test/Makefile
given_srcdir    = /mnt/mozilla/src/mozilla
ac_dir     = mailnews/base/test
ac_file    = mailnews/base/test/Makefile
ac_file_in = /mnt/mozilla/src/mozilla/mailnews/base/test/Makefile.in
srcdir     = /mnt/mozilla/src/mozilla/mailnews/base/test
top_srcdir = /mnt/mozilla/src/mozilla
cwd        = /mnt/mozilla/build/seamonkey

creating mailnews/base/test/Makefile
OK, I got a patch for this, special-casing the case when $depth ends in "/mozilla".
The main issue is that $source_subdir needs to end up correctly, as it's used to find the original Makefile.in - note that we need to chdir to the mozilla/ toplevel directory as the relative path needs to resolve from there for update_makefiles() to execute correctly.
Assignee: nobody → kairo
Status: NEW → ASSIGNED
Attachment #324229 - Flags: review?(ted.mielczarek)
Comment on attachment 324229 [details] [diff] [review]
patch v1: special-case depths ending in "/mozilla"

This is a bit too much of a hack for me. :) I'll take a look at this problem when I clear some other stuff off my plate, or you can look for a cleaner solution in the interim.
Attachment #324229 - Flags: review?(ted.mielczarek) → review-
No longer blocks: 437643
With the change of us now riding less on the Mozilla build system, but using our own at least at the core, this issue is irrelevant, srcdir is now always under topsrcdir :)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.