Skip to content

Commit 5b36331

Browse files
committed
improve the docs on PL_FILES
1 parent fead8dc commit 5b36331

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

lib/ExtUtils/MakeMaker.pm

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,7 +2481,9 @@ Desired permission for executable files. Defaults to C<755>.
24812481
MakeMaker can run programs to generate files for you at build time.
24822482
By default any file named *.PL (except Makefile.PL and Build.PL) in
24832483
the top level directory will be assumed to be a Perl program and run
2484-
passing its own basename in as an argument. For example...
2484+
passing its own basename in as an argument. This basename is actually a build
2485+
target, and there is an intention, but not a requirement, that the *.PL file
2486+
make the file passed to to as an argument. For example...
24852487
24862488
perl foo.PL foo
24872489
@@ -2491,6 +2493,8 @@ and the value is passed in as the first argument when the PL file is run.
24912493
24922494
PL_FILES => {'bin/foobar.PL' => 'bin/foobar'}
24932495
2496+
PL_FILES => {'foo.PL' => 'foo.c'}
2497+
24942498
Would run bin/foobar.PL like this:
24952499
24962500
perl bin/foobar.PL bin/foobar
@@ -2509,7 +2513,14 @@ INST_ARCH in their C<@INC>, so the just built modules can be
25092513
accessed... unless the PL file is making a module (or anything else in
25102514
PM) in which case it is run B<before> pm_to_blib and does not include
25112515
INST_LIB and INST_ARCH in its C<@INC>. This apparently odd behavior
2512-
is there for backwards compatibility (and it's somewhat DWIM).
2516+
is there for backwards compatibility (and it's somewhat DWIM). The argument
2517+
passed to the .PL is set up as a target to build in the makefile. In other
2518+
sections such as C<postamble> you can specifiy a dependency on the
2519+
filename/argument that the .PL is supposed (or will have to, now that that is
2520+
is a dependency) to generate. Note the file to be generate will still be
2521+
generated and the .PL will still run even without an explicit dependency created
2522+
by you, since the C<all> target still depends on running all eligible to run.PL
2523+
files.
25132524
25142525
=item PM
25152526

0 commit comments

Comments
 (0)