diff options
author | Matthew Ahrens <[email protected]> | 2018-05-31 09:19:59 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-05-31 09:19:59 -0700 |
commit | d1f06ec5bccae26639b7bb6bd3925f9998848f86 (patch) | |
tree | b9b3a11932c34f96f52a2db0f14abf036153e250 | |
parent | 928046b744a6d3f93f5ba1351a6d700a62535a00 (diff) |
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 <[email protected]>
Reviewed-by: Pavel Zakharov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Matthew Ahrens <[email protected]>
Closes #7580
-rw-r--r-- | Makefile.am | 5 |
1 files 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 |