help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Case-insensitive make ?


From: John Graham-Cumming
Subject: Re: Case-insensitive make ?
Date: Thu, 10 Feb 2005 15:11:54 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040208 Thunderbird/0.5 Mnenhy/0.6.0.104

Stan Brown wrote:
But I'm moving to a Windows XP system, and that's no longer the case, so none of my makefiles work. I could change them all, but that's kind of laborious and I wonder whether there's some directive I've overlooked that would just tell make to treat filenames case insensitively.

There is no directive that alters this, but you can rebuild GNU Make to make this work.

To quote from GNU Make 3.80's README.W32 file:

----
Pathnames and Case insensitivity:

Unlike Unix, Windows 95/NT systems are case insensitive but case
preserving. For example if you tell the file system to create a
file named "Target", it will preserve the case. Subsequent
access to he file with other case permutations will succeed (i.e. opening a
file named "target" or "TARGET" will open the file "Target").

By default, GNU make retains its case sensitivity when comparing
target names and existing files or directories. It can be
configured, however, into a case preserving and case insensitive
mode by adding a define for HAVE_CASE_INSENSITIVE_FS to
config.h.W32.

For example, the following makefile will create a file named
Target in the directory subdir which will subsequently be used
to satisfy the dependency of SUBDIR/DepTarget on SubDir/TARGET.
Without HAVE_CASE_INSENSITIVE_FS configured, the dependency link
will not be made:

subdir/Target:
    touch $@

SUBDIR/DepTarget: SubDir/TARGET
    cp $^ $@

Reliance on this behavior also eliminates the ability of GNU make
to use case in comparison of matching rules. For example, it is
not possible to set up a C++ rule using %.C that is different
than a C rule using %.c. GNU make will consider these to be the
same rule and will issue a warning.
----

So basically you can rebuild GNU Make setting HAVE_CASE_INSENSITIVE_FS in config.h.W32.

John.
--
John Graham-Cumming
jgc@jgc.org

Home: http://www.jgc.org/
Work: http://www.electric-cloud.com/
POPFile: http://getpopfile.org/
GNU Make Standard Library: http://gmsl.sf.net/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]