You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by "Timm, Sean" <ST...@mailgo.com> on 2000/02/20 19:18:04 UTC

RE: [PATCH] Xerces-J: Modified makefiles to allow use of other co mman d-line compilers

Note: It looks like the Xalan build is already setup like this, but they use
JAVACFLAGS instead of JAVACOPTS.  For the sake of consistency, we may want
to name it to line up with Xalan. (I think BINNAMEFLAGS is fairly standard
makefile practice, anyway.)

- Sean T.

-----Original Message-----
From: Timm, Sean
To: 'xerces-dev@xml.apache.org'
Sent: 2/20/00 11:06 AM
Subject: [PATCH] Xerces-J: Modified makefiles to allow use of other comman
d-line compilers

I made some minor modifications to the makefiles to allow the use of
other
java compilers rather than just javac.  This way, you can override JAVAC
in
your environment variables and do a make -e.

For instance, to compile a debug version of the library with Symantec's
VisualCafe compiler, I set JAVAC=sj -g -noinline.

All of the makefiles need to be updated to accomodate this change.  I
wasn't
sure how best to send this patch, so I'm including the diff to
Makefile.incl
where the important change was.  To modify all the makefiles, you just
need
to change the line that says ${JAVAC} $< to ${JAVAC} ${JAVACOPTS} $<.

Index: Makefile.incl
===================================================================
RCS file: /home/cvspublic/xml-xerces/java/src/Makefile.incl,v
retrieving revision 1.17
diff -u -r1.17 Makefile.incl
--- Makefile.incl	2000/02/17 20:04:07	1.17
+++ Makefile.incl	2000/02/20 17:59:36
@@ -18,18 +18,24 @@
 SB_CLPATH = $(STYLEBOOK_CLPATH)$(CLPATHSEP)$(CLASSPATH)
 
 JAR = jar
-JAVAC = javac -classpath "$(CLPATH)"
-JAVA = java -classpath "$(CLPATH)"
-JAVADOC = javadoc -classpath "$(CLPATH)"
 
+JAVAC = javac
+JAVACOPTS = -classpath "$(CLPATH)"
+
+JAVA = java
+JAVAOPTS = -classpath "$(CLPATH)"
+
+JAVADOC = javadoc
+JAVADOCOPTS = -classpath "$(CLPATH)"
+
 ifeq ($(JDK12BIN),)
-JAVA12 = java -classpath "$(CLPATH)"
-JAVADOC12 = javadoc -classpath "$(CLPATH)"
-STYLEBOOK = java -classpath "$(SB_CLPATH)"
org.apache.stylebook.StyleBook
+JAVA12 = $(JAVA) -classpath "$(CLPATH)"
+JAVADOC12 = $(JAVADOC) -classpath "$(CLPATH)"
+STYLEBOOK = $(JAVA) -classpath "$(SB_CLPATH)"
org.apache.stylebook.StyleBook
 else
-JAVA12 = $(JDK12BIN)/java -classpath "$(CLPATH)"
-JAVADOC12 = $(JDK12BIN)/javadoc -classpath "$(CLPATH)"
-STYLEBOOK = $(JDK12BIN)/java -classpath "$(SB_CLPATH)"
org.apache.stylebook.StyleBook
+JAVA12 = $(JDK12BIN)/$(JAVA) -classpath "$(CLPATH)"
+JAVADOC12 = $(JDK12BIN)/$(JAVADOC) -classpath "$(CLPATH)"
+STYLEBOOK = $(JDK12BIN)/$(JAVA) -classpath "$(SB_CLPATH)"
org.apache.stylebook.StyleBook
 endif
 
 MKDIR = mkdir -p