Makefile.am (Makefile.deps): Do not create native.list and bytecodes.list.
authorPaolo Bonzini <bonzini@gnu.org>
Tue, 17 May 2005 10:26:27 +0000 (10:26 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Tue, 17 May 2005 10:26:27 +0000 (10:26 +0000)
2005-05-17  Paolo Bonzini  <bonzini@gnu.org>

* Makefile.am (Makefile.deps): Do not create native.list and
bytecodes.list.
(all_native_compiled_dirs, all_java_dirs): Compute dir list here.

From-SVN: r99827

libjava/ChangeLog
libjava/Makefile.am
libjava/Makefile.in

index ffbf8ce..21c35ad 100644 (file)
@@ -1,5 +1,12 @@
 2005-05-17  Paolo Bonzini  <bonzini@gnu.org>
 
+       * Makefile.am (Makefile.deps): Do not create native.list and
+       bytecodes.list.
+       (all_native_compiled_dirs, all_java_dirs): Compute dir list here.
+       * Makefile.in: Regenerate.
+
+2005-05-17  Paolo Bonzini  <bonzini@gnu.org>
+
        * configure.ac (--enable-libgcj-multifile): Remove.
 
        * Makefile.am (all_native_compiled_source_files,
index c0aa909..91ac1c9 100644 (file)
@@ -247,27 +247,36 @@ all_java_source_files = \
 
 EXTRA_DIST = $(all_java_source_files)
 
-# Build a list of native and bytecode-compiled directories.  The Makefile
-# depends on them, because they affect the definition of two variables
-# below.
-# Each directory's filelist file depends on the corresponding Java source files
-# Each class file depends on the its directory's .stamp file
-# Below, one .lo file is built per directory when the stamp file changes
-
+# Build dependencies between java, class and lo files.  They are included
+# below, together with automatically-generated dependencies between Java
+# files.
+#
+# Dependencies from Java to .class files
+# --------------------------------------
+# Each directory's filelist file depends on the corresponding Java source files.
+# The stamp file depends on the filelist (using a `Static Pattern Rule').
+# Each class file depends on the its directory's .stamp file.  This reflects
+# the fact that 1) all classfiles are compiled in one go when the .stamp file
+# is built and 2) anything which depends on a particular .class file must wait
+# until its directory is processed and the .stamp file is created.
+#
+# Dependencies from Java to .lo files
+# -----------------------------------
+# As above, each directory's filelist file depends on the corresponding Java
+# source files, and the stamp file depends on the filelist.  For native
+# compilation, the lo file depends on the stamp file (also using a `Static
+# Pattern Rule').  So, when one Java file changes, the filelist file is
+# updated, the stamp file rule builds the .class files, and the .lo file rule
+# recompiles to native code.
 Makefile.deps: $(srcdir)/Makefile.in
        @: $(call write_entries_to_file,$(all_java_source_files),files.tmplist)
-       sed 's,/[^/]*$$,,' \
-         files.tmplist | sort | uniq > bytecodes.list
-       sed -n '1,$(words $(all_native_compiled_source_files))s,/[^/]*$$,,p' \
-         files.tmplist | sort | uniq > native.list
        echo 's,^\(.*\)/\([^/]*\)\.java$$,\1.list: \0\' > tmpsed
        echo '\1/\2.class: \1.stamp,' >> tmpsed
-       sed -ftmpsed files.tmplist \
-         > Makefile.deps
+       sed -ftmpsed files.tmplist > Makefile.deps
        rm files.tmplist tmpsed
 
-all_native_compiled_dirs := $(shell test -f native.list && cat native.list)
-all_java_dirs := $(shell test -f bytecodes.list && cat bytecodes.list)
+all_native_compiled_dirs = $(sort $(patsubst %/, %, $(dir $(all_native_compiled_source_files))))
+all_java_dirs = $(sort $(patsubst %/, %, $(dir $(all_java_source_files))))
 all_java_lo_files = $(all_native_compiled_dirs:=.lo)
 all_java_deps_files = $(all_java_dirs:=.deps)
 all_java_stamp_files = $(all_java_dirs:=.stamp)
index 352bbfc..7e692a7 100644 (file)
@@ -778,8 +778,8 @@ all_java_source_files = \
     gnu/gcj/tools/gcj_dbtool/Main.java
 
 EXTRA_DIST = $(all_java_source_files)
-all_native_compiled_dirs := $(shell test -f native.list && cat native.list)
-all_java_dirs := $(shell test -f bytecodes.list && cat bytecodes.list)
+all_native_compiled_dirs = $(sort $(patsubst %/, %, $(dir $(all_native_compiled_source_files))))
+all_java_dirs = $(sort $(patsubst %/, %, $(dir $(all_java_source_files))))
 all_java_lo_files = $(all_native_compiled_dirs:=.lo)
 all_java_deps_files = $(all_java_dirs:=.deps)
 all_java_stamp_files = $(all_java_dirs:=.stamp)
@@ -6270,23 +6270,32 @@ uninstall-info: uninstall-info-recursive
        uninstall-toolexeclibLTLIBRARIES uninstall-toolexecmainlibDATA
 
 
-# Build a list of native and bytecode-compiled directories.  The Makefile
-# depends on them, because they affect the definition of two variables
-# below.
-# Each directory's filelist file depends on the corresponding Java source files
-# Each class file depends on the its directory's .stamp file
-# Below, one .lo file is built per directory when the stamp file changes
-
+# Build dependencies between java, class and lo files.  They are included
+# below, together with automatically-generated dependencies between Java
+# files.
+#
+# Dependencies from Java to .class files
+# --------------------------------------
+# Each directory's filelist file depends on the corresponding Java source files.
+# The stamp file depends on the filelist (using a `Static Pattern Rule').
+# Each class file depends on the its directory's .stamp file.  This reflects
+# the fact that 1) all classfiles are compiled in one go when the .stamp file
+# is built and 2) anything which depends on a particular .class file must wait
+# until its directory is processed and the .stamp file is created.
+#
+# Dependencies from Java to .lo files
+# -----------------------------------
+# As above, each directory's filelist file depends on the corresponding Java
+# source files, and the stamp file depends on the filelist.  For native
+# compilation, the lo file depends on the stamp file (also using a `Static
+# Pattern Rule').  So, when one Java file changes, the filelist file is
+# updated, the stamp file rule builds the .class files, and the .lo file rule
+# recompiles to native code.
 Makefile.deps: $(srcdir)/Makefile.in
        @: $(call write_entries_to_file,$(all_java_source_files),files.tmplist)
-       sed 's,/[^/]*$$,,' \
-         files.tmplist | sort | uniq > bytecodes.list
-       sed -n '1,$(words $(all_native_compiled_source_files))s,/[^/]*$$,,p' \
-         files.tmplist | sort | uniq > native.list
        echo 's,^\(.*\)/\([^/]*\)\.java$$,\1.list: \0\' > tmpsed
        echo '\1/\2.class: \1.stamp,' >> tmpsed
-       sed -ftmpsed files.tmplist \
-         > Makefile.deps
+       sed -ftmpsed files.tmplist > Makefile.deps
        rm files.tmplist tmpsed
 
 # Include automatically generated dependencies between Java source files.