public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: cagney@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: Make jni-header generation more robust.
Date: Wed, 16 Apr 2008 20:01:00 -0000	[thread overview]
Message-ID: <20080416200158.22867.qmail@sourceware.org> (raw)

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


                 reply	other threads:[~2008-04-16 20:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080416200158.22867.qmail@sourceware.org \
    --to=cagney@sourceware.org \
    --cc=frysk-cvs@sourceware.org \
    --cc=frysk@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).