I'm checking this in.

Not only did my previous dependency tracking fix break distcheck, it
also didn't work.  Touching some central file, like Throwable, caused
too few recompilations.  This patch fixes the problem.

I ran this through 'make distcheck' as well.

Tom

Index: ChangeLog
from  Tom Tromey  <[EMAIL PROTECTED]>

        * lib/split-for-gcj.sh: Make list file depend on source file.
        * lib/Makefile.gcj (%.stamp): Set target name to stamp file.

Index: lib/Makefile.gcj
===================================================================
RCS file: /cvsroot/classpath/classpath/lib/Makefile.gcj,v
retrieving revision 1.1
diff -u -r1.1 Makefile.gcj
--- lib/Makefile.gcj 6 Jul 2005 22:12:18 -0000 1.1
+++ lib/Makefile.gcj 8 Jul 2005 16:10:11 -0000
@@ -7,8 +7,8 @@
 all_list_files := $(shell echo lists/*.list)
 # The corresponding stamp files.
 # Each .class file depends on its package's stamp file.
-# Each list file depends on the java files in its package.
 # Each stamp file depends on the corresponding list file.
+# Each list file depends on the java files in its package.
 # This way touching a single java source will cause the minimum
 # number of rebuilds.
 all_stamp_files := $(all_list_files:.list=.stamp)
@@ -24,7 +24,9 @@
     --bootclasspath '' --classpath $(compile_classpath) \
     -C -d .
 
-# Rule to rebuild a stamp file and update the deps file.
+# Rule to rebuild a stamp file and update the deps file.  Note that we
+# make the target be the stamp file.  This ensures that if a needed
+# source is changed, this rule is re-run for the appropriate package.
 %.stamp: %.list
-       $(GCJF) -MD -MF ${@:.stamp=.deps} @$<
+       $(GCJF) -MD -MF ${@:.stamp=.deps} -MT $@ @$<
        echo timestamp > $@
Index: lib/split-for-gcj.sh
===================================================================
RCS file: /cvsroot/classpath/classpath/lib/split-for-gcj.sh,v
retrieving revision 1.1
diff -u -r1.1 split-for-gcj.sh
--- lib/split-for-gcj.sh 6 Jul 2005 22:12:18 -0000 1.1
+++ lib/split-for-gcj.sh 8 Jul 2005 16:10:11 -0000
@@ -13,7 +13,7 @@
       f2=`echo "$file" | sed -n -e "s,^.*/\($dir/.*\)$,\1,p"`
       f2=${f2%.java}.class
       echo "$f2: ${list}.stamp" >> Makefile.deps
-      echo "${list}.stamp: $file" >> Makefile.deps
+      echo "${list}.list: $file" >> Makefile.deps
    done
 done
 


_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to