From f33b42a3de22e93033fb8117ca881fc10f0cf9c1 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Mon, 18 Jun 2018 19:30:07 -0400 Subject: [PATCH] Compute DEP_PATH in dep.mk without checking whether the directory exists --- dep.mk | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/dep.mk b/dep.mk index 6ad37f06..f6fa0d0f 100644 --- a/dep.mk +++ b/dep.mk @@ -2,11 +2,14 @@ include $(RACK_DIR)/arch.mk # The install location for `make install` DEP_LOCAL ?= . +DEP_PATH := $(shell pwd)/$(DEP_LOCAL) + DEP_FLAGS += -g -O3 -march=nocona ifeq ($(ARCH), mac) - DEP_FLAGS += -mmacosx-version-min=10.7 -stdlib=libc++ - DEP_LDFLAGS += -mmacosx-version-min=10.7 -stdlib=libc++ + DEP_MAC_SDK_FLAGS := -mmacosx-version-min=10.7 + DEP_FLAGS += $(DEP_MAC_SDK_FLAGS) -stdlib=libc++ + DEP_LDFLAGS += $(DEP_MAC_SDK_FLAGS) -stdlib=libc++ endif DEP_CFLAGS += $(DEP_FLAGS) @@ -16,11 +19,11 @@ DEP_CXXFLAGS += $(DEP_FLAGS) WGET := wget -c UNTAR := tar xf UNZIP := unzip -o -CONFIGURE := ./configure --prefix="$(realpath $(DEP_LOCAL))" -ifeq ($(ARCH), win) - CMAKE := cmake -G 'MSYS Makefiles' -DCMAKE_INSTALL_PREFIX="$(realpath $(DEP_LOCAL))" +CONFIGURE := ./configure --prefix="$(DEP_PATH)" +ifdef ARCH_WIN + CMAKE := cmake -G 'MSYS Makefiles' -DCMAKE_INSTALL_PREFIX="$(DEP_PATH)" else - CMAKE := cmake -DCMAKE_INSTALL_PREFIX="$(realpath $(DEP_LOCAL))" + CMAKE := cmake -DCMAKE_INSTALL_PREFIX="$(DEP_PATH)" endif # Export environment for all dependency targets