From f3a1a33b9f72a2aae2680251fcdbfdf27ee0a444 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 5 Jan 2014 16:53:17 +0100 Subject: Fix rebuilding of libs on OS X. OS X ar operates on fat libaries. In this case updating the library isn't possible and when those change ar will only return an error. Remove the output file prior to running ar to work around this limitation. Change-Id: I7ebc66efd092a8e6037ae86a3658afe6b4da777f --- rbutil/libtools.make | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'rbutil/libtools.make') diff --git a/rbutil/libtools.make b/rbutil/libtools.make index defd320c17..87a0c15464 100644 --- a/rbutil/libtools.make +++ b/rbutil/libtools.make @@ -23,8 +23,10 @@ endif TOP := $(dir $(lastword $(MAKEFILE_LIST))) ifeq ($(OS),Windows_NT) mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1)) +rm = del /q /s $(1) else mkdir = mkdir -p $(1) +rm = rm -rf $(1) endif # overwrite for releases @@ -135,11 +137,12 @@ $(TARGET_DIR)$(OUTPUT).dll: $(LIBOBJS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) $(TARGET_DIR)lib$(OUTPUT)$(RBARCH).a: $(LIBOBJS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) @echo AR $(notdir $@) $(SILENT)$(call mkdir,$(dir $@)) + $(SILENT)$(call rm,$@) $(SILENT)$(AR) rcs $@ $^ clean: - rm -f $(OBJS) $(OUTPUT) $(TARGET_DIR)lib$(OUTPUT)*.a $(OUTPUT).dmg - rm -rf $(OUTPUT)-* i386 ppc $(OBJDIR) + $(call rm, $(OBJS) $(OUTPUT) $(TARGET_DIR)lib$(OUTPUT)*.a $(OUTPUT).dmg) + $(call rm, $(OUTPUT)-* i386 ppc $(OBJDIR)) %.d: $(SILENT)$(call mkdir,$(BUILD_DIR)) -- cgit v1.2.3