On Tue, Nov 27, 2007 at 04:23:17PM -0800, James Keenan wrote:
> Attempting 'make realclean' tonight in 2 different sandboxes, both 
> pointing to trunk, both on Linux, I got the following output:
> 
> make -C compilers/tge clean
> make[1]: Entering directory `/home/jimk/work/parrot/compilers/tge'
> /usr/local/bin/perl -MExtUtils::Command -e rm_rf 
> "../../t/compilers/tge/*.pir"
> /usr/local/bin/perl -MExtUtils::Command -e rm_rf TGE.pbc \
>          TGE/Rule.pbc \
>          TGE/Parser.pir \
>          TGE/Parser.pbc \
>          TGE/Tree.pbc \
>          TGE/Grammar.pbc \
>          TGE/Compiler.pbc \
>          ../../runtime/parrot/library/TGE.pbc
> make[1]: Leaving directory `/home/jimk/work/parrot/compilers/tge'
> make -C compilers/nqp clean
> make[1]: Entering directory `/home/jimk/work/parrot/compilers/nqp'
> make[1]: *** No rule to make target `clean'.  Stop.
> make[1]: Leaving directory `/home/jimk/work/parrot/compilers/nqp'
> make: *** [compilers-clean] Error 2
> 
> 
> This appears to be very similar to the problem handled in 
> http://rt.perl.org/rt3/Ticket/Display.html?id=47792, only now the error 
> is associated with nqp rather than dotnet.
> 
> The problem appears to have appeared within the last 24 hours.

If you rebuild and do 'make realclean' a second time, do you still
get the error?

I suspect that the "make realclean" error occurs when a major
package changes location (nqp moved from languages/nqp/ to
compilers/nqp/ ) and so things get out-of-sync with the Makefile
locations.

And now that I look at the root Makefile, I'm fairly certain that
this is the case, because the root Makefile contains itself as a
target, as in:

    Makefile : config/gen/makefiles/root.in
            $(RECONFIGURE) --step=gen::makefiles --target=Makefile

So, if someone does an "svn up" followed by a "make realclean",
this error can appear.  Here's the sequence:

1.  "svn up" adds the compilers/nqp/ directory and 
    updates config/gen/makefiles/root.in .

2.  "make realclean" sees that config/gen/makefiles/root.in has
    changed, and so it rebuilds the root Makefile.  This new root
    Makefile includes reference to a Makefile in the new
    compilers/nqp/ directory.  However, since we haven't done
    a full configure yet, that directory doesn't yet contain
    a Makefile, and we get the error.

IMO, while it's okay for Makefiles in languages/ and other tool
subdirectories to rebuild themselves, I don't think that the root
Makefile should ever do this.  If something happens that causes
the root Makefile to be out of date, then we should assume that
_all_ configuration is out of date and require a full Configure.pl .

So, I suggest removing the above Makefile target from root.in
entirely, or replace it with something that says "Makefile out 
of date -- re-run Configure.pl".

Pm

Reply via email to