[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 18:42:21 PST 2004


PatchSet 5632 
Date: 2004/12/13 02:20:37
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.3177->1.3178 
	libraries/javalib/Makefile.am.in:1.25->1.26 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3177 kaffe/ChangeLog:1.3178
--- kaffe/ChangeLog:1.3177	Mon Dec 13 00:38:46 2004
+++ kaffe/ChangeLog	Mon Dec 13 02:20:37 2004
@@ -1,7 +1,8 @@
 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:
+	* libraries/javalib/Makefile.am, libraries/javalib/Makefile.am.in,
+	  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.
 
Index: kaffe/libraries/javalib/Makefile.am.in
diff -u kaffe/libraries/javalib/Makefile.am.in:1.25 kaffe/libraries/javalib/Makefile.am.in:1.26
--- kaffe/libraries/javalib/Makefile.am.in:1.25	Fri Dec 10 22:46:37 2004
+++ kaffe/libraries/javalib/Makefile.am.in	Mon Dec 13 02:20:36 2004
@@ -215,38 +215,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)
@@ -254,10 +259,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




More information about the kaffe mailing list