Package org.apache.jk.ant.compilers

Examples of org.apache.jk.ant.compilers.LinkerAdapter


    // XXX Add specific code for Linux and platforms where things are
    // clean, libtool should be just a fallback.
    public void execute() throws BuildException {
        compiler=findCompilerAdapter();
        //      co_mapper=compiler.getOMapper();
        LinkerAdapter linker=findLinkerAdapter();

        if( soFile==null )
            throw new BuildException("No target ( " + soExt + " file )");
        if (src == null)
            throw new BuildException("No source files");

        // XXX makedepend-type dependencies - how ??
        // We could generate a dummy Makefile and parse the content...
        findSourceFiles();

        // Copy all settings into compiler
        this.duplicateTo(compiler);
        compiler.compile( srcList );

        // XXX move this checking to linker
        File soTarget=new File( buildDir, soFile + soExt );
        if( compiler.getCompiledFiles().size() == 0 && soTarget.exists()) {
            // No dependency, no need to relink
            return;
        }

        this.duplicateTo(linker);
        linker.link(srcList);
    }
View Full Code Here


        compilerAdapter.setSoTask( this );
        return compilerAdapter;
   }

    public LinkerAdapter findLinkerAdapter() {
        LinkerAdapter linkerAdapter;
        String ld=project.getProperty("build.compiler.ld");
        if( ld!=null ) {
            if( ld.indexOf("mwldnlm") != -1 ) {
                linkerAdapter=new MwldLinker();
                linkerAdapter.setSoTask( this );
                return linkerAdapter;
            }
            if( ld.indexOf("link") != -1 ) {
                linkerAdapter=new MsvcLinker();
                linkerAdapter.setSoTask( this );
                return linkerAdapter;
            }
            //      if( "ld".equals( cc ) ) {
            //          linkerAdapter=new LdLinker();
            //          linkerAdapter.setSoTask( this );
            //          return cc;
            //      }
        }

        String cc=project.getProperty("build.compiler.cc");
        if( "gcj".equals( cc ) ) {
            linkerAdapter=new GcjLinker();
            linkerAdapter.setSoTask( this );
            return linkerAdapter;
        }

       
        linkerAdapter=new LibtoolLinker();
        linkerAdapter.setSoTask( this );
        return linkerAdapter;
   }
View Full Code Here

    // XXX Add specific code for Linux and platforms where things are
    // clean, libtool should be just a fallback.
    public void execute() throws BuildException {
        compiler=findCompilerAdapter();
        //      co_mapper=compiler.getOMapper();
        LinkerAdapter linker=findLinkerAdapter();

        if( soFile==null )
            throw new BuildException("No target ( " + soExt + " file )");
        if (src == null)
            throw new BuildException("No source files");

        // XXX makedepend-type dependencies - how ??
        // We could generate a dummy Makefile and parse the content...
        findSourceFiles();

        // Copy all settings into compiler
        this.duplicateTo(compiler);
        compiler.compile( srcList );

        // XXX move this checking to linker
        File soTarget=new File( buildDir, soFile + soExt );
        if( compiler.getCompiledFiles().size() == 0 && soTarget.exists()) {
            // No dependency, no need to relink
            return;
        }

        this.duplicateTo(linker);
        linker.link(srcList);
    }
View Full Code Here

        compilerAdapter.setSoTask( this );
        return compilerAdapter;
   }

    public LinkerAdapter findLinkerAdapter() {
        LinkerAdapter linkerAdapter;
        String ld=project.getProperty("build.compiler.ld");
        if( ld!=null ) {
            if( ld.indexOf("mwldnlm") != -1 ) {
                linkerAdapter=new MwldLinker();
                linkerAdapter.setSoTask( this );
                return linkerAdapter;
            }
            if( ld.indexOf("link") != -1 ) {
                linkerAdapter=new MsvcLinker();
                linkerAdapter.setSoTask( this );
                return linkerAdapter;
            }
            //      if( "ld".equals( cc ) ) {
            //          linkerAdapter=new LdLinker();
            //          linkerAdapter.setSoTask( this );
            //          return cc;
            //      }
        }

        String cc=project.getProperty("build.compiler.cc");
        if( "gcj".equals( cc ) ) {
            linkerAdapter=new GcjLinker();
            linkerAdapter.setSoTask( this );
            return linkerAdapter;
        }

       
        linkerAdapter=new LibtoolLinker();
        linkerAdapter.setSoTask( this );
        return linkerAdapter;
   }
View Full Code Here

    // XXX Add specific code for Linux and platforms where things are
    // clean, libtool should be just a fallback.
    public void execute() throws BuildException {
        compiler=findCompilerAdapter();
        //      co_mapper=compiler.getOMapper();
        LinkerAdapter linker=findLinkerAdapter();

        if( soFile==null )
            throw new BuildException("No target ( " + soExt + " file )");
        if (src == null)
            throw new BuildException("No source files");

        // XXX makedepend-type dependencies - how ??
        // We could generate a dummy Makefile and parse the content...
        findSourceFiles();

        // Copy all settings into compiler
        this.duplicateTo(compiler);
        compiler.compile( srcList );

        // XXX move this checking to linker
        File soTarget=new File( buildDir, soFile + soExt );
        if( compiler.getCompiledFiles().size() == 0 && soTarget.exists()) {
            // No dependency, no need to relink
            return;
        }

        this.duplicateTo(linker);
        linker.link(srcList);
    }
View Full Code Here

        compilerAdapter.setSoTask( this );
        return compilerAdapter;
   }

    public LinkerAdapter findLinkerAdapter() {
        LinkerAdapter linkerAdapter;
        String ld=project.getProperty("build.compiler.ld");
        if( ld!=null ) {
            if( ld.indexOf("mwldnlm") != -1 ) {
                linkerAdapter=new MwldLinker();
                linkerAdapter.setSoTask( this );
                return linkerAdapter;
            }
            if( ld.indexOf("link") != -1 ) {
                linkerAdapter=new MsvcLinker();
                linkerAdapter.setSoTask( this );
                return linkerAdapter;
            }
            //      if( "ld".equals( cc ) ) {
            //          linkerAdapter=new LdLinker();
            //          linkerAdapter.setSoTask( this );
            //          return cc;
            //      }
        }

        String cc=project.getProperty("build.compiler.cc");
        if( "gcj".equals( cc ) ) {
            linkerAdapter=new GcjLinker();
            linkerAdapter.setSoTask( this );
            return linkerAdapter;
        }

       
        linkerAdapter=new LibtoolLinker();
        linkerAdapter.setSoTask( this );
        return linkerAdapter;
   }
View Full Code Here

TOP

Related Classes of org.apache.jk.ant.compilers.LinkerAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.