From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jose Freddy Rojas Chavarria" To: sourcenav@sources.redhat.com Subject: source navigator patch for javac Date: Tue, 16 Jan 2001 19:57:00 -0000 Message-id: <1245asd5asd78sajs> X-SW-Source: 2001-q1/msg00030.html Content-type: multipart/mixed; boundary="----------=_1583534838-35126-1" This is a multi-part message in MIME format... ------------=_1583534838-35126-1 Content-length: 3140 Hello. I am using source navigator. And I have an option to use it with javac compiler of SUN in linux with the minimal of changes. To be compatible with the gcc and gjc format I write a simple javacc script. It receive the gnu format and call javac in this way. ++++++++++++++++++javacc+++++++++++++++++++++++++++++ #!/bin/sh case "$1" in "-c") javac "$2" ;; "-o") ;; esac ++++++++++++++++++++++++ EOF ++++++++++++++++++++++++++++++++ Then I modify the file mkfilegen.tcl in order to check the name javacc as the compiler and allow to work it ok in the same way that gjc. The patch is +++++++++++++++++++++++++++++mkfilegendiff.patch+++++++++++++++++++++++ *** mkfilegen.tcl Thu Jan 4 06:56:02 2001 --- mkfilegen.tcl.origin Mon Sep 11 12:48:34 2000 *************** itcl_class MakefileGen { *** 33,39 **** # private date members protected b_target "" ; # Build target object protected toolchain "" ; # Use this toolchain ! protected tooljava "" ; method constructor { target_name {tool_chain ""} {args "" }} { --- 33,39 ---- # private date members protected b_target "" ; # Build target object protected toolchain "" ; # Use this toolchain ! method constructor { target_name {tool_chain ""} {args "" }} { *************** itcl_class MakefileGen { *** 283,291 **** method WriteMacroLINKER { file_d } { set linker [$b_target GetLinkerLocation] puts $file_d "LINKER = $linker" - if { $linker == "javacc" } { - set tooljava "true" - } set linkerflags [$b_target GetUserLinkFlags] puts $file_d "LINKER_FLAGS = $linkerflags" --- 283,288 ---- *************** itcl_class MakefileGen { *** 343,353 **** # Make the rule puts $file_d "\nclean:" foreach objext $objexts { ! if { $tooljava == "true"} { ! puts $file_d "\trm -f *.class" ! } else { ! puts $file_d "\trm -f *$objext" ! } } puts $file_d "\trm -f $outputfile" --- 340,346 ---- # Make the rule puts $file_d "\nclean:" foreach objext $objexts { ! puts $file_d "\trm -f *$objext" } puts $file_d "\trm -f $outputfile" ++++++++++++++++++++++ EOF ++++++++++++++++++++++++++++++++ With this two changes I can select javacc as my java compiler and I add in the project file (makefile) the main java file or the list of files and sourcenavigator works as gcj compiler. This is my simple way to do that. Please if you think it patch should be practical for you. Tell me please. It is preliminary, and it was my easy way to avoid to compile gjc for now. Tank you Freddy Rojas ++++++++++++++++++++++++++++++++++++++++++ Eng. José Freddy Rojas Chavarría,MSC. Research and Development Department Instituto Costarricense de Electricidad San Jose, Costa Rica. (Utility company of Costa Rica) freddy@ns.dgct.ice.go.cr freddyrojas@costarricense.com +++++++++++++++++++++++++++++++++++++++++++ _______________________________________ Yo me registré en www.costarricense.com ------------=_1583534838-35126-1 Content-Type: text/x-shellscript; charset=us-ascii; name="JAVACC" Content-Disposition: inline; filename="JAVACC" Content-Transfer-Encoding: base64 Content-Length: 102 IyEvYmluL3NoCgpjYXNlICIkMSIgaW4KICAgICItYyIpCglqYXZhYyAiJDIi CiAgICA7OwogICAgIi1vIikKICAgIDs7CmVzYWMK ------------=_1583534838-35126-1 Content-Type: text/x-diff; charset=us-ascii; name="PATCH-FOR-JAVAC.PATCH" Content-Disposition: inline; filename="PATCH-FOR-JAVAC.PATCH" Content-Transfer-Encoding: base64 Content-Length: 2164 KioqIG1rZmlsZWdlbi50Y2wJVGh1IEphbiAgNCAwNjo1NjowMiAyMDAxCi0t LSBta2ZpbGVnZW4udGNsLm9yaWdpbglNb24gU2VwIDExIDEyOjQ4OjM0IDIw MDAKKioqKioqKioqKioqKioqIGl0Y2xfY2xhc3MgTWFrZWZpbGVHZW4gewoq KiogMzMsMzkgKioqKgogICAgICAjIHByaXZhdGUgZGF0ZSBtZW1iZXJzCiAg ICAgIHByb3RlY3RlZCBiX3RhcmdldCAiIiAgICAgOyAjIEJ1aWxkIHRhcmdl dCBvYmplY3QKICAgICAgcHJvdGVjdGVkIHRvb2xjaGFpbiAiIiAgICA7ICMg VXNlIHRoaXMgdG9vbGNoYWluCiEgICAgIHByb3RlY3RlZCB0b29samF2YSAg IiIgICAgOwogIAogICAgICBtZXRob2QgY29uc3RydWN0b3IgeyB0YXJnZXRf bmFtZSB7dG9vbF9jaGFpbiAiIn0ge2FyZ3MgIiIgfX0gewogIAotLS0gMzMs MzkgLS0tLQogICAgICAjIHByaXZhdGUgZGF0ZSBtZW1iZXJzCiAgICAgIHBy b3RlY3RlZCBiX3RhcmdldCAiIiAgICAgOyAjIEJ1aWxkIHRhcmdldCBvYmpl Y3QKICAgICAgcHJvdGVjdGVkIHRvb2xjaGFpbiAiIiAgICA7ICMgVXNlIHRo aXMgdG9vbGNoYWluCiEgCiAgCiAgICAgIG1ldGhvZCBjb25zdHJ1Y3RvciB7 IHRhcmdldF9uYW1lIHt0b29sX2NoYWluICIifSB7YXJncyAiIiB9fSB7CiAg CioqKioqKioqKioqKioqKiBpdGNsX2NsYXNzIE1ha2VmaWxlR2VuIHsKKioq IDI4MywyOTEgKioqKgogICAgICBtZXRob2QgV3JpdGVNYWNyb0xJTktFUiB7 IGZpbGVfZCB9IHsKICAgICAgICAgIHNldCBsaW5rZXIgWyRiX3RhcmdldCBH ZXRMaW5rZXJMb2NhdGlvbl0KICAgICAgICAgIHB1dHMgJGZpbGVfZCAiTElO S0VSID0gJGxpbmtlciIKLSAJaWYgeyAkbGlua2VyID09ICJqYXZhY2MiIH0g ewotIAkgICAgICBzZXQgdG9vbGphdmEgInRydWUiCi0gICAgICAgICB9CiAg CQogICAgICAgICAgc2V0IGxpbmtlcmZsYWdzIFskYl90YXJnZXQgR2V0VXNl ckxpbmtGbGFnc10KICAgICAgICAgIHB1dHMgJGZpbGVfZCAiTElOS0VSX0ZM QUdTID0gJGxpbmtlcmZsYWdzIgotLS0gMjgzLDI4OCAtLS0tCioqKioqKioq KioqKioqKiBpdGNsX2NsYXNzIE1ha2VmaWxlR2VuIHsKKioqIDM0MywzNTMg KioqKgogICAgICAgICAgIyBNYWtlIHRoZSBydWxlCiAgCXB1dHMgJGZpbGVf ZCAiXG5jbGVhbjoiCiAgCWZvcmVhY2ggb2JqZXh0ICRvYmpleHRzIHsKISAJ ICAgIGlmIHsgJHRvb2xqYXZhID09ICJ0cnVlIn0gewohIAkgICAgICBwdXRz ICRmaWxlX2QgIlx0cm0gLWYgKi5jbGFzcyIgICAgCiEgCSAgICB9IGVsc2Ug ewohICAgICAgICAgICAgICAgcHV0cyAkZmlsZV9kICJcdHJtIC1mICokb2Jq ZXh0IgohIAkgICAgfQogICAgICAgICAgfQogIAkgICAgIAogICAgICAgICAg cHV0cyAkZmlsZV9kICJcdHJtIC1mICRvdXRwdXRmaWxlIgotLS0gMzQwLDM0 NiAtLS0tCiAgICAgICAgICAjIE1ha2UgdGhlIHJ1bGUKICAJcHV0cyAkZmls ZV9kICJcbmNsZWFuOiIKICAJZm9yZWFjaCBvYmpleHQgJG9iamV4dHMgewoh ICAgICAgICAgICAgIHB1dHMgJGZpbGVfZCAiXHRybSAtZiAqJG9iamV4dCIK ICAgICAgICAgIH0KICAJICAgICAKICAgICAgICAgIHB1dHMgJGZpbGVfZCAi XHRybSAtZiAkb3V0cHV0ZmlsZSI= ------------=_1583534838-35126-1--