ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Uther <wi...@cs.cmu.edu>
Subject ant on Mac
Date Wed, 16 Feb 2000 06:09:27 GMT
Hi,
  I just downloaded ant and started playing with it on my Mac today.  I
have a number of small bug fixes.  I'll include the small ones in this
email, but I also wrote a VERY simple graphical front end (no command line
on the mac:), that is a few files.  How do I go about submitting them?

In other news, it would be really cool if the CVS task used jCVS instead of
Runtime.exec.  I don't have the time to do that one myself.

later,

\x/ill        :-}

Here are the changes.  This is not normal diff format, it's just me cutting
and pasting.  If you like I can resubmit these another way...

Project.java : line 353  (this one isn't a bugfix, it's needed for my GUI.)

	public Enumeration getTargetNames() {
		return targets.keys();
	}


Chmod.java : line 84  (The mac runtime uses unix style paths)

	    if (System.getProperty("path.separator").equals(":") && 
	    	!System.getProperty("os.name").startsWith("Mac"))


Delete.java : line 74  (just some extra error checking)

    public void execute() throws BuildException {
        project.log("Deleting: " + f.getAbsolutePath());

        if (f.exists()) {
            if (f.isDirectory()) {
            	project.log("Directory: " + f.getAbsolutePath() + " cannot be
removed with delete.  Use Deltree instead.");
            } else {
            	f.delete();
            }
        } else {
        	project.log("File: " + f.getAbsolutePath() + " does not exist.");
        }
    }

Deltree.java : line 94  (this was relying on undocumented behaviour - it
still is, but it is a little more robust now)

    private void removeDir(File dir) throws IOException {

        // check to make sure that the given dir isn't a symlink
        // the comparison of absolute path and canonical path
        // catches this
        // XXX - this is relying on undocumented behaviour in the JVM!
        // JavaSoft needs to introduce an isSymLink() method in
java.io.File to do this right.
        
        String canonical = dir.getCanonicalPath();
        String absolute = dir.getAbsolutePath();
        
        if (canonical.endsWith(dir.separator) &&
!absolute.endsWith(dir.separator))
        	absolute = absolute + dir.separator;
        else if (!canonical.endsWith(dir.separator) &&
absolute.endsWith(dir.separator))
        	canonical = canonical + dir.separator;
        
        if (canonical.equals(absolute)) {
            String[] list = dir.list();

Javac.java : line 249  (this allows multiple builds in the same execution)

    /**
     * Scans the directory looking for source files to be compiled and
     * support files to be copied.  The results are returned in the
     * class variables compileList and filecopyList.
     */

    private void scanDir(File srcDir, File destDir, String files[]) {
    	compileList.removeAllElements();
    	filecopyList.clear();
    	
        for (int i = 0; i < files.length; i++) {



Mime
View raw message