mozilla

Revision 148398 of DIRS

  • Revision slug: DIRS
  • Revision title: DIRS
  • Revision id: 148398
  • Created:
  • Creator: Jimb
  • Is current revision? No
  • Comment Add back "subdirectories after parents" explanation, with a little more detail

Revision Content

The DIRS makefile variable contains a list of subdirectories to recursively build in. Many of the standard targets provided by {{ Source("config/rules.mk") }} iterate over the directories listed in DIRS. Makefiles should include {{ Source("rules.mk") }} after defining their own targets; doing so means that this iteration takes place after running the Makefile's own commands for the target.

Set By

Tree makefiles may set DIRS after including {{ Source("config/autoconf.mk") }} but before including {{ Source("config/config.mk") }} or {{ Source("config/rules.mk") }}.

If a makefile sets the TIERS variable, then {{ Source("config/rules.mk") }} will add the directories listed in the tier_tiername_dirs variables to DIRS automatically.

Example

{{ Source("toolkit/Makefile.in") }}
DIRS	= \
          content \
          locales \
          obsolete \
          profile \
          themes \
          $(NULL)

ifndef MINIMO
DIRS += \
        xre \
        mozapps \
        $(NULL)
endif

Revision Source

<p>The <code>DIRS</code> makefile variable contains a list of subdirectories to recursively build in. Many of the standard targets provided by {{ Source("config/rules.mk") }} iterate over the directories listed in <code>DIRS</code>. Makefiles should include {{ Source("rules.mk") }} after defining their own targets; doing so means that this iteration takes place after running the Makefile's own commands for the target.
</p>
<h3 name="Set_By"> Set By </h3>
<p>Tree makefiles may set <code>DIRS</code> after including {{ Source("config/autoconf.mk") }} but before including {{ Source("config/config.mk") }} or {{ Source("config/rules.mk") }}.
</p><p>If a makefile sets the <code>TIERS</code> variable, then {{ Source("config/rules.mk") }} will add the directories listed in the <code>tier_<i>tiername</i>_dirs</code> variables to <code>DIRS</code> automatically.
</p>
<h3 name="Example"> Example </h3>
<table class="standard-table">
<tbody><tr>
<td>{{ Source("toolkit/Makefile.in") }}</td>
<td><pre>
DIRS	= \
          content \
          locales \
          obsolete \
          profile \
          themes \
          $(NULL)

ifndef MINIMO
DIRS += \
        xre \
        mozapps \
        $(NULL)
endif
</pre>
</td>
</tr>
</tbody></table>
Revert to this revision