On 2/25/21 3:49 AM, Waldek Hebisch wrote:
On Wed, Feb 24, 2021 at 06:17:17PM +0800, Qian Yun wrote:
Hi all,

This patch detects case insensitive file system and prevents
in-tree build on such systems, which would result in strange
build error later.

First time using autotools, comments are welcome.

AFAICS you make resonable effort to detect if filesystem
containing /bin/sh is case-sensitive.  In many cases
this is the same filesysytem as build tree, but in many
cases this is distinct filesystem.  IMO we should check
directly build tree.  Just create file there and check
if it can be accessed using different case.

Thanks for your feedback.  This check was borrowed from automake.
The following updated check is borrowed from CVS, is it OK to commit
this version?

- Qian

+AC_MSG_CHECKING([for in-tree build on case insensitive file system])
+if test "$fricas_top_srcdir" = "$fricas_pwd"; then
+   rm -f ac_TEST_filenames_CASE_sensitive ac_test_filenames_case_sensitive
+   echo foo > ac_test_filenames_case_sensitive
+   if test -f ac_TEST_filenames_CASE_sensitive; then
+      rm ac_test_filenames_case_sensitive
+ AC_MSG_ERROR([in tree build on case insensitive file system is not supported. Use out-of-source build instead.])
+   else
+      rm ac_test_filenames_case_sensitive
+      AC_MSG_RESULT([no])
+   fi
+else
+   AC_MSG_RESULT([no])
+fi

https://github.com/oldk1331/fricas/commit/3c8f8b50c314e6d8c949580b8cb10b79a3cc2d99.patch

BTW, do you think it's useful for FriCAS to build in-tree
correctly on a case insensitive file system?

Useful: yes to some degree.  However ATM gain seem to be
to small compared to the effort.  I hope that problem
will go away when we improve our build system (in particular
I would like to avoid splitting .spad files into pieces
which is responsible for current problem).


--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/fb2aa325-7466-b849-ee72-81dc086ae32f%40gmail.com.

Reply via email to