Michael G Schwern <[EMAIL PROTECTED]> wrote on 09/20/2005 05:02:31 PM
in reply to my question:

> > Why does MakeMaker need to know how to do it?

> Only this one is actually used in day-to-day Makefiles but it only
happens
> if the Makefile.PL is newer than the Makefile, so its not critical code.
>
> # --- MakeMaker makefile section:
> # 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
Makefile...
> "
>         -$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
>         -$(NOECHO) $(MV)   $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
>         - $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
>         $(PERLRUN) Makefile.PL
>         $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
>         $(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command.  <=="
>         false

OK then replacing that last line with:

      $(PERLRUN) -e "exit 1"

might do the trick for most unixes (I presume MacOS X) and VMS.  I am not
too sure about dmake or nmake on Windows (and cannot easily test it out
here).

I guess the docs recommend editing a Makefile.PL to solve problems, hence
the dependency problem obtains even for folks who are not CPAN developers.

BTW a descrip.mms generated by 6.17 has no command at that spot.
If I run the moral eqivalent of the following:

$ mmk
$

(the return to the shell prompt indicates this directory is already built)

$ touch makefile.pl
$ mmk
$ mmk
Descrip.MMS out-of-date with respect to
MAKEFILE.PL,PERL_ROOT:[LIB.VMS_AXP.5_8_1]CONFIG.PM,PERL_ROOT:[LIB.VMS_AXP.5_8_1.CORE]CONFIG.H
Cleaning current config before rebuilding Descrip.MMS ...
Rename/NoConfirm Descrip.MMS Descrip.MMS_old
MMK /Descrip=Descrip.MMS_old clean
MCR $dka300:[perl.perl-5_8_1_root]perl.exe "-MExtUtils::Command" -e rm_f
*.Map *.Dmp *.Lis *.cpp *.exe *.obj *.olb *.Opt  XPath.bso .MM_Tmp
MCR $dka300:[perl.perl-5_8_1_root]perl.exe "-MExtUtils::Command" -e rm_rf
pm_to_blib blib [.blib.arch.auto.XML.XPath]extralibs.all perlmain.c
MCR $dka300:[perl.perl-5_8_1_root]perl.exe "-MExtUtils::Command" -e rm_rf
pm_to_blib.ts Makeaperl.MMS [.blib.arch.auto.XML.XPath]extralibs.ld
MCR $dka300:[perl.perl-5_8_1_root]perl.exe Makefile.PL
Checking if your kit is complete...
Looks good
Writing Descrip.MMS for XML::XPath
Descrip.MMS has been rebuilt.
Please run MMK to build the extension.
cp [.xpath]step.pm [.blib.lib.xml.xpath]step.pm
cp [.xpath.node]attribute.pm [.blib.lib.xml.xpath.node]attribute.pm
cp [.xpath]parser.pm [.blib.lib.xml.xpath]parser.pm
cp [.xpath.node]element.pm [.blib.lib.xml.xpath.node]element.pm
cp [.xpath]node.pm [.blib.lib.xml.xpath]node.pm
cp [.xpath]variable.pm [.blib.lib.xml.xpath]variable.pm
cp [.xpath]number.pm [.blib.lib.xml.xpath]number.pm
cp [.xpath]perlsax.pm [.blib.lib.xml.xpath]perlsax.pm
cp [.xpath]root.pm [.blib.lib.xml.xpath]root.pm
cp [.xpath.node]namespace.pm [.blib.lib.xml.xpath.node]namespace.pm
cp [.xpath]locationpath.pm [.blib.lib.xml.xpath]locationpath.pm
cp [.xpath.node]pi.pm [.blib.lib.xml.xpath.node]pi.pm
cp [.xpath]literal.pm [.blib.lib.xml.xpath]literal.pm
cp [.xpath]builder.pm [.blib.lib.xml.xpath]builder.pm
cp [.xpath.node]text.pm [.blib.lib.xml.xpath.node]text.pm
cp [.xpath.node]comment.pm [.blib.lib.xml.xpath.node]comment.pm
cp xpath.pm [.blib.lib.xml]xpath.pm
cp [.xpath]boolean.pm [.blib.lib.xml.xpath]boolean.pm
cp [.xpath]function.pm [.blib.lib.xml.xpath]function.pm
cp [.xpath]expr.pm [.blib.lib.xml.xpath]expr.pm
cp [.xpath]xmlparser.pm [.blib.lib.xml.xpath]xmlparser.pm
cp [.xpath]nodeset.pm [.blib.lib.xml.xpath]nodeset.pm
Copy/NoConfirm [.examples]xpath [.blib.script]xpath
%COPY-S-COPIED,
USER:[PPRYMMER.CPAN_MODULES.XML-XPATH-1_13.EXAMPLES]XPATH.;1 copied to
USER:[PPRYMMER.CPAN_MODULES.XML-XPATH-1_13.BLIB.SCRIPT]XPATH.;1 (3 blocks)
$

So it is falling through to the default all (build) target
and running executing that section.  It did not error out back
to DCL with the admonishment to rerun MMK.
By the way, touch is not a native VMS/DCL shell command.

If I change the makefile section to have the C<\t$(PERLRUN) -e "exit 1">
final command I see the following after I touch makefile.pl:

$ mmk
Descrip.MMS out-of-date with respect to
MAKEFILE.PL,PERL_ROOT:[LIB.VMS_AXP.5_8_1]CONFIG.PM,PERL_ROOT:[LIB.VMS_AXP.5_8_1.CORE]CONFIG.H
Cleaning current config before rebuilding Descrip.MMS ...
Rename/NoConfirm Descrip.MMS Descrip.MMS_old
MMK /Descrip=Descrip.MMS_old clean
MCR $dka300:[perl.perl-5_8_1_root]perl.exe "-MExtUtils::Command" -e rm_f
*.Map *.Dmp *.Lis *.cpp *.exe *.obj *.olb *.Opt  XPath.bso .MM_Tmp
MCR $dka300:[perl.perl-5_8_1_root]perl.exe "-MExtUtils::Command" -e rm_rf
pm_to_blib [.blib.arch.auto.XML.XPath]extralibs.ld pm_to_blib.ts perlmain.c
blib
MCR $dka300:[perl.perl-5_8_1_root]perl.exe "-MExtUtils::Command" -e rm_rf
[.blib.arch.auto.XML.XPath]extralibs.all Makeaperl.MMS
MCR $dka300:[perl.perl-5_8_1_root]perl.exe Makefile.PL
Checking if your kit is complete...
Looks good
Writing Descrip.MMS for XML::XPath
Descrip.MMS has been rebuilt.
Please run MMK to build the extension.
MCR $dka300:[perl.perl-5_8_1_root]perl.exe -e "exit 1"
%SYSTEM-F-ABORT, abort
%MMK-F-ERRUPD, error status %X0000002C occurred when updating target
DESCRIP.MMS

I guess that is the preferred behavior (but to be
honest the old behavior is not unattractive either).

Peter Prymmer

Reply via email to