[fpc-pascal]make clean does not remove .o files

Vincent Snijders vslist at zonnet.nl
Sun Aug 8 00:09:43 CEST 2004


On Sat, 7 Aug 2004 22:06:51 +0200
Vincent Snijders <vslist at zonnet.nl> wrote:

> Hi,
> 
> If I do make clean in for example the fcl/db/dbase or fcl/image all ppu files are removed, but not the .o files. I tried to find out, how this can be fixed.
> 
> A Makefile contains these two lines:
> override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
> 
> override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
> 
> Since I very new to reading make files, I don't know what the wildcard in the CLEANPPULINKFILES is suposed to do.If I remove it .o files are removed.
> 
> Is it correct to remove the wildcard?
I did some further research. The wildcard is used so that only existing files are removed. I had no .o files for the fpImage units, so no rm statement was generated and I thought they were not removed. The output from fcl/image IS removed.

The .o files for fcl/db/dbase are also removed on linux, but not on windows. I suspect the following scenario (Dbf_Common as example unit):
The Dbf_Common is compiled and dbf_common.ppu and dbf_common.o is created (note that the file names are lower cased).
CLEANPPULINKFILES originally contains Dbf_Common.o, but since it is not found in the file listing, it is removed and CLEANPPULINKFILES becomes empty.

Why does fpc make the names of the .ppu and .o lowercase? It might be better if it follows the name of the unit the same way as in linux.

Regards,
Vincent.




More information about the fpc-pascal mailing list