pymake

  • Revision slug: pymake
  • Revision title: pymake
  • Revision id: 10781
  • Created:
  • Creator: Neil
  • Is current revision? No
  • Comment 2 words added

Revision Content

make.py (and the pymake modules that support it) are an implementation of the make tool which are mostly compatible with makefiles written for GNU make. http://benjamin.smedbergs.us/pymake/

Prerequisites

You need to have have MozillaBuild installed.  Additionally, you need to ensure your mingw shell is instructed to export SHELL (exactly that) before you try to run pymake.

Usage

Follow the build instructions, except for the "Build and install" section, then:

  • Add MOZ_OBJDIR=. to your .mozconfig
  • Create your objdir
  • Finally, change to your objdir and run python -O path_to_srcdir/build/pymake/make.py -f path_to_srcdir/client.mk TOPSRCDIR=path_to_srcdir/
    • When building comm-central use path_to_srcdir/mozilla/build/pymake/make.py

Alternate Usage

Follow the build instructions, except for the "Build and install" section, then:

  • Switch to the root of the source directory, then run autoconf-2.13.
  • Change to js/src and run autoconf-2.13 again.
  • Create your objdir.
  • Finally, change to your objdir and run path_to_srcdir/configure.

Running python -O path_to_srcdir/build/pymake/make.py starts the build. Add -j2 to the command line to do a parallel build (MOZ_MAKE_FLAGS in your mozconfig is not used by pymake). Using a -j value equal to the number of CPU cores visible to the OS is recommended.

After updating your source, it's a good idea to redo the autoconf-2.13 and configure steps before building, whether it be an incremental or full build.

Warning: on Windows, path_to_srcdir must be a relative path (eg ..), or pymake (and/or the configure step above, depending on the format of your paths and whether you used --srcdir with configure) will fail. A full DOS-style path (eg "e:/builds/mozilla-central") will fail in NSPR (and LDAP in comm-central) until bug 524785 is fixed. In particular, using pymake with the object files on a different drive to the source files is currently not supported. In the meantime, if you want to have your srcdir and objdir on different drives, you might be able to use a NTFS symlink or junction to glue things together so that you can invoke configure with a relative path.

Revision Source

<p>make.py (and the pymake modules that support it) are an implementation of the make tool which are mostly compatible with makefiles written for GNU make. <a class=" external" href="http://benjamin.smedbergs.us/pymake/" title="http://benjamin.smedbergs.us/pymake/">http://benjamin.smedbergs.us/pymake/</a></p>
<h3>Prerequisites</h3>
<p>You need to have have MozillaBuild installed.  Additionally, you need to ensure your mingw shell is instructed to <code>export SHELL</code> (exactly that) before you try to run pymake.</p>
<h3>Usage</h3>
<p>Follow the <a href="/En/Developer_Guide/Build_Instructions" title="En/Developer Guide/Build Instructions">build instructions</a>, except for the "Build and install" section, then:</p>
<ul> <li>Add <code>MOZ_OBJDIR=.</code> to your <code>.mozconfig</code></li> <li>Create your objdir</li> <li>Finally, change to your objdir and run <code>python -O <strong>path_to_srcdir/</strong>build/pymake/make.py -f </code><code><strong>path_to_srcdir/</strong></code><code>client.mk TOPSRCDIR=<strong>path_to_srcdir/</strong></code> <ul> <li>When building comm-central use <code><strong>path_to_srcdir/</strong>mozilla/build/pymake/make.py</code></li> </ul> </li>
</ul><h3>Alternate Usage</h3>
<p>Follow the <a href="/En/Developer_Guide/Build_Instructions" title="En/Developer Guide/Build Instructions">build instructions</a>, except for the "Build and install" section, then:</p>
<ul> <li>Switch to the root of the source directory, then run <code>autoconf-2.13</code>.</li> <li>Change to <code>js/src</code> and run <code>autoconf-2.13</code> again.</li> <li>Create your objdir.</li> <li>Finally, change to your <code>objdir</code> and run <code><strong>path_to_srcdir/</strong>configure</code>.</li>
</ul>
<p>Running <code>python -O <strong>path_to_srcdir/</strong>build/pymake/make.py</code> starts the build. Add <code>-j2</code> to the command line to do a parallel build (MOZ_MAKE_FLAGS in your mozconfig is not used by pymake). Using a <code>-j</code> value equal to the number of CPU cores visible to the OS is recommended.</p>
<p>After <a href="/En/Developer_Guide/Build_Instructions#Get_the_source" title="En/Developer Guide/Build Instructions#Get the source">updating your source</a>, it's a good idea to redo the <strong>autoconf-2.13</strong> and <strong>configur</strong><strong>e</strong> steps before building, whether it be an <a href="/en/Incremental_Build" title="en/Incremental Build">incremental</a> or full build.</p>
<div class="note"><strong>Warning</strong>: on Windows, <code><strong>path_to_srcdir</strong></code> must be a relative path (eg <code>..</code>), or pymake (and/or the configure step above, depending on the format of your paths and whether you used --srcdir with configure) will fail. A full DOS-style path (eg "<code>e:/builds/mozilla-central</code>") will fail in NSPR (and LDAP in comm-central) until bug 524785 is fixed. In particular, using pymake with the object files on a different drive to the source files is currently not supported. In the meantime, if you want to have your srcdir and objdir on different drives, you might be able to use a NTFS symlink or junction to glue things together so that you can invoke configure with a relative path.</div>
Revert to this revision