Open Bug 520823 Opened 15 years ago Updated 2 years ago

Clean up the cleanup targets: clean/realclean/clobber/clobber_all/distclean

Categories

(Firefox Build System :: General, defect)

x86
Linux
defect

Tracking

(Not tracked)

People

(Reporter: benjamin, Unassigned)

References

Details

I know what `clean` does: it's supposed to remove all generated object files, but not makefiles.

I know what `distclean` does: it's supposed to remove everything that was not originally in the source package: this includes generated makefiles and other miscellaneous build support.

I don't know what `realclean` does.

I think that `clobber` is a synonym for `clean`. I think that `clobber_all` is a synonym for `realclean`.

I'd like this to be simpler. Ideally just the standard `clean` and `distclean` targets, unless there's some really good reason to have `realclean` as well.

Also, when we forward stuff to other build systems (NSPR, ctypes), we should make sure that we only pass standard targets. So even if we have a `realclean` target, we should just call `make -C nsprpub clean`. This bit the ctypes build with PGO on linux, where we're trying to call the clobber_all target in ctypes (which doesn't exist).

Mitch, is this something you can look into?
Hard though it is to believe, the actual situation seems to be *more* complex than that.

In our part of the world, we always have a single target for "clean clobber clobber_all realclean" so they're actually all synonyms of each other. However, nsprpub/ has separate clean, clobber, and realclean/clobber_all targets, and security/coreconf has separate clean/clobber and realclean/clobber_all targets.

Then for maximum fun, |client.mk clobber| and |client.mk clobber_all| are actually |make clean|, so you probably actually get different results (in nsprpub) from |client.mk clobber_all| and |make clobber_all|.

Also fun: cleansrcdir, which is distclean if you have $(TOPSRCDIR)/Makefile, and a hand-rolled distclean if you don't.
Blocks: 520704
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.