Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2004-08

make clean does not remove .o files

3 messages · 1 person · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vincent Snijders

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?

BTW, is there a natural order in the sections of a Makefile.fpc? The manual lists them alphabeticly, the makefile.exm in the utils/fpcm directory is not complete: no [clean], [install], [prerules] section.

Regards,
Vincent.

Vincent Snijders
to Vincent Snijders
Show quoted text 12 lines
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.

Vincent Snijders
to Vincent Snijders
Show quoted text 17 lines
On Sat, 7 Aug 2004 22:06:51 +0200 Vincent Snijders 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.

In case anybody is interested, I replaced the make from the fpc distribution with the lasted mingw32-make.exe and it correctly interprets the wildchar makefile command(?).

I would like to suggest that fpc updates the make utility, it distributes with its releases.

Regards,
Vincent.