@@ -2481,7 +2481,9 @@ Desired permission for executable files. Defaults to C<755>.
24812481MakeMaker can run programs to generate files for you at build time.
24822482By default any file named *.PL (except Makefile.PL and Build.PL) in
24832483the 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+
24942498Would 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
25092513accessed... unless the PL file is making a module (or anything else in
25102514PM) in which case it is run B<before > pm_to_blib and does not include
25112515INST_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