blob: 8d1a418a2bbde5c6c88e54b9531a3230fbae7366 [file] [log] [blame]
<!--
******************************************************************************
* Copyright (c) 2016 Oracle
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Konstantin Komissarchik - initial implementation and ongoing maintenance
******************************************************************************
-->
<project name="corundum.macro.normalize-path">
<!--
Resolves parent folder (../) references in a path.
-->
<macrodef name="normalize-path">
<attribute name="property"/>
<attribute name="path"/>
<sequential>
<basename property=".basename" file="@{path}"/>
<dirname property=".dirname" file="@{path}"/>
<var name="@{property}" value="${.dirname}${file.separator}${.basename}"/>
<var name=".basename" unset="true"/>
<var name=".dirname" unset="true"/>
</sequential>
</macrodef>
</project>