mozilla

Revision 78831 of Makefiles - Best practices and suggestions

  • Revision slug: How_Mozilla's_build_system_works/Makefiles_-_Best_practices_and_suggestions
  • Revision title: Makefiles - Best practices and suggestions
  • Revision id: 78831
  • Created:
  • Creator: Joey Armstrong
  • Is current revision? No
  • Comment 41 words added

Revision Content

  • Always use dependencies with targets.  Initial make call is the workhorse: build, generate, deploy, install, etc.  Any subsequent make calls should be a NOP unless sources or dependencies change or have been removed.
  • Wrapper check/unit tests with a ENABLE_TESTS conditional so tests can be disabled on demand.
ifdef ENABLE_TESTS 
ifeq ($(NULL),$(filter WINNT OS2,$(OS_ARCH)))
DIRS += test
endif # WIN
endif # ENABLE_TESTS > >

Revision Source

<ul> <li>Always use dependencies with targets.  Initial make call is the workhorse: build, generate, deploy, install, etc.  Any subsequent make calls should be a NOP unless sources or dependencies change or have been removed.</li> <li>Wrapper check/unit tests with a ENABLE_TESTS conditional so tests can be disabled on demand.</li>
</ul>
<pre class="bz_comment_text" id="comment_text_6"><span class="quote">ifdef ENABLE_TESTS <br>    ifeq ($(NULL),$(filter WINNT OS2,$(OS_ARCH)))<br>        DIRS += test <br>    endif # WIN<br>endif # ENABLE_TESTS &gt; &gt; </span>
</pre>
Revert to this revision