Added AbsSymLink rule.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1941 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2002-11-14 23:09:18 +00:00
parent 1d5bd6c9d9
commit d391d2eb6e

View File

@ -938,6 +938,32 @@ rule RelSymLink
LocalClean clean : $(target) ;
}
rule AbsSymLink
{
# RelSymLink <link> : <link target> : <link dir>
# Creates an absolute symbolic link from <link> to <link target>.
# <link> and <link target> must be usual targets. If <link dir> is
# given, then it is set as LOCATE directory on <link>.
LocalDepends files : $(1) ;
Depends $(1) : $(2) ;
if $(3) {
MakeLocate $(1) : $(3) ;
}
SEARCH on $(2) += $(SEARCH_SOURCE) ;
LocalClean clean : $(1) ;
}
actions AbsSymLink
{
target="$(2)"
case "$target" in
/*) ;;
*) target=`pwd`/"$target";;
esac
$(RM) "$(1)" && $(LN) -s "$target" "$(1)"
}
#-------------------------------------------------------------------------------
# Low-level OBOS utility rules
#-------------------------------------------------------------------------------