From 954cba2d6b5cf30c8f5311369a44a67db53b81bb Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 17 May 2005 10:26:27 +0000 Subject: [PATCH] Makefile.am (Makefile.deps): Do not create native.list and bytecodes.list. 2005-05-17 Paolo Bonzini * 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 | 7 +++++++ libjava/Makefile.am | 39 ++++++++++++++++++++++++--------------- libjava/Makefile.in | 39 ++++++++++++++++++++++++--------------- 3 files changed, 55 insertions(+), 30 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index ffbf8ce8c099..21c35ad0cfc7 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2005-05-17 Paolo Bonzini + + * 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 * configure.ac (--enable-libgcj-multifile): Remove. diff --git a/libjava/Makefile.am b/libjava/Makefile.am index c0aa90926d82..91ac1c9c56ff 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -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) diff --git a/libjava/Makefile.in b/libjava/Makefile.in index 352bbfc8206c..7e692a76e849 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -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.