Makefile Targets

Below are some empirical definitions of what each of the "standard" Makefile targets (clean, realclean, distclean and uninstall) should do:

  1. make clean - removes core, *.o, *~, a.out, *.orig, *.rej plus any other files created by the building of the program(s) (except of course the executable(s))
  2. make realclean - does make clean plus it removes the executables from the build directory
  3. make distclean - does make realclean plus removes Makefile, config.* files, C source files produced by configure and so on. Basically, after distclean only the originally distributed files should be left behind
  4. make uninstall - delete all installed files created by the install target. That's all, and doesn't depend on any of the other targets, so not actually as serious as it sounds.

So in principle the complete clean-up-for-starting-over prescription is (in top CCP4 directory) to do:

> make uninstall
> make distclean
(You can't do it the other way around because distclean zaps the Makefiles.)

In practice there are some problems, some of which I've fixed - but the worst offender (x-windows directories) still get into a bit of a tiz. So the above prescription won't necessarily hold for the x progs (some of which seem to change the distributed files anyway). Probably not so important.

Peter Briggs 14th Dec 2000