ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Drach <Steve.Dr...@sun.com>
Subject javah doesn't seem to check class file timestamps (and dependset issue)
Date Fri, 01 Nov 2002 19:24:58 GMT
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:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message