You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Steve Drach <St...@sun.com> on 2002/11/01 20:24:58 UTC

javah doesn't seem to check class file timestamps (and dependset issue)

Why doesn't javah check to see if a class file is newer than a header file,
so it can rebuild out of date header files?  I have to resort to the
following.  Does anybody know how to simplify this?  The repetition of
the dependset really bothers me.

  <target name="check smi classes" depends="smiKawt">
    <dependset>
      <srcfileset dir="${classes}" includes="**/ToolkitImpl.class"/>
      <targetfileset dir="${src}" includes="*ToolkitImpl.h"/>
    </dependset>
    <dependset>
      <srcfileset dir="${classes}" includes="**/ImageImpl.class"/>
      <targetfileset dir="${src}" includes="*ImageImpl.h"/>
    </dependset>
    <dependset>
      <srcfileset dir="${classes}" includes="**/GraphicsImpl.class"/>
      <targetfileset dir="${src}" includes="*GraphicsImpl.h"/>
    </dependset>
    <dependset>
      <srcfileset dir="${classes}" includes="**/FontMetricsImpl.class"/>
      <targetfileset dir="${src}" includes="*FontMetricsImpl.h"/>
    </dependset>
  </target>

  <target name="smi.kawt.*.h" depends="check smi classes">
    <mkdir dir="${src}"/>
    <javah destdir="${src}" classpath="${classes}:${optional}">
      <class name="smi.kawt.impl.microwin.ToolkitImpl"/>
      <class name="smi.kawt.impl.microwin.ImageImpl"/>
      <class name="smi.kawt.impl.microwin.GraphicsImpl"/>
      <class name="smi.kawt.impl.microwin.FontMetricsImpl"/>
    </javah>
  </target>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>