From 01f3e7b1a1fbbcc09f85cfa4fe9c5f9912ce1056 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Tue, 11 Nov 2008 10:57:49 +0000
Subject: [PATCH] Make the makefile not recreate ganeti every time

Currently the makefile always recreates the ganeti symlink. Make it so
that it does only when it doesn't exist or it's not a symlink.

Reviewed-by: imsnah
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index a76de289b..0af6e45dd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -306,7 +306,7 @@ srclinks: stamp-directories
 
 .PHONY: ganeti
 ganeti:
-	cd $(top_builddir) && rm -f $@ && $(LN_S) lib $@
+	cd $(top_builddir) && test -h "$@" || { rm -f $@ && $(LN_S) lib $@; }
 
 # a dist hook rule for catching revision control directories
 distcheck-hook:
-- 
GitLab