From ec04fea6f270402b3e21d92d755f75664c0fa5ec Mon Sep 17 00:00:00 2001 From: "J. Maurice" Date: Sat, 8 Feb 2014 22:23:26 +0900 Subject: [PATCH] Don't rmdir the destination directory if it's a symlink during "make install-data-hook" This fixes a build error on linux during subsequent "make install" runs after the first "make install" succeeds --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 73e8116..67ef283 100644 --- a/Makefile.am +++ b/Makefile.am @@ -71,7 +71,7 @@ install-data-hook: if test -d "$(DESTDIR)@includedir@/json" ; then \ (cd "$(DESTDIR)@includedir@/json" && \ rm -f $(libjson_cinclude_HEADERS)) ; \ - rmdir "$(DESTDIR)@includedir@/json" ; \ + test -L "$(DESTDIR)@includedir@/json" || rmdir "$(DESTDIR)@includedir@/json" ; \ fi test \! -e "$(DESTDIR)@includedir@/json" || rm "$(DESTDIR)@includedir@/json" $(LN_S) json-c "$(DESTDIR)@includedir@/json"