generate output rules for files under <if>