http://www.perlmonks.org?node_id=62924

dotc has asked for the wisdom of the Perl Monks concerning the following question:

Running perl Makefile.pl using ActivePerl under win2000 seems to be consistently creating broken Makefiles (that's Makemaker v5.45 (Revision: 1.222) for anyone keeping score). Here's a snippet from a real-life that causes make to choke:
# --- MakeMaker pm_to_blib section: pm_to_blib: $(TO_INST_PM) @$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \ "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \ -e "pm_to_blib(qw[ <<pmfiles.dat ],'$(INST_LIB)\auto')" $(PM_TO_BLIB) << @$(TOUCH) $@
Running make on this makefile produces the, Makefile:730: *** missing separator. Stop errmsg.

Cutting the whole pm_to_blib: section doesn't help -- another error somewhere else pops up.

Any help would be greatly appreciated.

edit: chipmunk 2001-03-08

Replies are listed 'Best First'.
Re: make / Makemaker trouble
by dotc (Acolyte) on Mar 08, 2001 at 10:26 UTC
    According to the Perl User's Digest Issue 1629 Volume 8, that syntax is only legal for nmake.

    Gurusamy Sarathy said that the makemaker produces a makefile with syntax as specified in the 'make=foomake' line of Config.pm.

Re: make / Makemaker trouble
by jmcnamara (Monsignor) on Mar 08, 2001 at 16:00 UTC
    Perhaps the problem is with your version of make. Borland's make chokes on MakeMaker files in this way.

    Try nmake at the usual source or here.

    John.
    --
    "The Mosaic code has replaced the law of the jungle."
    James Joyce - Ulysses

      Borland's make doesn't choke on MakeMaker-made Makefiles if you tell MakeMaker to make a Makefile for Borland make. (Sung to the tune of "How much wood would a woodchuck chuck".)

      That is why we have MakeMaker and not just a Makefile. What type of Makefile to generate is determined from settings in your Config.pm file.

              - tye (but my friends call me "Tye")
Re: make / Makemaker trouble
by frag (Hermit) on Jun 29, 2001 at 05:41 UTC
    OK, this post is a few months old, but I just spent much of the day wrangling with this very same thing and I've got it fixed, and I want to set down my findings for future SuperSearchers.

    First: nmake: leave it to Microsoft to produce a closed-source version of make that deviates from standards. Bag that, and go to The Perl Powertools project and grab their version of make, written in Perl.

    Next: find your "lib/Config.pm" file. Find the "make" entry. Change it to "make". ("pmake" is, I think, probably the more correct value, but at least for the version of perl and ExtUtils that I'm using, it seems to make no difference.) Save the file.

    That should be all you need. Run "make clean", and "perl Makefile.PL" over again to rebuild the Makefile, and make should now work.

    Here's what's going on: The "$(PM_TO_BLIB) <<" bit and the "<<pmfiles.dat" bit are nmake-specific and break other makes. When perl runs Makefile.PL, it looks to Config.pm to determine what sort of Makefile it should be writing. Then it spits out this wrong format, which breaks other makes. To see what other makes perl tries to account for, and how this gets generated, examine ExtUtils::MM_Win32.pm.

    -- Frag.
    (Yeahyeah, I realize that technically there's no such beast as "make standards", and MS doesn't seem to be the only purveyor of oddball makes.)