cvsuser     03/05/30 07:55:21

  Modified:    config/gen/makefiles root.in
               config/inter pmc.pl
               languages/imcc TestCompiler.pm
  Log:
  To fix frequent `make` rebuilds, I removed dependencies on directories,
  (blib/lib and classes/) and replaced with dependencies on their contents.
  Added ${pmc_classes_pmc}, which parallels ${pmc_classes_o}.
  This allows the root Makefile to refer to the whole set of classes/*.pmc
  Added $(MKDIR_F), to create multiple dirs, with no error if dirs exist.
  Allow building IMCC from root.
  
  Revision  Changes    Path
  1.83      +29 -19    parrot/config/gen/makefiles/root.in
  
  Index: root.in
  ===================================================================
  RCS file: /cvs/public/parrot/config/gen/makefiles/root.in,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -w -r1.82 -r1.83
  --- root.in   30 May 2003 01:19:45 -0000      1.82
  +++ root.in   30 May 2003 14:55:16 -0000      1.83
  @@ -99,7 +99,7 @@
   
   ALL_H_FILES = $(GENERAL_H_FILES)
   
  -O_DIRS = classes
  +CLASS_PMC_FILES = ${pmc_classes_pmc}
   
   CLASS_O_FILES = ${pmc_classes_o}
   
  @@ -149,6 +149,9 @@
   CC = ${cc}
   PERL = ${perl}
   
  +# Make directory; do not die if dir exists.
  +MKDIR = $(PERL) -e ${PQ}-d or mkdir $$_ or die foreach @ARGV${PQ}
  +
   
   ###############################################################################
   #
  @@ -160,6 +163,7 @@
   TEST_PROG_SO = ${test_prog}_so${exe}
   LIBPARROT = ${blib_lib_libparrot_a}
   PDUMP = pdump${exe}
  +IMCC_PROG = languages/imcc/imcc${exe}
   
   # lclint has changed name to splint at v3.0
   LINT = splint
  @@ -185,7 +189,6 @@
   # This is set to  MAKE=$make if your $make command doesn't
   # do it for you.
   #
  -
   ${make_set_make}
   
   .c$(O) :
  @@ -193,12 +196,13 @@
   
   all : $(TEST_PROG) docs
   
  +
   mops : examples/assembly/mops${exe} examples/mops/mops${exe}
   
   $(TEST_PROG) : test_main$(O) $(GEN_HEADERS) $(LIBPARROT) lib/Parrot/OpLib/core.pm
        $(LINK) ${ld_out}$(TEST_PROG) $(LINKFLAGS) test_main$(O) $(LIBPARROT) $(C_LIBS)
   
  -lib_deps_object : $(O_DIRS) $(O_FILES)
  +lib_deps_object : $(O_FILES)
        $(PERL) tools/dev/lib_deps.pl object $(O_FILES)
   
   lib_deps_source : $(GENERAL_H_FILES)
  @@ -215,20 +219,16 @@
   #
   ###############################################################################
   
  -blib :
  -     -mkdir blib
  -
  -blib/lib : blib
  -     -mkdir blib${slash}lib
  -
  -shared : $(GEN_HEADERS) blib/lib blib/lib/libparrot$(SO) $(LIBPARROT)
  +shared : $(GEN_HEADERS) blib/lib/libparrot$(SO) $(LIBPARROT)
   static : $(GEN_HEADERS) $(LIBPARROT)
   
  -$(LIBPARROT) : blib/lib $(O_DIRS) $(O_FILES)
  +$(LIBPARROT) : $(O_FILES)
  +     $(MKDIR) blib blib/lib
        $(AR_CR) ${ar_out}$@ $(O_FILES)
        $(RANLIB) $@
   
  -blib/lib/libparrot$(SO) : blib/lib $(O_DIRS) $(O_FILES)
  +blib/lib/libparrot$(SO) : $(O_FILES)
  +     $(MKDIR) blib blib/lib
        $(LD) $(LD_SHARED) $(LD_SHARED_FLAGS) $(LDFLAGS) 
$(LD_OUT)blib/lib/libparrot$(SO) $(O_FILES) $(C_LIBS)
   
   $(TEST_PROG_SO) : test_main$(O) blib/lib/libparrot$(SO) lib/Parrot/OpLib/core.pm
  @@ -238,7 +238,8 @@
   #     because those should be done at "make install" and not "make shared"
   #     It also makes the task of getting this working on win32 much easier. :)
   #
  -#blib/lib/libparrot$(SO).${VERSION} : blib/lib $(O_DIRS) $(O_FILES)
  +#blib/lib/libparrot$(SO).${VERSION} : $(O_FILES)
  +#    $(MKDIR) blib blib/lib
   #    $(LD) $(LD_SHARED) -Wl,-soname,libparrot$(SO).${MAJOR} $(LDFLAGS) 
$(LD_OUT)blib/lib/libparrot$(SO).${VERSION} $(O_FILES)
   #
   #blib/lib/libparrot$(SO).${MAJOR}.${MINOR} : blib/lib/libparrot$(SO).${VERSION}
  @@ -253,7 +254,7 @@
   #    $(RM_F) $@
   #    cd blib/lib; ln -s libparrot$(SO).${MAJOR} libparrot$(SO)
   #
  -#blib/lib/libcore_prederef$(SO).${VERSION} : blib/lib core_ops_prederef$(O)
  +#blib/lib/libcore_prederef$(SO).${VERSION} : core_ops_prederef$(O)
   #    $(LD) $(LD_SHARED) -Wl,-soname,libparrot$(SO).${MAJOR} $(LDFLAGS) 
$(LD_OUT)blib/lib/libcore_prederef$(SO).${VERSION} core_ops_prederef$(O)
   #
   #blib/lib/libcore_prederef$(SO).${MAJOR}.${MINOR} : 
blib/lib/libcore_prederef$(SO).${VERSION}
  @@ -499,15 +500,24 @@
   docs/.dummy :
        cd docs && $(MAKE) && cd ..
   
  -classes : classes/.dummy
  -
  -classes/.dummy :
  -     cd classes && $(MAKE) && cd ..
  -
   languages : languages.dummy
   
   languages.dummy :
        cd languages && $(MAKE) && cd ..
  +
  +# If anything in the classes directory is out of date,
  +# then run `make` in sub-dir to rebuild only the out of date files.
  +$(CLASS_O_FILES) : $(CLASS_PMC_FILES) $(INC)/vtable.h
  +     cd classes && $(MAKE) && cd ..
  +
  +
  +$(IMCC_PROG) : $(LIBPARROT)        \
  +               languages/imcc/*.c \
  +               languages/imcc/*.h \
  +               languages/imcc/*.y \
  +               languages/imcc/*.l \
  +               languages/imcc/*.o
  +     cd languages${slash}imcc && $(MAKE) && cd ..${slash}..
   
   
   ###############################################################################
  
  
  
  1.6       +9 -7      parrot/config/inter/pmc.pl
  
  Index: pmc.pl
  ===================================================================
  RCS file: /cvs/public/parrot/config/inter/pmc.pl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -r1.5 -r1.6
  --- pmc.pl    14 Oct 2002 03:14:18 -0000      1.5
  +++ pmc.pl    30 May 2003 14:55:19 -0000      1.6
  @@ -78,8 +78,9 @@
         $pmc_build .= "$pmc\$(O): \$(H_FILES) $parent_headers $pmc.h\n";
     }
   
  -  # build list of libraries for link line in Makfile
  +  # build list of libraries for link line in Makefile
     (my $pmc_classes_o = $pmc_o) =~ s/^| / classes\//g;
  +  (my $pmc_classes_pmc = $pmc_list) =~ s/^| / classes\//g;
   
     # Gather the actual names (with MixedCase) of all of the
     # non-abstract built-in PMCs.
  @@ -108,7 +109,8 @@
       pmc_names     => join(" ", @names),
       pmc_o         => $pmc_o,
       pmc_build     => $pmc_build,
  -    pmc_classes_o => $pmc_classes_o
  +    pmc_classes_o   => $pmc_classes_o,
  +    pmc_classes_pmc => $pmc_classes_pmc,
     );
   }
   
  
  
  
  1.9       +4 -1      parrot/languages/imcc/TestCompiler.pm
  
  Index: TestCompiler.pm
  ===================================================================
  RCS file: /cvs/public/parrot/languages/imcc/TestCompiler.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- TestCompiler.pm   23 May 2003 12:53:34 -0000      1.8
  +++ TestCompiler.pm   30 May 2003 14:55:21 -0000      1.9
  @@ -87,7 +87,10 @@
        my $out_f = per_test('.out',$count);
   
        my $TEST_PROG_ARGS = $ENV{TEST_PROG_ARGS} || '';
  -     my $IMCC = $ENV{IMCC} || ".$PConfig{slash}imcc";
  +     my $s = $PConfig{slash};
  +     my $IMCC = $ENV{IMCC} || ".${s}imcc";
  +     # If $ENV{IMCC} is set from root Makefile, adjust the path.
  +     $IMCC =~ s/^languages${s}imcc${s}/.${s}/;
   
        if ($gen_pasm) {
            $TEST_PROG_ARGS =~ s/-O.//;
  
  
  

Reply via email to