public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Make generated .h files order-only dependent on generated .java files.
@ 2007-11-14 22:16 cagney
  0 siblings, 0 replies; only message in thread
From: cagney @ 2007-11-14 22:16 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  29571987fd50faeb9acb929da80887508c2b3dd3 (commit)
      from  d3ba8c41604b2cf30372d8bb00758b3d4e4596d0 (commit)

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

- Log -----------------------------------------------------------------
commit 29571987fd50faeb9acb929da80887508c2b3dd3
Author: Andrew Cagney <cagney@redhat.com>
Date:   Wed Nov 14 16:56:02 2007 -0500

    Make generated .h files order-only dependent on generated .java files.
    
    frysk-common/ChangeLog
    2007-11-14  Andrew Cagney  <cagney@redhat.com>
    
    	* Makefile.rules (built-sources): New.
    	($(SCRIPT_BUILT)): New.
    	($(JAVAH_BUILT)): New.
    	($(ANTLR_BUILT)): New.
    	* Makefile.gen.sh (SCRIPT_BUILT): New.
    	(JAVAH_BUILT): New.

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

Summary of changes:
 frysk-common/ChangeLog       |    9 +++++++++
 frysk-common/Makefile.gen.sh |   10 ++++++++--
 frysk-common/Makefile.rules  |   21 +++++++++++++++++++++
 3 files changed, 38 insertions(+), 2 deletions(-)

First 500 lines of diff:
diff --git a/frysk-common/ChangeLog b/frysk-common/ChangeLog
index a9feb80..fe2df45 100644
--- a/frysk-common/ChangeLog
+++ b/frysk-common/ChangeLog
@@ -1,3 +1,12 @@
+2007-11-14  Andrew Cagney  <cagney@redhat.com>
+
+	* Makefile.rules (built-sources): New.
+	($(SCRIPT_BUILT)): New.
+	($(JAVAH_BUILT)): New.
+	($(ANTLR_BUILT)): New.
+	* Makefile.gen.sh (SCRIPT_BUILT): New.
+	(JAVAH_BUILT): New.
+
 2007-11-13  Jose Flavio Aguilar Paulino <jflavio@br.ibm.com>
 
 	* Makefile.rules: Add to CXX includes the directory
diff --git a/frysk-common/Makefile.gen.sh b/frysk-common/Makefile.gen.sh
index e8c0d8a..11f71da 100755
--- a/frysk-common/Makefile.gen.sh
+++ b/frysk-common/Makefile.gen.sh
@@ -440,6 +440,7 @@ TestRunner_SOURCES = TestRunner.java
 CLEANFILES += TestRunner.java
 ${sources} += ${GEN_SOURCENAME}/JUnitTests.java
 BUILT_SOURCES += ${GEN_SOURCENAME}/JUnitTests.java
+SCRIPT_BUILT += ${GEN_SOURCENAME}/JUnitTests.java
 TestRunner_LDADD = \${LIBJUNIT} \${GEN_GCJ_LDADD_LIST}
 TESTS += TestRunner
 noinst_PROGRAMS += TestRunner
@@ -497,6 +498,7 @@ for suffix in .java-in .java-sh .mkenum .shenum ; do
 	name="${d}/${b}${s}"
 	echo "${sources} += ${file}"
 	echo "BUILT_SOURCES += ${name}"
+	echo "SCRIPT_BUILT += ${name}"
         case "${suffix}" in
 	    .mkenum ) echo "${name}: \$(MKENUM)" ;;
 	esac
@@ -529,6 +531,7 @@ for suffix in .cxx .c .hxx .s .S .c-sh .c-in .cxx-sh .cxx-in; do
         case "${suffix}" in
 	    *-in | *-sh)
 		echo "BUILT_SOURCES += ${name}${s}"
+		echo "SCRIPT_BUILT += ${name}${s}"
 		;;
 	esac
 	case "${suffix}" in
@@ -574,7 +577,10 @@ do
       ; then
       case "$c" in
 	  # Do not know what includes the header; just build early
-	  h) echo "BUILT_SOURCES += ${h}.h" ;;
+	  h)
+	      echo "BUILT_SOURCES += ${h}.h"
+	      echo "JAVAH_BUILT += ${h}.h"
+	      ;;
 	  c) echo "${o}.o: ${h}.h" ;;
 	  esac
       echo "CLEANFILES += ${h}.h"
@@ -664,8 +670,8 @@ do
   do
     echo "# Dummy dependency, see implicit .g.antlered for generation"
     echo "$d/$c.java: $d/$b.antlered"
-    echo "ANTLR_BUILT += $d/$c.java"
     echo "BUILT_SOURCES += $d/$c.java"
+    echo "ANTLR_BUILT += $d/$c.java"
     echo "${sources} += $d/$c.java"
   done
 done
diff --git a/frysk-common/Makefile.rules b/frysk-common/Makefile.rules
index bc7a68c..949bd0c 100644
--- a/frysk-common/Makefile.rules
+++ b/frysk-common/Makefile.rules
@@ -80,6 +80,8 @@ noinst_LIBRARIES =
 man_MANS =
 LDADD = 
 ANTLR_BUILT =
+SCRIPT_BUILT =
+JAVAH_BUILT =
 
 check_SCRIPTS =
 check_PROGRAMS =
@@ -195,6 +197,25 @@ AM_CCASFLAGS = \
 	$(ZZZ)
 
 \f
+# Within the BUILT_SOURCES, need to force some dependencies.  For
+# instance: JAVAH isn't run until all script-generated files it may
+# need to import have been generated.
+
+# Use GMAKE's order-only prerequisite feature.
+
+.PHONY: built-sources
+built-sources: $(BUILT_SOURCES)
+$(ANTLR_BUILT): | $(SCRIPT_BUILT)
+$(JAVAH_BUILT): | $(SCRIPT_BUILT) $(ANTLR_BUILT)
+
+# Ensure all imported .java files have been generated before
+# attempting to run JAVAH/GCJH.
+
+.PHONY: javah-built
+BUILT_SOURCES += javah-built
+javah-built: script-built antlr-built $(JAVAH_BUILT)
+
+\f
 # Rules for building a .java file from any of a .mkclass file, a
 # .mkenum file, or a .shenum script.  This lets us specify CLASS.java
 # directly in the BUILT_SOURCES list.


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


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

only message in thread, other threads:[~2007-11-14 22:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-14 22:16 [SCM] master: Make generated .h files order-only dependent on generated .java files 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).