outofdate PreviousNext

Description

Compare timestamps of files and set the value of a variable depending on the result.

Parameters

source
Description: filename

Domain: Valid filename pointing to existing file

Default: -

target
Description: target file to compare to

Domain: Valid filename

Default: -

variable
Description: variable which reflects the result of the comparison

Domain: valid variable name

Default: -

true_value
Description: result value of positive comparison

Domain: -

Default: true

false_value
Description: result value of negative comparison

Domain: -

Default: false

RNG Specification

  <define name="outofdate">
    <element name="outofdate">
      <ref name="dir_if_unless"/>
      <choice>
        <group>
          <attribute name="source"/>
          <attribute name="target"/>
        </group>
        <ref name="fileset"/>
      </choice>
      <attribute name="variable"/>
      <optional>
        <attribute name="true_value"/>
      </optional>
      <optional>
        <attribute name="false_value"/>
      </optional>
    </element>
  </define>

	

Examples

  <outofdate
    variable="generate"
    source="${gepp_in_dir}/${gepp_file}.ge"
    target="${gepp_out_dir}/${gepp_file}.e"
  />

  <outofdate variable="generate" dir="${GOBO}/library/kernel">
    <fileset dir="." include="@(**/*.ge)">
      <map type="glob" from="*.ge" to="${GOBO}/example/geant/tmp/*.e">
        <map type="flat"/>
      </map>
    </fileset>
  </outofdate>

  <outofdate variable="generate">
    <fileset dir=".">
      <include name="outofdate.eant"/>
      <include name="build.eant"/>
      <map type="merge" from="*" to="${gepp_out_dir}/toto.txt"/>
    </fileset>
  </outofdate>

  <outofdate variable="generate" dir="${GOBO}/library/kernel">
    <fileset dir=".">
    <include name="${gepp_in_dir}/${gepp_file}.ge"/>
    <include name="${GOBO}/example/geant/misc/outofdate.eant)"/>
    <map type="glob" from="*.ge" to="${gepp_out_dir}/*.e">
      <map type="flat"/>
    </map>
    </fileset>
  </outofdate>

	

Copyright 2002-2005, Sven Ehrke
mailto:ericb@gobosoft.com
http://www.gobosoft.com
Last Updated: 7 July 2005
HomeTocPreviousNext