Closed Bug 927213 Opened 11 years ago Closed 11 years ago

Add mozmake (patched GNU make 4.0) to mozillabuild

Categories

(Firefox Build System :: MozillaBuild, task)

All
Windows 7
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 4 obsolete files)

The binary is there:
http://people.mozilla.org/~mhommey/mozmake.exe

How it was built:
- Download and unpack http://ftp.gnu.org/gnu/make/make-4.0.tar.bz2
- Apply both patches I'm attaching here.
- Copy config.h.W32 to config.h.
- Edit config.h and uncomment "#define BATCH_MODE_ONLY_SHELL 1"
- Open make_msvc_net2003.sln in msvc
- In msvc's configuration manager, select the release build instead of debug build
- Build it
- Take the resulting Release/make_msvc_net2003.exe and copy it as mozmake.exe where you want it to be.
Gerv, could you take a look at comment 0 and tell us how best we could redistribute this following the letter of the GPL3 GNU make is licensed under? (considering mozillabuild sources are in http://hg.mozilla.org/mozilla-build/)
Flags: needinfo?(gerv)
Blocks: 925605
Blocks: 927671
Blocks: 925350
Depends on: 928594
Blocks: 928594
No longer depends on: 928594
Please hold on for this, as there is another issue that needs fixing:
https://savannah.gnu.org/bugs/index.php?40322
Hi Mike:

You want to distribute mozmake.exe?

If so, you should accompany it with a README which fulfils GPL v.3 section 6 d). It needs to "maintain clear directions next to the object code saying where to find the Corresponding Source." It seems easiest to me to make our hg repo contain the patched source (perhaps it already does) so all we have to do is link there.

The repo should contain a README with a simple set of build instructions like those in comment 0, plus something to comply with GPLv3 section 5) - so a notice stating that you modified it, and when.

You also need to provide a copy of the GPLv3, to comply with section 4. A file called COPYING is the usual method. 

Let me know if you need more.

Gerv
Flags: needinfo?(gerv)
Attachment #817541 - Attachment is obsolete: true
Attachment #817544 - Attachment is obsolete: true
I updated mozmake on birch to a new build:
https://hg.mozilla.org/projects/birch/raw-file/38a7925c0c68/mozmake.exe

This is how this was built:
- Clone upstream git (git://git.savannah.gnu.org/make.git) at revision 9d58570
- Copy config.h.W32.template to config.h.
- Edit config.h, uncomment "#define BATCH_MODE_ONLY_SHELL 1", replace %PACKAGE% with "make", and %VERSION% with the output of git describe.
- Open make_msvc_net2003.sln in msvc
- In msvc's configuration manager, select the release build instead of debug build
- Build it
- Take the resulting Release/make_msvc_net2003.exe and copy it as mozmake.exe where you want it to be.

I think this build is good to go for a mozillabuild release. Ryan, can you go ahead with this?

The "only" thing that would remain to be done is to avoid having to use BATCH_MODE_ONLY_SHELL but that requires some work in our build system to work around bash.exe sucking with quotes. That part can definitely wait.
Flags: needinfo?(ryanvm)
I would *love* a tarball of the source used. That's more in line with how the other sources are included. Pleeeeease? :)
Flags: needinfo?(ryanvm)
I created a patch with the vanilla source archive, a patch for the
Mozilla modifications, and a README.
Attachment #824841 - Flags: review?(mh+mozilla)
Assignee: nobody → gps
Comment on attachment 824841 [details] [diff] [review]
GNU Make 4.0 source with modifications

Review of attachment 824841 [details] [diff] [review]:
-----------------------------------------------------------------

I think the tarball would be better generated with git-archive, which would make it reproducible. I'll attach a revised patch.

::: make/README
@@ +1,5 @@
> +This directory contains the source and modifications to GNU Make to enable it to be
> +used to build Firefox.
> +
> +This directory contains source archives for GNU Make that were exported from
> +it's canonical Git repository at git://git.savannah.gnu.org/make.git.

its

@@ +5,5 @@
> +it's canonical Git repository at git://git.savannah.gnu.org/make.git.
> +
> +To obtain the source, extract the vanilla/unmodified make-*.tar.bz2 source
> +archive. Then apply the patches from the NNNN-*.patch files in this directory
> +in order.

Note 0001-Windows-build-config.patch has copy instructions, I'm not sure the patch utility handles those.
Attachment #824841 - Flags: review?(mh+mozilla)
(In reply to Mike Hommey [:glandium] from comment #8)
> Note 0001-Windows-build-config.patch has copy instructions, I'm not sure the
> patch utility handles those.

Waw, it does, since 2.7. I'll add a note.
(Unfortunately, mozilla build comes with 2.5.4)
Attachment #825048 - Flags: review?(ryanvm)
Attachment #824841 - Attachment is obsolete: true
Assignee: gps → mh+mozilla
Status: NEW → ASSIGNED
Comment on attachment 825048 [details] [diff] [review]
GNU Make 4.0 source with modifications

* I assume mozmake.exe from comment 5 is the latest and greatest you want added still? Please just hg add it to the patch to avoid any confusion.
* Why can't 0001-Windows-build-config.patch be included in the source tarball? I'd rather have everything in one spot (especially because I'm working on rearranging things so all sources are in one subdirectory).
* This patch doesn't do anything to actually include mozmake in the shipping package. You'll need to update packageit.sh to copy mozmake.exe to wherever you want it (presumably ./mozmake?).
* You'll also need to update profile-extravars.sh so that it's actually included in the PATH.
Attachment #825048 - Flags: review?(ryanvm) → review-
(In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #12)
> * Why can't 0001-Windows-build-config.patch be included in the source
> tarball?

Because I think it's better if the source tarball is verifiable (checksum and all), which adding a file doesn't allow.
Attachment #825048 - Attachment is obsolete: true
Attachment #828415 - Flags: review?(ryanvm)
Comment on attachment 828415 [details] [diff] [review]
Add mozmake (patched GNU make 4.0) to mozillabuild

Looks great, sorry for taking so long to look at this :(. At least any future "update mozmake" bugs will go faster...

http://hg.mozilla.org/mozilla-build/rev/85787b90e35c
Attachment #828415 - Flags: review?(ryanvm) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Blocks: 928983
No longer blocks: 927671
Product: mozilla.org → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: