fix removal of {cpu,machine} links on mingw/msys
PATCH 1/1 fix removal of {cpu,machine} links on mingw/msys
At least on Windows 2003 using "ln -s dir1 dir2" in msys shell succeeds, but results in what looks like hard link. Subsequent "rm -f dir2" (e.g. during second config.status invocation) fails. Check that we also can remove link to directory.
Make it more clear in message that we are checking "ln -s".
--- acinclude.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
acinclude.m4 +3 -3
@@ -418,15 +418,15 @@ else [fi] ]) -dnl Check if ln can handle directories properly (mingw). +dnl Check if ln -s can handle directories properly (mingw). AC_DEFUN([grub_CHECK_LINK_DIR],[ -AC_MSG_CHECKING([whether ln can handle directories properly]) +AC_MSG_CHECKING([whether ln -s can handle directories properly]) [mkdir testdir 2>/dev/null case $srcdir in [\\/$]* | ?:[\\/]* ) reldir=$srcdir/include/grub/util ;; *) reldir=../$srcdir/include/grub/util ;; esac -if ln -s $reldir testdir/util 2>/dev/null ; then] +if ln -s $reldir testdir/util 2>/dev/null && rm -f testdir/util 2>/dev/null ; then] AC_MSG_RESULT([yes]) [link_dir=yes else
Signature · 1 line
tg: (989af02..) u/mingw/dir-links (depends on: master)
Quoted 7 lines · Andrey Borzenkov
At least on Windows 2003 using "ln -s dir1 dir2" in msys shell succeeds, but results in what looks like hard link. Subsequent "rm -f dir2" (e.g. during second config.status invocation) fails. Check that we also can remove link to directory.
Make it more clear in message that we are checking "ln -s".
Is there a way to reliably remove result of such test? We don't want to leave a weird file after the test behind. Perhaps rm -rf since we know that we test with newly-created directory?
Quoted 28 lines
--- acinclude.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)acinclude.m4 +3
-3@@ -418,15 +418,15 @@ else [fi] ]) -dnl Check if ln can handle directories properly (mingw). +dnl Check if ln -s can handle directories properly (mingw). AC_DEFUN([grub_CHECK_LINK_DIR],[ -AC_MSG_CHECKING([whether ln can handle directories properly]) +AC_MSG_CHECKING([whether ln -s can handle directories properly]) [mkdir testdir 2>/dev/null case $srcdir in [\\/$]* | ?:[\\/]* ) reldir=$srcdir/include/grub/util ;; *) reldir=../$srcdir/include/grub/util ;; esac -if ln -s $reldir testdir/util 2>/dev/null ; then] +if ln -s $reldir testdir/util 2>/dev/null && rm -f testdir/util 2>/dev/null ; then] AC_MSG_RESULT([yes]) [link_dir=yes else
В Sat, 18 Jan 2014 19:14:43 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:
Quoted 11 lines · Andrey Borzenkov
Quoted 7 lines
At least on Windows 2003 using "ln -s dir1 dir2" in msys shell succeeds, but results in what looks like hard link. Subsequent "rm -f dir2" (e.g. during second config.status invocation) fails. Check that we also can remove link to directory.
Make it more clear in message that we are checking "ln -s".
Is there a way to reliably remove result of such test? We don't want to leave a weird file after the test behind. Perhaps rm -rf since we know that we test with newly-created directory?
Test does "rm -rf testdir" at the end already and it removes this.
Quoted 9 lines · Andrey Borzenkov
В Sat, 18 Jan 2014 19:14:43 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:Quoted 6 lines · Andrey Borzenkov
Quoted 5 lines
At least on Windows 2003 using "ln -s dir1 dir2" in msys shell succeeds, but results in what looks like hard link. Subsequent "rm -f dir2" (e.g. during second config.status invocation) fails. Check that we also can remove link to directory.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Make it more clear in message that we are checking "ln -s".
Is there a way to reliably remove result of such test? We don't want to leave a weird file after the test behind. Perhaps rm -rf since we know that we test with newly-created directory?
Test does "rm -rf testdir" at the end already and it removes this.
Go ahead then.
Quoted 7 lines
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel