Menu

New feautre: Clean wokring directory

2002-09-20
2002-09-20
  • Jason Weathered

    Jason Weathered - 2002-09-20

    How about a feature similar to "make clean".

    jmake clean [--all] [--ignore-read-only]

    removes all .class files for which a corresponding .java exists. For anyclass file found without a matching source file, an error should be reported to stderr and non-zero returned

    If all is specified then all .class files are removed regardless if any corresponding .java exists

    An error value should be returned if any file fails to delete.

    If ignore-read-only is specified then any read-only class files will be skipped, without causing any warnings or errors (although status information may be displayed to stdout)

     
    • Jason Weathered

      Jason Weathered - 2002-09-20

      doh.. two typos in the subject line. I should proof my posts before submitting :)

       
    • Andrew Marrington

      How will this feature handle inner classes or will this be done automatically?

       
      • Jason Weathered

        Jason Weathered - 2002-09-20

        Take for example a java source file called example.java. Say this file generates 2 class files, example.class and example$inner.class. When jmake finds the example.java file, it will delete (only if exists of course), example.class and example$*.class (notice the wildcard after the $). Since the naming convention of inner class filenames is always outer$inner.class, this cannot fail (unless I am somehow mistaken).

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.