The default bug view has changed. See this FAQ.

Make the build system friendlier for XULRunner apps and extensions

RESOLVED FIXED

Status

()

Core
Build Config
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Ben Turner (not reading bugmail, use the needinfo flag!), Assigned: Ben Turner (not reading bugmail, use the needinfo flag!))

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 3 obsolete attachments)

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.
Created attachment 264969 [details] [diff] [review]
WIP

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".
Created attachment 265644 [details] [diff] [review]
Patch, v1

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+
Created attachment 265775 [details] [diff] [review]
Patch, v2 [checked in]

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]

Updated

10 years ago
Blocks: 381776

Comment 9

10 years ago
Created attachment 265883 [details] [diff] [review]
Followup patch for Solaris

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)

Comment 10

10 years ago
Created attachment 265904 [details] [diff] [review]
Patch v2 for Solaris [checked in]

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 11

10 years ago
Comment on attachment 265904 [details] [diff] [review]
Patch v2 for Solaris [checked in]

Thanks, this patch makes configure work with my ksh too.

Updated

10 years ago
Blocks: 381845

Comment 12

10 years ago
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
Last Resolved: 10 years ago
Resolution: --- → FIXED
Duplicate of this bug: 381845
Blocks: 382150
Blocks: 382217
Blocks: 382218
You need to log in before you can comment on or make changes to this bug.