At 4:26 PM +0200 11/7/03, Adriaan van Os wrote:
With explicit unit filename:
program T; uses FoO in 'FoO.pas'; begin end.
gpc --automake --progress-messages --debug-automake t.pas checking recompilation of `FoO' in `foo.gpi': GPC automake: gpc --automake --progress-messages --debug-automake --amtmpfile=/var/tmp//ccACCt9S.gpa -M -o /var/tmp//cclbeV9K FoO.pas GPC automake: done GPC automake: adding to automake temp file: #up to date: foo.gpi all checks passed: 0 GPC automake: adding to automake temp file: FoO.o
Without explicit unit filename:
program T; uses FoO; begin end.
gpc --automake --progress-messages --debug-automake t.pas checking recompilation of `FoO' in `foo.gpi': GPC automake: gpc --automake --progress-messages --debug-automake --amtmpfile=/var/tmp//cccndV3t.gpa -M -o /var/tmp//ccJkkOUx foo.pas GPC automake: done GPC automake: adding to automake temp file: #up to date: foo.gpi all checks passed: 0 GPC automake: adding to automake temp file: foo.o
Note that compilation is too fast to test --progress-messages, but I am pretty sure that with explicit unit filename the progress-message will list "FoO.pas", without "foo.pas".
This is probably because the compiler is using the file name "foo.pas", and that is working fine because of Mac OS X's case insensitive file system. On a case sensitive file system, the compiler would presumably get an error "foo.pas file not found".
The only way for the compiler to get the right would be for it to look up the name in the directory listing, which is not something that would make sense on any other platform (at least any platform that does not have a case insensitive file system).
Probably the best solution is to look up the file name yourself to correct the case - convert the file name to an FSRef and back to a file name should probably do the trick.
Enjoy, Peter.