aboutsummaryrefslogtreecommitdiffstats
path: root/src/build.c
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2015-02-15 01:50:48 +0100
committerTharre <tharre3@gmail.com>2015-02-15 01:53:16 +0100
commit575dcfc9e15cfbd45339fe0e5cb4be6c637248d1 (patch)
tree3c16e5d3c38ded476323dcd596293aad68187c51 /src/build.c
parent6fe2d9cb44515c4db53686327086f2ae894cad60 (diff)
downloadredo-575dcfc9e15cfbd45339fe0e5cb4be6c637248d1.tar.gz
redo-575dcfc9e15cfbd45339fe0e5cb4be6c637248d1.tar.xz
redo-575dcfc9e15cfbd45339fe0e5cb4be6c637248d1.zip
Replace make_relative() with relpath()
Also improve the documentation for this function, and add a few examples to clarify what it does (and what not).
Diffstat (limited to 'src/build.c')
-rw-r--r--src/build.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/build.c b/src/build.c
index c1dd602..71f10f9 100644
--- a/src/build.c
+++ b/src/build.c
@@ -322,9 +322,9 @@ static char *get_relpath(const char *target) {
if (!abstarget)
fatal("redo: failed to get realpath() of %s", target);
- char *relpath = xstrdup(make_relative(root, abstarget));
+ char *path = xstrdup(relpath(abstarget, root));
free(abstarget);
- return relpath;
+ return path;
}
/* Return the dependency file path of target. */