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

I am building a Perl extension using a makefile generated by typing:
perl makefile.pl
I execute the makefile by typing:
omake -EN
The output I receive is:
Makefile out-of-date with respect to Makefile.PL C:\Perl\lib\Config.pm + C:\Perl\lib\CORE\config.h Cleaning current config before rebuilding Makefile... omake -f Makefile.old clean > NUL || rem C:\Perl\bin\perl.exe Makefile.PL Checking if your kit is complete... Looks good Note (probably harmless): No library found for -lVEILibDLL Writing Makefile for EME_XSUB ==> Your Makefile has been rebuilt. <== ==> Please rerun the make command. <== false 'false' is not recognized as an internal or external command, operable program or batch file. omake: Shell line exit status 1. Stop. omake: makefile (line 781): Removing Makefile (warning).
This comes from the following section in the makefile:
# We take a very conservative approach here, but it's worth it. # We move Makefile to Makefile.old here to avoid gnu make looping. $(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP) $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?" $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makef +ile..." $(NOECHO) $(RM_F) $(MAKEFILE_OLD) $(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) -$(MAKE) -f $(MAKEFILE_OLD) clean $(DEV_NULL) || $(NOOP) $(PERLRUN) Makefile.PL $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <==" $(NOECHO) $(ECHO) "==> Please rerun the make command. <==" false
This is very frustrating as the date/time on the dependencies is not later than on the target. What is going on? Can someone please help me? Thanks in advance!!

Replies are listed 'Best First'.
Re: problem building extension
by tachyon (Chancellor) on Jun 17, 2004 at 23:47 UTC

    Evidently this extension ships with a file Makefile as well as Makefile.PL. What the command perl Makefile.PL does is to write a file called Makefile. On Win32 you would usually use nmake. What nmake does is to read the content of the Makefile generated by running Makefile.PL and execute it to build the extension. The usual way to make an app on Win32 is:

    perl Makefile.PL nmake && nmake test && nmake install

    See A Guide to Installing Modules. Get nmake. Try it the usual way. If you can't get it to work post a link to the extension source. Monks like PodMaster and myself like getting stuff to build on Win32.....

    The fact that it is looking for lVEILibDLL means that this is an XS/C based app. You will need a C compiler to build it successfully. The fact that it can't find this lib means you have a problem. See A Practical Guide to Compiling C based Modules under ActiveState using Microsoft C++

    cheers

    tachyon

      omake is a ClearCase make tool and the -EN switch is meant to make it behave like nmake.

      If, as the OP states, the dates on the dependancy files are really not later than that of the target then it shouldn't be trying to rebuild the Makefile. But if the make tool doesn't know how to handle dependancies it would be pretty useless and ClearCase is a big enough name to consider that unlikely.


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail
      "Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon
      I guess I left something out. I have used nmake and it works. I have to use omake for the configuration control system we use here (clearcase). I think what I want to know is whether there's a way to edit Makefile.PL so that in makefile, the makefile dependency isn't checked at all. When I remove the section in the makefile that checks that dependency, the build works. The missing DLL is a different problem. I know how to fix that - sorry for leaving it in. Thanks for so many replies so quick!!

        Makefile.PL is just perl code. You could add any of:

        unlink './Makefile'; rename './Makefile', './Makefile.old' system('nmake clean') if $^0 =~ m/Win32/;

        before the call to ExtUtils::MakeMaker to get rid of the old Makefile (which I think is the issue).

        Alternatively you can simply EDIT the Makefile after it is created to delete the section that is causing you issues. After the call to MakeMaker add some perl to make any edits you need to keep omake happy.

        You can add any amount of cleanup, prompting, etc, etc code to Makefile.PL. For example it is not uncommon to automatically pick a C/C++ compiler based on platform (see Inline::CPP distro Makefile.PL) or hunt down libraries (and prompt if not found) etc, etc.

        cheers

        tachyon

Re: problem building extension
by mifflin (Curate) on Jun 17, 2004 at 21:28 UTC
    I've never seen an installation using
    makefile.pl

    It's usually Makefile.PL like the error message you get states

      He's using Windows with its case-ignorant command line.

      In this case, not knowing what omake is, I'd suggest trying nmake. That's just a guess though.

Re: problem building extension
by wufnik (Friar) on Jun 17, 2004 at 22:53 UTC
    ermmm if chromatics suggestion does not work - try 2 things -

    delete the 'false' from the bottom of that snippet of yours...

    give us a wee bit more information on which module you're trying to build so we can duplicate the error. or tell us more about the mysterious omake. whatever, more detail please!
    ...wufnik

    -- in the world of the mules there are no rules --