Closed Bug 380846 Opened 17 years ago Closed 17 years ago

Make the build system friendlier for XULRunner apps and extensions

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bent.mozilla, Assigned: bent.mozilla)

References

Details

Attachments

(2 files, 3 obsolete files)

There are three significant obstacles that "third parties" (XULRunner apps and non-hosted extensions) face when trying to leverage the mozilla build system:

1) The build system refuses to progress beyond configure if it doesn't recognize the application specified in --enable-application.
2) The build system will only build an extension (or XULRunner app disguised as an extension) after building a recognized application (and XULRunner takes about at least half an hour to build on my new-ish machine). allmakefiles.sh hacks are also required.
3) Building a XULRunner app or an extension requires checking out all of XULRunner, even if you're using a prebuilt XULRunner SDK.

I should be able to tackle 1 and 2 in this bug, but I may split 3 off.
Attached patch WIP (obsolete) — Splinter Review
bsmedberg, I was hoping you could look over these preliminary changes to make sure I'm not heading off in the wrong direction. Still to come:

1) Make confvars.sh files for the main apps.
2) Figure out the minimum set of makefiles that allmakefiles.sh should generate for an app that has a XULRunner SDK.
3) Figure out AC_DEFINE stuff.
Oh, and for reference, all the changes to make --with-libxul-sdk work were done in bug 299997.
Attachment #264969 - Flags: review?(benjamin)
Comment on attachment 264969 [details] [diff] [review]
WIP

This looks great! Eventually of course I'd like to get all of our app/extensions using this infrastructure, but even just for new apps this is wonderful.
Attachment #264969 - Flags: review?(benjamin) → review+
Comment on attachment 264969 [details] [diff] [review]
WIP

>Index: extensions/build.mk
>+$(error You fogot to set --enable-extensions

Spelling nit: "forgot".
Attached patch Patch, v1 (obsolete) — Splinter Review
Ok, here's a more complete patch. It makes confvars.sh files for all the major apps and extmakefiles.sh for all the extensions. The AC_DEFINE stuff is still in configure, but I think that might be ok.

I still need to figure out how to keep allmakefiles.sh from spitting out three tons of makefiles when --with-libxul-sdk is set.
Attachment #264969 - Attachment is obsolete: true
Attachment #265644 - Flags: review?(benjamin)
Comment on attachment 265644 [details] [diff] [review]
Patch, v1

I hate to do this to you, but can you unify the filename and variable name for extensions and applications? There are times when a single thing might be buildable as an extension or an application. Suggestions include MAKEFILES_local or even simply having makefiles.sh file call add_makefiles directly!

You need to have an Initial Developer block in all the new license headers. e.g. from http://www.mozilla.org/MPL/boilerplate-1.1/mpl-tri-license-sh

# The Initial Developer of the Original Code is
# ____________________________________________.

r=me with those changes
Attachment #265644 - Flags: review?(benjamin) → review+
I went with calling add_makefiles directly.

Carrying forward r+, I'll check this in tomorrow.
Attachment #265644 - Attachment is obsolete: true
Attachment #265775 - Flags: review+
Comment on attachment 265775 [details] [diff] [review]
Patch, v2 [checked in]

Landed this on trunk.
Attachment #265775 - Attachment description: Patch, v2 → Patch, v2 [checked in]
Blocks: 381776
Attached patch Followup patch for Solaris (obsolete) — Splinter Review
A bustage for Solaris: http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox-Ports.

The sh on Solaris doesn't support "source". Use "." instead.
Attachment #265883 - Flags: review?(benjamin)
Updated patch based on bent's comments. mrbkap helped to verify it on Ubuntu.
Attachment #265883 - Attachment is obsolete: true
Attachment #265904 - Flags: review?(benjamin)
Attachment #265883 - Flags: review?(benjamin)
Comment on attachment 265904 [details] [diff] [review]
Patch v2 for Solaris [checked in]

Thanks, this patch makes configure work with my ksh too.
Blocks: 381845
I have the same bug on kubuntu 6.10, and the patch for Solaris fix it.
Attachment #265904 - Flags: review?(benjamin) → review+
Comment on attachment 265904 [details] [diff] [review]
Patch v2 for Solaris [checked in]

I landed this on trunk.
Attachment #265904 - Attachment description: Patch v2 for Solaris → Patch v2 for Solaris [checked in]
Marking this fixed.

Followup work in bug 381900 and 381902.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: