From 7a7343945d3e1e14d4d9cb95ccda517504731a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Wed, 30 Apr 2014 00:06:41 +0200 Subject: [PATCH] Makefile: allow `BUILDDIR` to be a relative path --- Makefile | 4 ++-- tests/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 751ddead9f..8fecdef4b8 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ ifndef BUILDDIR BLDIR = . OBJDIR = . else -BLDIR = $(BUILDDIR) +BLDIR = $(abspath $(BUILDDIR)) OBJDIR = $(BLDIR)/obj endif INCDIR = $(DESTDIR)$(PREFIX)/include @@ -254,7 +254,7 @@ PKGCFGF = $(BLDIR)/$(LIBNAME).pc .PHONY: all clean install uninstall dist all: $(LIBRARY) $(ARCHIVE) $(PKGCFGF) - $(MAKE) -C tests + $(MAKE) -C tests BUILDDIR=$(BLDIR) $(INSTALL_DATA) $(BLDIR)/lib$(LIBNAME).$(EXT) $(BLDIR)/tests/ $(LIBRARY): $(LIBOBJ) diff --git a/tests/Makefile b/tests/Makefile index 467aaf5ac8..1e1e370809 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -10,7 +10,7 @@ OBJDIR = . LIBDIR = .. else TESTDIR = $(BUILDDIR)/tests -OBJDIR = $(BUILDDIR)/obj +OBJDIR = $(BUILDDIR)/obj/tests LIBDIR = $(BUILDDIR) endif