[kaffe] CVS kaffe (doogie): Reworked jar creation stuff, to not be verbose, and handle the case if
Kaffe CVS
cvs-commits at kaffe.org
Sun Dec 12 17:40:54 PST 2004
PatchSet 5631
Date: 2004/12/13 00:38:46
Author: doogie
Branch: HEAD
Tag: (none)
Log:
Reworked jar creation stuff, to not be verbose, and handle the case if
ctrl-c is hit before all the jar cmds from completing.
Members:
ChangeLog:1.3176->1.3177
libraries/javalib/Makefile.am:1.274->1.275
libraries/javalib/Makefile.in:1.355->1.356
tools/gjdoc/javalib/Makefile.am:1.8->1.9
tools/gjdoc/javalib/Makefile.in:1.35->1.36
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3176 kaffe/ChangeLog:1.3177
--- kaffe/ChangeLog:1.3176 Sun Dec 12 21:16:00 2004
+++ kaffe/ChangeLog Mon Dec 13 00:38:46 2004
@@ -1,3 +1,10 @@
+2004-12-12 Adam Heath <doogie at brainfood.com>
+
+ * libraries/javalib/Makefile.am, libraries/javalib/Makefile.in,
+ tools/gjdoc/javalib/Makefile.am, tools/gjdoc/javalib/Makefile.in:
+ Reworked jar creation stuff, to not be verbose, and handle the
+ case if ctrl-c is hit before all the jar cmds from completing.
+
2004-12-12 Guilhem Lavaux <guilhem at kaffe.org>
* kaffe/kaffevm/jni/jni-base.c
Index: kaffe/libraries/javalib/Makefile.am
diff -u kaffe/libraries/javalib/Makefile.am:1.274 kaffe/libraries/javalib/Makefile.am:1.275
--- kaffe/libraries/javalib/Makefile.am:1.274 Sat Dec 11 03:21:41 2004
+++ kaffe/libraries/javalib/Makefile.am Mon Dec 13 00:38:43 2004
@@ -4633,38 +4633,43 @@
fi
echo timestamp > $(LIBDIR)/stamp
-bootstrap: $(srcdir)/Klasses.jar.bootstrap rt.jar
- if [ -f $(srcdir)/Klasses.jar.bootstrap ]; then \
- mv -f $(srcdir)/Klasses.jar.bootstrap $(srcdir)/Klasses.jar.bootstrap.save; \
- fi
- (cd $(LIBDIR) && $(ZIP) -DX -r - `grep '\.class$$' $(abssrcdir)/libraries/javalib/bootstrap.classlist` \
- ) > $(srcdir)/Klasses.jar.bootstrap
+bootstrap: $(srcdir)/Klasses.jar.bootstrap
+$(srcdir)/Klasses.jar.bootstrap: rt.jar
+ rm -f $@.new
+if HAVE_ZIP
+ (cd $(LIBDIR) && $(ZIP) -DX -r $(CURDIR)/$@.new `grep '\.class$$' $(abssrcdir)/libraries/javalib/bootstrap.classlist`)\
+else
+ $(JAR) -cf $@.new -C $(LIBDIR) `grep '\.class$$' $(abssrcdir)/libraries/javalib/bootstrap.classlist`
+endif
+ mv $@.new $@
.PHONY: bootstrap
$(srcdir)/Klasses.jar.bootstrap: bootstrap.classlist
if HAVE_ZIP
-JAR_CMD1 = (dstdir=`pwd`; cd $(srcdir) && $(ZIP) -r $$dstdir/rt.jar META-INF)
-JAR_CMD2 = (cd $(LIBDIR) && $(ZIP) -DX -r ../rt.jar $(SRCDIRS))
-JAR_CMD3 = (dstdir=`pwd`; cd $(srcdir) && $(ZIP) -DX -r $$dstdir/rt.jar $(gnu_regexp_message_bundles))
-JAR_CMD4 = (dstdir=`pwd`; cd $(srcdir) && $(ZIP) -DX -r $$dstdir/rt.jar $(gnu_java_locale_bundles))
-JAR_CMD5 = (dstdir=`pwd`; cd $(srcdir) && $(ZIP) -DX -r $$dstdir/rt.jar $(serialized_converters))
-JAR_CMD6 = (dstdir=`pwd`; cd $(srcdir) && $(ZIP) -DX -r $$dstdir/rt.jar $(gnu_getopt_message_bundles))
+JAR_CMD1 = (cd $(srcdir) && $(ZIP) -q -r $(CURDIR)/$@.new META-INF)
+JAR_CMD2 = (cd $(LIBDIR) && $(ZIP) -q -DX -r $(CURDIR)/$@.new $(SRCDIRS))
+JAR_CMD3 = (cd $(srcdir) && $(ZIP) -q -DX -r $(CURDIR)/$@.new $(gnu_regexp_message_bundles))
+JAR_CMD4 = (cd $(srcdir) && $(ZIP) -q -DX -r $(CURDIR)/$@.new $(gnu_java_locale_bundles))
+JAR_CMD5 = (cd $(srcdir) && $(ZIP) -q -DX -r $(CURDIR)/$@.new $(serialized_converters))
+JAR_CMD6 = (cd $(srcdir) && $(ZIP) -q -DX -r $(CURDIR)/$@.new $(gnu_getopt_message_bundles))
else
-JAR_CMD1 = $(JAR) -cvf rt.jar -C $(LIBDIR) $(SRCDIRS)
-JAR_CMD2 = $(JAR) -uvf rt.jar -C $(srcdir) META-INF/
-JAR_CMD3 = $(JAR) -uvf rt.jar -C $(srcdir) $(gnu_regexp_message_bundles)
-JAR_CMD4 = $(JAR) -uvf rt.jar -C $(srcdir) $(gnu_java_locale_bundles)
-JAR_CMD5 = $(JAR) -uvf rt.jar -C $(srcdir) $(serialized_converters)
-JAR_CMD6 = $(JAR) -uvf rt.jar -C $(srcdir) $(gnu_getopt_message_bundles)
+JAR_CMD1 = $(JAR) -cf $@.new -C $(LIBDIR) $(SRCDIRS)
+JAR_CMD2 = $(JAR) -uf $@.new -C $(srcdir) META-INF/
+JAR_CMD3 = $(JAR) -uf $@.new -C $(srcdir) $(gnu_regexp_message_bundles)
+JAR_CMD4 = $(JAR) -uf $@.new -C $(srcdir) $(gnu_java_locale_bundles)
+JAR_CMD5 = $(JAR) -uf $@.new -C $(srcdir) $(serialized_converters)
+JAR_CMD6 = $(JAR) -uf $@.new -C $(srcdir) $(gnu_getopt_message_bundles)
endif
.PHONY: jar-classes
if USE_PRECOMPILED_RT_JAR
-jar-classes rt.jar:
- cp $(PATH_TO_RT_JAR) rt.jar
+jar-classes: rt.jar
+rt.jar: $(PATH_TO_RT_JAR)
+ cp $< $@
else
-jar-classes rt.jar: $(LIBDIR)/stamp $(Klasses_jar_SRCS)
+jar-classes: rt.jar
+rt.jar: $(LIBDIR)/stamp $(Klasses_jar_SRCS)
rm -f rt.jar
$(JAR_CMD1)
$(JAR_CMD2)
@@ -4672,10 +4677,11 @@
$(JAR_CMD4)
$(JAR_CMD5)
$(JAR_CMD6)
+ mv $@.new $@
endif
.PHONY: build-classes Klasses
build-classes Klasses: rt.jar
all-am: rebuildLib
-export JIKES top_builddir LIBDIR srcdir
\ No newline at end of file
+export JIKES top_builddir LIBDIR srcdir
Index: kaffe/libraries/javalib/Makefile.in
diff -u kaffe/libraries/javalib/Makefile.in:1.355 kaffe/libraries/javalib/Makefile.in:1.356
--- kaffe/libraries/javalib/Makefile.in:1.355 Sat Dec 11 03:21:42 2004
+++ kaffe/libraries/javalib/Makefile.in Mon Dec 13 00:38:43 2004
@@ -5222,18 +5222,18 @@
LIBDIR = lib
rebuildLib = ./rebuildLib
- at HAVE_ZIP_FALSE@JAR_CMD1 = $(JAR) -cvf rt.jar -C $(LIBDIR) $(SRCDIRS)
- at HAVE_ZIP_TRUE@JAR_CMD1 = (dstdir=`pwd`; cd $(srcdir) && $(ZIP) -r $$dstdir/rt.jar META-INF)
- at HAVE_ZIP_FALSE@JAR_CMD2 = $(JAR) -uvf rt.jar -C $(srcdir) META-INF/
- at HAVE_ZIP_TRUE@JAR_CMD2 = (cd $(LIBDIR) && $(ZIP) -DX -r ../rt.jar $(SRCDIRS))
- at HAVE_ZIP_FALSE@JAR_CMD3 = $(JAR) -uvf rt.jar -C $(srcdir) $(gnu_regexp_message_bundles)
- at HAVE_ZIP_TRUE@JAR_CMD3 = (dstdir=`pwd`; cd $(srcdir) && $(ZIP) -DX -r $$dstdir/rt.jar $(gnu_regexp_message_bundles))
- at HAVE_ZIP_FALSE@JAR_CMD4 = $(JAR) -uvf rt.jar -C $(srcdir) $(gnu_java_locale_bundles)
- at HAVE_ZIP_TRUE@JAR_CMD4 = (dstdir=`pwd`; cd $(srcdir) && $(ZIP) -DX -r $$dstdir/rt.jar $(gnu_java_locale_bundles))
- at HAVE_ZIP_FALSE@JAR_CMD5 = $(JAR) -uvf rt.jar -C $(srcdir) $(serialized_converters)
- at HAVE_ZIP_TRUE@JAR_CMD5 = (dstdir=`pwd`; cd $(srcdir) && $(ZIP) -DX -r $$dstdir/rt.jar $(serialized_converters))
- at HAVE_ZIP_FALSE@JAR_CMD6 = $(JAR) -uvf rt.jar -C $(srcdir) $(gnu_getopt_message_bundles)
- at HAVE_ZIP_TRUE@JAR_CMD6 = (dstdir=`pwd`; cd $(srcdir) && $(ZIP) -DX -r $$dstdir/rt.jar $(gnu_getopt_message_bundles))
+ at HAVE_ZIP_FALSE@JAR_CMD1 = $(JAR) -cf $@.new -C $(LIBDIR) $(SRCDIRS)
+ at HAVE_ZIP_TRUE@JAR_CMD1 = (cd $(srcdir) && $(ZIP) -q -r $(CURDIR)/$@.new META-INF)
+ at HAVE_ZIP_FALSE@JAR_CMD2 = $(JAR) -uf $@.new -C $(srcdir) META-INF/
+ at HAVE_ZIP_TRUE@JAR_CMD2 = (cd $(LIBDIR) && $(ZIP) -q -DX -r $(CURDIR)/$@.new $(SRCDIRS))
+ at HAVE_ZIP_FALSE@JAR_CMD3 = $(JAR) -uf $@.new -C $(srcdir) $(gnu_regexp_message_bundles)
+ at HAVE_ZIP_TRUE@JAR_CMD3 = (cd $(srcdir) && $(ZIP) -q -DX -r $(CURDIR)/$@.new $(gnu_regexp_message_bundles))
+ at HAVE_ZIP_FALSE@JAR_CMD4 = $(JAR) -uf $@.new -C $(srcdir) $(gnu_java_locale_bundles)
+ at HAVE_ZIP_TRUE@JAR_CMD4 = (cd $(srcdir) && $(ZIP) -q -DX -r $(CURDIR)/$@.new $(gnu_java_locale_bundles))
+ at HAVE_ZIP_FALSE@JAR_CMD5 = $(JAR) -uf $@.new -C $(srcdir) $(serialized_converters)
+ at HAVE_ZIP_TRUE@JAR_CMD5 = (cd $(srcdir) && $(ZIP) -q -DX -r $(CURDIR)/$@.new $(serialized_converters))
+ at HAVE_ZIP_FALSE@JAR_CMD6 = $(JAR) -uf $@.new -C $(srcdir) $(gnu_getopt_message_bundles)
+ at HAVE_ZIP_TRUE@JAR_CMD6 = (cd $(srcdir) && $(ZIP) -q -DX -r $(CURDIR)/$@.new $(gnu_getopt_message_bundles))
all: all-recursive
.SUFFIXES:
@@ -5599,20 +5599,23 @@
fi
echo timestamp > $(LIBDIR)/stamp
-bootstrap: $(srcdir)/Klasses.jar.bootstrap rt.jar
- if [ -f $(srcdir)/Klasses.jar.bootstrap ]; then \
- mv -f $(srcdir)/Klasses.jar.bootstrap $(srcdir)/Klasses.jar.bootstrap.save; \
- fi
- (cd $(LIBDIR) && $(ZIP) -DX -r - `grep '\.class$$' $(abssrcdir)/libraries/javalib/bootstrap.classlist` \
- ) > $(srcdir)/Klasses.jar.bootstrap
+bootstrap: $(srcdir)/Klasses.jar.bootstrap
+$(srcdir)/Klasses.jar.bootstrap: rt.jar
+ rm -f $@.new
+ at HAVE_ZIP_TRUE@ (cd $(LIBDIR) && $(ZIP) -DX -r $(CURDIR)/$@.new `grep '\.class$$' $(abssrcdir)/libraries/javalib/bootstrap.classlist`)\
+ at HAVE_ZIP_TRUE@else
+ at HAVE_ZIP_TRUE@ $(JAR) -cf $@.new -C $(LIBDIR) `grep '\.class$$' $(abssrcdir)/libraries/javalib/bootstrap.classlist`
+ mv $@.new $@
.PHONY: bootstrap
$(srcdir)/Klasses.jar.bootstrap: bootstrap.classlist
.PHONY: jar-classes
- at USE_PRECOMPILED_RT_JAR_TRUE@jar-classes rt.jar:
- at USE_PRECOMPILED_RT_JAR_TRUE@ cp $(PATH_TO_RT_JAR) rt.jar
- at USE_PRECOMPILED_RT_JAR_FALSE@jar-classes rt.jar: $(LIBDIR)/stamp $(Klasses_jar_SRCS)
+ at USE_PRECOMPILED_RT_JAR_TRUE@jar-classes: rt.jar
+ at USE_PRECOMPILED_RT_JAR_TRUE@rt.jar: $(PATH_TO_RT_JAR)
+ at USE_PRECOMPILED_RT_JAR_TRUE@ cp $< $@
+ at USE_PRECOMPILED_RT_JAR_FALSE@jar-classes: rt.jar
+ at USE_PRECOMPILED_RT_JAR_FALSE@rt.jar: $(LIBDIR)/stamp $(Klasses_jar_SRCS)
@USE_PRECOMPILED_RT_JAR_FALSE@ rm -f rt.jar
@USE_PRECOMPILED_RT_JAR_FALSE@ $(JAR_CMD1)
@USE_PRECOMPILED_RT_JAR_FALSE@ $(JAR_CMD2)
@@ -5620,6 +5623,7 @@
@USE_PRECOMPILED_RT_JAR_FALSE@ $(JAR_CMD4)
@USE_PRECOMPILED_RT_JAR_FALSE@ $(JAR_CMD5)
@USE_PRECOMPILED_RT_JAR_FALSE@ $(JAR_CMD6)
+ at USE_PRECOMPILED_RT_JAR_FALSE@ mv $@.new $@
.PHONY: build-classes Klasses
build-classes Klasses: rt.jar
Index: kaffe/tools/gjdoc/javalib/Makefile.am
diff -u kaffe/tools/gjdoc/javalib/Makefile.am:1.8 kaffe/tools/gjdoc/javalib/Makefile.am:1.9
--- kaffe/tools/gjdoc/javalib/Makefile.am:1.8 Sat Dec 11 03:21:43 2004
+++ kaffe/tools/gjdoc/javalib/Makefile.am Mon Dec 13 00:38:45 2004
@@ -184,11 +184,11 @@
$(gjdoc_ressources)
if HAVE_ZIP
-JAR_CMD1 = (dstdir=`pwd`; cd $(LIBDIR) && $(ZIP) -r $$dstdir/$(CLASSFILE) $(SRCDIRS))
-JAR_CMD2 = (dstdir=`pwd`; cd $(srcdir) && $(ZIP) -DX -r $$dstdir/$(CLASSFILE) $(gjdoc_ressources))
+JAR_CMD1 = (cd $(LIBDIR) && $(ZIP) -q -r $(CURDIR)/$@.new $(SRCDIRS))
+JAR_CMD2 = (cd $(srcdir) && $(ZIP) -q -DX -r $(CURDIR)/$@.new $(gjdoc_ressources))
else
-JAR_CMD1 = $(JAR) -cvf $(CLASSFILE) -C $(LIBDIR) $(SRCDIRS)
-JAR_CMD2 = $(JAR) -uvf $(CLASSFILE) -C $(srcdir) $(gjdoc_ressources)
+JAR_CMD1 = $(JAR) -cf $@.new -C $(LIBDIR) $(SRCDIRS)
+JAR_CMD2 = $(JAR) -uf $@.new -C $(srcdir) $(gjdoc_ressources)
endif
LIBDIR = lib
@@ -213,9 +213,11 @@
echo timestamp > $(LIBDIR)/stamp
.PHONY: jar-classes
-jar-classes $(CLASSFILE): $(LIBDIR)/stamp
- rm -f $(CLASSFILE)
+jar-classes: $(CLASSFILE)
+$(CLASSFILE): $(LIBDIR)/stamp
+ rm -f $@ $@.new
$(JAR_CMD1)
$(JAR_CMD2)
+ mv $@.new $@
export JIKES top_builddir LIBDIR srcdir
Index: kaffe/tools/gjdoc/javalib/Makefile.in
diff -u kaffe/tools/gjdoc/javalib/Makefile.in:1.35 kaffe/tools/gjdoc/javalib/Makefile.in:1.36
--- kaffe/tools/gjdoc/javalib/Makefile.in:1.35 Sat Dec 11 03:21:43 2004
+++ kaffe/tools/gjdoc/javalib/Makefile.in Mon Dec 13 00:38:45 2004
@@ -519,10 +519,10 @@
$(gjdoc_jar_SRCS) \
$(gjdoc_ressources)
- at HAVE_ZIP_FALSE@JAR_CMD1 = $(JAR) -cvf $(CLASSFILE) -C $(LIBDIR) $(SRCDIRS)
- at HAVE_ZIP_TRUE@JAR_CMD1 = (dstdir=`pwd`; cd $(LIBDIR) && $(ZIP) -r $$dstdir/$(CLASSFILE) $(SRCDIRS))
- at HAVE_ZIP_FALSE@JAR_CMD2 = $(JAR) -uvf $(CLASSFILE) -C $(srcdir) $(gjdoc_ressources)
- at HAVE_ZIP_TRUE@JAR_CMD2 = (dstdir=`pwd`; cd $(srcdir) && $(ZIP) -DX -r $$dstdir/$(CLASSFILE) $(gjdoc_ressources))
+ at HAVE_ZIP_FALSE@JAR_CMD1 = $(JAR) -cf $@.new -C $(LIBDIR) $(SRCDIRS)
+ at HAVE_ZIP_TRUE@JAR_CMD1 = (cd $(LIBDIR) && $(ZIP) -q -r $(CURDIR)/$@.new $(SRCDIRS))
+ at HAVE_ZIP_FALSE@JAR_CMD2 = $(JAR) -uf $@.new -C $(srcdir) $(gjdoc_ressources)
+ at HAVE_ZIP_TRUE@JAR_CMD2 = (cd $(srcdir) && $(ZIP) -q -DX -r $(CURDIR)/$@.new $(gjdoc_ressources))
LIBDIR = lib
rebuildLib = $(top_builddir)/libraries/javalib/rebuildLib
Klasses_jar = $(top_srcdir)/libraries/javalib/rt.jar
@@ -725,10 +725,12 @@
echo timestamp > $(LIBDIR)/stamp
.PHONY: jar-classes
-jar-classes $(CLASSFILE): $(LIBDIR)/stamp
- rm -f $(CLASSFILE)
+jar-classes: $(CLASSFILE)
+$(CLASSFILE): $(LIBDIR)/stamp
+ rm -f $@ $@.new
$(JAR_CMD1)
$(JAR_CMD2)
+ mv $@.new $@
export JIKES top_builddir LIBDIR srcdir
# Tell versions [3.59,3.63) of GNU make to not export all variables.
More information about the kaffe
mailing list