Too sensitive Gnu Make

Henry J. Cobb hcobb@telegenisys.com
Wed Jul 29 16:23:00 GMT 1998


The way I've overcome GNU Make's case sensitivity under NT is to use a
pattern rule that gives the instructions on how to make the file, a
target
that lists what I want and a blank rule of 1-1 targets for the leaves.

So for Java, the makefile (or is that Makefile? ;-) goes like:

# Classes to be made, in dependency order.
JAVA_CLASSES = Foo.class Bar.class

# Need to build the class files
all: $(JAVA_CLASSES)

# Each class file depends on its java file
%.class: %.java
	$(JAVA_COMPILER) $(JAVA_CSWITCH) $<
	@cp -v $@ $(INSTALL_DIR)

# Class to class dependencies
Bar.class: Foo.class

# Braindead eNp-Ty make.exe workarounds
Bar.class: Bar.java
Foo.class: Foo.java

These last targets convince Gnu make to look for a file with the exact
case
given (The file is foo.java but NTFS says yes when Foo.java is asked
for)
and then follow through with the pattern rule build.

Note that the workaround isn't needed for EMX on Half-OS, because the
tools
there were designed to work inside the environment instead of against
it.

(If you're going to call on the "mount" command, why not just run the
Linux
kernel as a NT service? ;-)

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list