public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Make jni-header generation more robust.
@ 2008-04-16 20:01 cagney
  0 siblings, 0 replies; only message in thread
From: cagney @ 2008-04-16 20:01 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  9a8618e3357adf851b5e4d3b1042723c6c932235 (commit)
      from  8bd2c7f9c6c25521b2847522690a7a705b72741b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 9a8618e3357adf851b5e4d3b1042723c6c932235
Author: Andrew Cagney <cagney@redhat.com>
Date:   Wed Apr 16 16:00:22 2008 -0400

    Make jni-header generation more robust.
    
    frysk-common/ChangeLog
    2008-04-16  Andrew Cagney  <cagney@redhat.com>
    
    	* Makefile.gen.sh (generate_jni_header): Write output to a tmp
    	file first.

-----------------------------------------------------------------------

Summary of changes:
 frysk-common/ChangeLog       |    3 +++
 frysk-common/Makefile.gen.sh |   16 ++++++++++++----
 2 files changed, 15 insertions(+), 4 deletions(-)

First 500 lines of diff:
diff --git a/frysk-common/ChangeLog b/frysk-common/ChangeLog
index 09e6375..e55a11c 100644
--- a/frysk-common/ChangeLog
+++ b/frysk-common/ChangeLog
@@ -1,5 +1,8 @@
 2008-04-16  Andrew Cagney  <cagney@redhat.com>
 
+	* Makefile.gen.sh (generate_jni_header): Write output to a tmp
+	file first.
+
 	* Makefile.rules (SUBST): Match -in input file name, not output
 	file name when selecting action.
 
diff --git a/frysk-common/Makefile.gen.sh b/frysk-common/Makefile.gen.sh
index a9114a7..2a21b02 100755
--- a/frysk-common/Makefile.gen.sh
+++ b/frysk-common/Makefile.gen.sh
@@ -667,10 +667,18 @@ generate_jni_header ()
 	local h=`echo $d/$b | tr '[/]' '[_]'`
 	local c=`echo $d/$b | tr '[/]' '[.]'`
 	automake_variable JAVAH_JNI_BUILT += ${h}.h
-	echo "CLEANFILES += ${h}.h"
-	echo "${h}.h: $file | ${GEN_DIRNAME}.jar"
-	echo "	@echo \"$c => ${h}.h\""
-	echo '	$(GCJH) $(GCJHFLAGS) -jni -classpath=$(CLASSPATH):'${GEN_DIRNAME}.jar $c
+	cat <<EOF
+CLEANFILES += ${h}.h
+${h}.h: $file | ${GEN_DIRNAME}.jar
+	@echo \"$c => ${h}.h\"
+	rm -f \$@.tmp
+	\$(GCJH) \$(GCJHFLAGS) \\
+		-jni \\
+		-classpath=\$(CLASSPATH):${GEN_DIRNAME}.jar \\
+		-o \$@.tmp \\
+		$c
+	mv \$@.tmp \$@
+EOF
     fi
 }
 


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-16 20:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-16 20:01 [SCM] master: Make jni-header generation more robust cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).