![]() |
|
P is for Practical | |
PerlMonks |
Ideas on more foolproof Makefile.PL and generated Makefileby bojinlund (Monsignor) |
on Feb 19, 2012 at 13:34 UTC ( [id://954865]=perlmeditation: print w/replies, xml ) | Need Help?? |
BackgroundI am used to "live" in emacs. Adding the line # (compile (concat "perl " (buffer-name)) nil) in a Perl scripts, makes it is easy to run the script in emacs. The script can be run by putting the cursor at the end of the line and typing C-x C-e (runs the emacs command eval-last-sexp). I had some problems with Padre, the Perl IDE, by running Running make resulted in the error message:
Understood after some work that the problem was "{{@ARGV}}" in the Makefile: Changed {{@ARGV}} to {@ARGV} and could run make without problems. Tried to find the real problem. Realized after some days, when I saw # dmake expands {{ to { and }} to }. in the file perl/lib/ExtUtils/MM_Win32.pm that I should have used dmake!! However calling dmake from emacs hangs.
The end of the output from (compile "dmake -v -f Makefile" nil), followed by kill-compilation is:
Any ideas why it sticks? Proposal: Comment in generated MakefileThe generated Makefile should start with a comment indicating how it was created and the intended usage.
Proposal: Command line option --help for Makefile.PLA Makefile.PL should at least support an option to get basic help. This help could include which other command line options are supported, what is generated by it and how to used the generated Makefile. Proposal: Runtime check in generated MakefileTo avoid mistakes using wrong make program, runtime tests are included in the generated makefile. This is a first draft how it could be implemented in a file for dmake: and a file for (gnu)make:
Proposal: Debug support in Makefile.PLIt had been nice with some easy to activate debug support in the Makefile.PL. Error messages often comes without context. A by command line option activated more verbose output could give indication of the source of an error message.
Back to
Meditations
|
|