From d1f06ec5bccae26639b7bb6bd3925f9998848f86 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Thu, 31 May 2018 09:19:59 -0700 Subject: make install only works once `make install` shouldn't fail if a directory it created still exists. In this case we can blow away the spl src directory before recreating it. This also gracefully handles the migration from pre-spl-merge to post-spl-merge. Reviewed by: Richard Elling Reviewed-by: Pavel Zakharov Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Signed-off-by: Matthew Ahrens Closes #7580 --- Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 669231c07..55cae89fa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,6 +49,7 @@ dist-hook: # compatibility links will be removed in the next major release. if CONFIG_KERNEL install-data-hook: + rm -rf $(DESTDIR)$(prefix)/src/spl-$(VERSION) && \ mkdir $(DESTDIR)$(prefix)/src/spl-$(VERSION) && \ cd $(DESTDIR)$(prefix)/src/spl-$(VERSION) && \ ln -s ../zfs-$(VERSION)/include/spl include && \ @@ -56,8 +57,8 @@ install-data-hook: ln -s ../zfs-$(VERSION)/zfs_config.h.in spl_config.h.in && \ ln -s ../zfs-$(VERSION)/zfs.release.in spl.release.in && \ cd $(DESTDIR)$(prefix)/src/zfs-$(VERSION)/$(LINUX_VERSION) && \ - ln -s zfs_config.h spl_config.h && \ - ln -s zfs.release spl.release + ln -fs zfs_config.h spl_config.h && \ + ln -fs zfs.release spl.release endif checkstyle: cstyle shellcheck flake8 commitcheck mancheck testscheck -- cgit v1.2.3