Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

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

(compile "perl Makefile.PL" nil) (compile "make" nil)
Running make resulted in the error message:
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:

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 \
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:
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
Any ideas why it sticks?

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:

# 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
and a file for (gnu)make:
# 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.


In reply to Ideas on more foolproof Makefile.PL and generated Makefile by bojinlund

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (9)
    As of 2014-08-28 06:49 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (257 votes), past polls