Background
I 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:(compile "perl Makefile.PL" nil) (compile "make" nil)
to undefined at C:/Dwimperl/perl/lib/ExtUtils/Install.pm line 1208 make: *** [pm_to_blib] Error 2
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.pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM) $(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e "pm_to_blib({{@ARGV +}}, '$(INST_LIB)\auto', q[$(PM_FILTER)], '$(PERM_DIR)')" -- \ lib/Padre/Wx/Scintilla.pm blib\lib\Padre\Wx\Scintilla.pm \
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.
Any ideas why it sticks?dmake: Updating [config], (1 > 0) C:\Dwimperl\perl\bin\perl.exe "-Iinc" -MExtUtils::Command -e mkpath -- + "blib\lib\auto\share\dist\Padre\." warning: extra args ignored after '-e' Terminating on signal SIGINT(2) C:\Dwimperl\perl\bin\perl.exe "-Iinc" -MExtUtils::Command -e chmod -- +755 "blib\lib\auto\share\dist\Padre\." dmake: C:\Dwimperl\c\bin\startup\config.mk: line 1: Warning: -- Mac +ro `OS' redefined after use dmake: C:\Dwimperl\c\bin\startup\startup.mk: line 142: Warning: -- +More than one prerequisite for %-target. Use :| ruleop or indirect prerequisites. dmake: C:\Dwimperl\c\bin\startup\startup.mk: line 146: Warning: -- +More than one prerequisite for %-target. Use :| ruleop or indirect prerequisites. dmake: Makefile: line 1201: Warning: -- The .SUFFIXES target has no + special meaning and is deprecated. Caught SIGINT. Trying to quit ... dmake: Warning: -- Internal Warning: finished pid 64 is not in pq!? dmake: Error code 130, while making 'config' Compilation interrupt at Sun Feb 19 09:06:15
Proposal: Comment in generated Makefile
The generated Makefile should start with a comment indicating how it was created and the intended usage.
# This Makefile is generated by the Makefile.PL. To use this file run: # dmake (prepares the installation) # dmake test (tests the prepared install) # dmake install (performs the installation)
Proposal: Command line option --help for Makefile.PL
A 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 Makefile
To 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:# Makefile intended for dmake ifneq "{xxx}" "xxx" # "{xxx}" and "xxx" is equal in dmake $(info Warning: This is a makefile for dmake) $(error Error: This is a makefile for dmake) endif all: @echo OK
# Makefile intended for (gnu)make all: # "{xxx}" and "xxx" is equal in dmake ifeq "{xxx}" "xxx" @echo ERROR: This makefile is NOT for dmake I_DO_NOT_KNOW_HOW_TO_GENERTE_AN_ERROR endif @echo 'OK'
Proposal: Debug support in Makefile.PL
It 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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Ideas on more foolproof Makefile.PL and generated Makefile
by JavaFan (Canon) on Feb 19, 2012 at 17:13 UTC | |
Re: Ideas on more foolproof Makefile.PL and generated Makefile
by bojinlund (Monsignor) on Mar 22, 2012 at 14:33 UTC | |
Re: Ideas on more foolproof Makefile.PL and generated Makefile
by bulk88 (Priest) on Mar 22, 2012 at 18:39 UTC | |
Re: Ideas on more foolproof Makefile.PL and generated Makefile
by educated_foo (Vicar) on Feb 21, 2012 at 04:55 UTC | |
by Anonymous Monk on Feb 21, 2012 at 05:35 UTC | |
by educated_foo (Vicar) on Feb 21, 2012 at 06:14 UTC | |
by Anonymous Monk on Feb 21, 2012 at 08:32 UTC |