@@ -348,7 +348,7 @@ env.other_method_name('another arg')
348348</arguments >
349349<summary >
350350<para >
351- Arranges for the specified
351+ Arrange for the specified
352352<parameter >action</parameter >
353353to be performed
354354after the specified
@@ -374,6 +374,12 @@ foo = Program('foo.c')
374374AddPostAction(foo, Chmod('$TARGET', "a-x"))
375375</example_commands >
376376
377+ <para >
378+ If a <parameter >target</parameter > is an &f-Alias; ,
379+ <parameter >action</parameter > is associated with the
380+ action of the alias, if specified.
381+ </para >
382+
377383</summary >
378384</scons_function >
379385
@@ -383,7 +389,7 @@ AddPostAction(foo, Chmod('$TARGET', "a-x"))
383389</arguments >
384390<summary >
385391<para >
386- Arranges for the specified
392+ Arrange for the specified
387393<parameter >action</parameter >
388394to be performed
389395before the specified
@@ -406,31 +412,39 @@ one or more targets in the list.
406412<para >
407413Note that if any of the targets are built in multiple steps,
408414the action will be invoked just
409- before the "final" action that specifically
415+ before the action step that specifically
410416generates the specified target(s).
411- For example, when building an executable program
412- from a specified source
413- <filename >.c</filename >
414- file via an intermediate object file:
417+ It may not always be obvious
418+ if the process is multi-step - for example,
419+ if you use the &Program; builder to
420+ construct an executable program from a
421+ <filename >.c</filename > source file,
422+ &scons; builds an intermediate object file first;
423+ the pre-action is invoked after this step
424+ and just before the link command to
425+ generate the executable program binary.
426+ Example:
415427</para >
416428
417429<example_commands >
418430foo = Program('foo.c')
419- AddPreAction(foo, 'pre_action ')
431+ AddPreAction(foo, 'echo "Running pre-action" ')
420432</example_commands >
421433
434+ <screen >
435+ $ scons -Q
436+ gcc -o foo.o -c foo.c
437+ echo "Running pre-action"
438+ Running pre-action
439+ gcc -o foo foo.o
440+ </screen >
441+
422442<para >
423- The specified
424- <literal >pre_action</literal >
425- would be executed before
426- &scons;
427- calls the link command that actually
428- generates the executable program binary
429- <filename >foo</filename >,
430- not before compiling the
431- <filename >foo.c</filename >
432- file into an object file.
443+ If a <parameter >target</parameter > is an &f-Alias; ,
444+ <parameter >action</parameter > is associated with the
445+ action of the alias, if specified.
433446</para >
447+
434448</summary >
435449</scons_function >
436450
@@ -440,7 +454,7 @@ file into an object file.
440454</arguments >
441455<summary >
442456<para >
443- Creates an <firstterm >alias </firstterm > target that
457+ Create an <firstterm >Alias </firstterm > node that
444458can be used as a reference to zero or more other targets,
445459specified by the optional <parameter >source</parameter > parameter.
446460Aliases provide a way to give a shorter or more descriptive
0 commit comments