Last Comment Bug 380846 - Make the build system friendlier for XULRunner apps and extensions
: Make the build system friendlier for XULRunner apps and extensions
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Ben Turner (not reading bugmail, use the needinfo flag!)
:
: Gregory Szorc [:gps]
Mentors:
: 381845 (view as bug list)
Depends on:
Blocks: 381776 381845 382150 382217 382218
  Show dependency treegraph
 
Reported: 2007-05-16 00:44 PDT by Ben Turner (not reading bugmail, use the needinfo flag!)
Modified: 2007-05-31 12:38 PDT (History)
10 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
WIP (5.71 KB, patch)
2007-05-16 00:46 PDT, Ben Turner (not reading bugmail, use the needinfo flag!)
benjamin: review+
Details | Diff | Splinter Review
Patch, v1 (104.27 KB, patch)
2007-05-22 01:17 PDT, Ben Turner (not reading bugmail, use the needinfo flag!)
benjamin: review+
Details | Diff | Splinter Review
Patch, v2 [checked in] (108.30 KB, patch)
2007-05-23 00:46 PDT, Ben Turner (not reading bugmail, use the needinfo flag!)
bent.mozilla: review+
Details | Diff | Splinter Review
Followup patch for Solaris (853 bytes, patch)
2007-05-23 20:33 PDT, Alfred Peng
no flags Details | Diff | Splinter Review
Patch v2 for Solaris [checked in] (1.91 KB, patch)
2007-05-24 00:03 PDT, Alfred Peng
benjamin: review+
Details | Diff | Splinter Review

Description Ben Turner (not reading bugmail, use the needinfo flag!) 2007-05-16 00:44:04 PDT
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.
Comment 1 Ben Turner (not reading bugmail, use the needinfo flag!) 2007-05-16 00:46:24 PDT
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.
Comment 2 Ben Turner (not reading bugmail, use the needinfo flag!) 2007-05-16 00:49:04 PDT
Oh, and for reference, all the changes to make --with-libxul-sdk work were done in bug 299997.
Comment 3 Benjamin Smedberg [:bsmedberg] 2007-05-21 07:12:39 PDT
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.
Comment 4 Ted Mielczarek [:ted.mielczarek] 2007-05-21 07:19:59 PDT
Comment on attachment 264969 [details] [diff] [review]
WIP

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

Spelling nit: "forgot".
Comment 5 Ben Turner (not reading bugmail, use the needinfo flag!) 2007-05-22 01:17:29 PDT
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.
Comment 6 Benjamin Smedberg [:bsmedberg] 2007-05-22 11:59:28 PDT
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
Comment 7 Ben Turner (not reading bugmail, use the needinfo flag!) 2007-05-23 00:46:15 PDT
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.
Comment 8 Ben Turner (not reading bugmail, use the needinfo flag!) 2007-05-23 13:10:03 PDT
Comment on attachment 265775 [details] [diff] [review]
Patch, v2 [checked in]

Landed this on trunk.
Comment 9 Alfred Peng 2007-05-23 20:33:32 PDT
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.
Comment 10 Alfred Peng 2007-05-24 00:03:36 PDT
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.
Comment 11 neil@parkwaycc.co.uk 2007-05-24 01:51:12 PDT
Comment on attachment 265904 [details] [diff] [review]
Patch v2 for Solaris [checked in]

Thanks, this patch makes configure work with my ksh too.
Comment 12 Laurent Jouanneau 2007-05-24 03:57:59 PDT
I have the same bug on kubuntu 6.10, and the patch for Solaris fix it.
Comment 13 Ben Turner (not reading bugmail, use the needinfo flag!) 2007-05-24 10:46:21 PDT
Comment on attachment 265904 [details] [diff] [review]
Patch v2 for Solaris [checked in]

I landed this on trunk.
Comment 14 Ben Turner (not reading bugmail, use the needinfo flag!) 2007-05-24 12:00:29 PDT
Marking this fixed.

Followup work in bug 381900 and 381902.
Comment 15 Ben Turner (not reading bugmail, use the needinfo flag!) 2007-05-24 12:02:42 PDT
*** Bug 381845 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.