This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch request] don't run ecj on auto generated files


antlr generates files which generate warnings from ecj, for example unreferenced variables. The current strategy is to use sed scripts to postprocess the sources. However, this is error prone and requires constant tweaking. Are there any objections to only running ecj on top_srcdir *.java files and not running ecj on top_builddir *.java files? I think this change would mostly effect antlr (Cpp*), but here is the entire list of autogenerated files:
AT.java ELF.java SHF.java
Build.java EM.java SHN.java
Config.java ET.java SHT.java
CppLexer.java EV.java Sig.java
CppParser.java JUnitTests.java STB.java
CppParserTokenTypes.jav NT.java STT.java
CppTreeParser.java PF.java STV.java
CppTreeParserTokenTypes PowerPC.java SyscallNum.java
DW.java PT.java TestRunner.java
EI.java


Here is a patch that will only run ecj on top_srcdir.

/NotBackedUp/scox/src/common /NotBackedUp/scox/bld/i386-redhat-linux/frysk-core /NotBackedUp/scox/bld/i386-redhat-linux /NotBackedUp/scox/bld /NotBackedUp ~
Index: Makefile.rules
===================================================================
RCS file: /cvs/frysk/frysk-common/Makefile.rules,v
retrieving revision 1.126
diff -u -p -r1.126 Makefile.rules
--- Makefile.rules	11 Jul 2006 20:53:29 -0000	1.126
+++ Makefile.rules	27 Jul 2006 23:26:02 -0000
@@ -497,10 +497,10 @@ distclean-cvsignored:
 # directories (as occurs when building in the source tree).  An
 # explicit clean rule is needed as CLEANFILES can't handle directories.
 
-CLEANFILES += files.list
+CLEANFILES += files.list genfiles.list
 files.list:
 	topdirs= ; \
-	for d in $(top_builddir) $(top_srcdir) ; do \
+	for d in $(top_srcdir) ; do \
 	    p=`cd $$d && pwd` ; \
 	    case " $$topdirs " in \
 	        *$$p* ) continue ;; \
@@ -513,12 +513,30 @@ files.list:
 	    done \
 	done | sort > $@.tmp
 	mv $@.tmp $@
-${GEN_DIRNAME}.jar: files.list
+genfiles.list:
+	topdirs= ; \
+	for d in $(top_builddir) ; do \
+	    p=`cd $$d && pwd` ; \
+	    case " $$topdirs " in \
+	        *$$p* ) continue ;; \
+	    esac ; \
+	    topdirs="$$dirs $$p" ; \
+	    for g in $(GEN_DIRS) ; do \
+		find $$p/$$g \
+		    -name '*#*' -prune -o \
+		    -name '[A-Za-z]*.java' -print ; \
+	    done \
+	done | sort > $@.tmp
+	mv $@.tmp $@
+${GEN_DIRNAME}.jar: files.list genfiles.list
 	rm -rf $(GEN_CLASSDIR)
 	mkdir -p $(GEN_CLASSDIR)
 	$(JAVAC) -d $(GEN_CLASSDIR) $(JAVACFLAGS) \
 		@$(top_builddir)/files.list \
 		2>&1 | tee $*.log
+	$(JAVAC) -d $(GEN_CLASSDIR) $(JAVACFLAGS) \
+		@$(top_builddir)/genfiles.list \
+		2>&1 | tee --append $*.log
 	if test -s $*.log ; \
 	then rm $*.log ; false ; \
 	fi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]