]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Check for case sensitive make.
authorStepan Kasal <skasal@redhat.com>
Thu, 22 May 2008 15:52:28 +0000 (17:52 +0200)
committerEric Blake <ebb9@byu.net>
Tue, 26 Aug 2008 18:40:23 +0000 (12:40 -0600)
* m4/make-check.m4 (AC_PROG_MAKE_CASE_SENSITIVE): New macro,...
* configure.ac: ... called here.
* Makefile.am ($(abs_srcdir)/INSTALL, INSTALL): Return to...
($(srcdir)/INSTALL): ...this, but enclose the rule in
"if MAKE_CASE_SENSITIVE".

Signed-off-by: Stepan Kasal <skasal@redhat.com>
ChangeLog
Makefile.am
configure.ac
m4/make-case.m4 [new file with mode: 0644]

index da4e2a290f91d5777c8eb2f39eea3799374017ce..40ff1883b8ec560eb92f85cd4c94ae1f465fdfe2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-08-26  Stepan Kasal  <skasal@redhat.com>
+
+       Check for case sensitive make.
+       * m4/make-check.m4 (AC_PROG_MAKE_CASE_SENSITIVE): New macro,...
+       * configure.ac: ... called here.
+       * Makefile.am ($(abs_srcdir)/INSTALL, INSTALL): Return to...
+       ($(srcdir)/INSTALL): ...this, but enclose the rule in
+       "if MAKE_CASE_SENSITIVE".
+
 2008-08-26  Eric Blake  <ebb9@byu.net>
 
        Update invocation documentation.
index 3ccaf2b5128d7c7a22f51e2298e38fcbe08c19c5..215c14be95dd9834574504dd04f5835f3a009ee9 100644 (file)
@@ -30,22 +30,20 @@ EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 \
             build-aux/announce-gen build-aux/gnupload \
             .prev-version .version
 
-MAINTAINERCLEANFILES = $(abs_srcdir)/INSTALL
-
 ## --------- ##
 ## INSTALL.  ##
 ## --------- ##
 
-## abs_srcdir is necessary for case-insensitive make to distinguish from
-## 'make install'.  But automake also insists that the plain target INSTALL
-## exist prior to 'make dist'.
-INSTALL: $(abs_srcdir)/INSTALL
-
-pkgdata_DATA = $(abs_srcdir)/INSTALL
+pkgdata_DATA = $(srcdir)/INSTALL
 AM_MAKEINFOFLAGS = --no-headers --no-validate --no-split
-$(abs_srcdir)/INSTALL: $(top_srcdir)/doc/install.texi
+
+if MAKE_CASE_SENSITIVE
+
+MAINTAINERCLEANFILES = $(srcdir)/INSTALL
+$(srcdir)/INSTALL: $(top_srcdir)/doc/install.texi
        $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -o $@ \
          $(top_srcdir)/doc/install.texi
+endif
 
 ## maintainer-check ##
 maintainer-check: maintainer-check-tests
index 9fbb235163ef2dd5f48fc7a3d3ddf3e4541dea07..d4f19083f20deb19a0dcfc36cbabf1efd44c5bf7 100644 (file)
@@ -147,6 +147,12 @@ AC_PROG_EGREP
 AC_PROG_SED
 
 
+## ----- ##
+## Make. ##
+## ----- ##
+AC_PROG_MAKE_CASE_SENSITIVE
+
+
 ## ------------ ##
 ## Conclusion.  ##
 ## ------------ ##
diff --git a/m4/make-case.m4 b/m4/make-case.m4
new file mode 100644 (file)
index 0000000..b23ccf9
--- /dev/null
@@ -0,0 +1,26 @@
+# make-case.m4 serial 0
+dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# AC_PROG_MAKE_CASE_SENSITIVE
+# ---------------------------
+# Checks whether make is configured to be case insensitive; if yes,
+# sets AM_CONDITIONAL MAKE_CASE_SENSITIVE.
+#
+AC_DEFUN([AC_PROG_MAKE_CASE_SENSITIVE],
+[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_CACHE_CHECK([whether ${MAKE-make} is case sensitive],
+[ac_cv_prog_make_${ac_make}_case],
+[echo all: >conftest.make
+if ${MAKE-make} -f conftest.make ALL >/dev/null 2>&1; then
+  ac_res=no
+else
+  ac_res=yes
+fi
+eval ac_cv_prog_make_${ac_make}_case=$ac_res
+rm -f conftest.make])
+AM_CONDITIONAL([MAKE_CASE_SENSITIVE],
+  [eval test \$ac_cv_prog_make_${ac_make}_case = yes])
+])