Share via


When Custom Build Rules Run

Home Page (Projects)OverviewsHow Do I... TopicsNMAKE Reference

Custom build rules run at different times, depending on whether they are specified on the Custom Build tab, the Pre-link step tab, or the Post-link step tab.

Rules entered on the Custom Build tab run only when any input file is out of date in relation to its output file, or if the output file doesn’t exist.

Per-file rules that you enter on the Custom Build tab run before the normal build-system tools (such as the compiler, the resource compiler, and so forth) are run.

Important   Do not attach per-file rules to the output files of build-system tools, such as .obj, .res, or .tbl files. Such per-file rules may not run as expected.

Per-project rules that you enter on the Custom Build tab run after the normal build process finishes.

Rules that you enter on the Pre-link step tab run between compile and link time. No file timestamps are checked.

Rules that you enter on the Post-build step tab run after successful completion of the normal build process, including successful completion of rules entered on the Custom Build tab. No file timestamps are checked.

What do you want to do?

Specify build rules that run before the link process

Specify build rules that run after the build process