Web lists-archives.com

Re: [Mingw-msys] Reconstruction of MSYS-1.0.11 test results.




Hello,

I uploaded a new `cpmake' binary to the MSYS download page:
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=24963&release_id=46827

`cpmake' tries to be a compromise between a full case-insensitive make 
and a full case-sensitive one. When searching for file names in the 
filesystem, a case insensitive match will be performed, but only if a 
case sensitive match is not found first. In a related change, `cpmake' 
avoids normalizing targets and file names to lowercase, i.e. `cpmake' is 
internally case-preserving as well.

Hopefully, those with case-insensitive build systems can replace `make' 
  with `cpmake' with little difficulty. If this is confirmed, it could 
become the default `make' on MSYS.

Below, a makefile with both case sensitive and insensitive rules, which 
`cpmake' is well capable of handling.

==== Begin Makefile ====
SRCDIR=..
VPATH=$(SRCDIR)

SOURCE=$(SRCDIR)/A.IN $(SRCDIR)/MixEd.ext $(SRCDIR)/lower.x 
$(SRCDIR)/upper.X

all: ci cs

# Case insensitive targets
ci: a.out mixed.out

# Case sensitive targets
cs: lower.out upper.out
cs: Hello HELLO

# Begin case-insensitive rules
prep::
	touch $(SRCDIR)/A.IN
	touch $(SRCDIR)/MixEd.ext
%.out: %.in
	cp $< $@
mixed.out: mixed.ext
	cp $< $@

# Begin case-sensitive rules
prep::
	touch $(SRCDIR)/lower.x
	touch $(SRCDIR)/upper.X
%.out: %.x
	@echo Using lower-case rule
	cp $< $@
%.out: %.X
	@echo Using upper-case rule
	cp $< $@

Hello:
	@echo $@
HELLO:
	@echo $@

clean:
	rm -f *.out

distclean: clean
	rm -f $(SOURCE)

==== Makefile end ====


How to test:
1) Place the makefile in a subdirectory.
2) run `cpmake prep'
touch ../A.IN
touch ../MixEd.ext
touch ../lower.x
touch ../upper.X
3) run `cpmake'
cp ../a.in a.out
cp ../mixed.ext mixed.out
Using lower-case rule
cp ../lower.x lower.out
Using upper-case rule
cp ../upper.X upper.out
Hello
HELLO

Regards,
Cesar


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mingw-msys mailing list
Mingw-msys@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/mingw-msys