|
|
|
|
|
by oblio
264 days ago
|
|
Stuff like HCL and Ansible YAML makes me want to require mandatory training in Ant contrib tasks for developers creating them: https://ant-contrib.sourceforge.net/tasks/tasks/if.html <if>
<equals arg1="${foo}" arg2="bar" />
<then>
<echo message="The value of property foo is 'bar'" />
</then>
<elseif>
<equals arg1="${foo}" arg2="foo" />
<then>
<echo message="The value of property foo is 'foo'" />
</then>
</elseif>
<else>
<echo message="The value of property foo is not 'foo' or 'bar'" />
</else>
</if>https://ant-contrib.sourceforge.net/tasks/tasks/for.html <for param="file">
<path>
<fileset dir="${test.dir}/mains" includes="*.cpp"/>
</path>
<sequential>
<propertyregex override="yes"
property="program" input="@{file}"
regexp=".*/([^\.]\*)\.cpp" replace="\1"/>
<mkdir dir="${obj.dir}/${program}"/>
<mkdir dir="${build.bin.dir}"/>
<cc link="executable" objdir="${obj.dir}/${program}"
outfile="${build.bin.dir}/${program}">
<compiler refid="compiler.options"/>
<fileset file="@{file}"/>
<linker refid="linker-libs"/>
</cc>
</sequential>
</for>
Yes, programming with them was as fun as you're imagining. |
|
Advocates for the inappropriate use of XML (basically, anywhere it was used as anything other than a markup language) have lot to answer for.