https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101834
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #10) > @@ -22,6 +22,7 @@ libexecdir := @libexecdir@ > target_noncanonical := @target_noncanonical@ > gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER) > libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) > +INSTALL := @INSTALL@ Without this, the 'all' target in c++tools is broken. It only works as part of a bootstrap because the top-level Makefile sets INSTALL in the environment when recursively calling 'make -C c++tools all' > INSTALL_PROGRAM := @INSTALL_PROGRAM@ > INSTALL_STRIP_PROGRAM := $(srcdir)/../install-sh -c -s > AUTOCONF := @AUTOCONF@ > @@ -41,13 +42,14 @@ all:: > mostlyclean:: > rm -f $(MAPPER.O) > > -clean:: > +clean:: mostlyclean > rm -f g++-mapper-server$(exeext) > > -distclean:: > - rm -f config.log config.status config.h > +distclean:: clean > + rm -f config.log config.status config.h config.cache Makefile > + rm -f $(MAPPER.O:%.o=%.d) > > -maintainer-clean:: > +maintainer-clean:: distclean These ensure the clean targets progressively clean more, instead of only removing disjoint sets of files, so that all the *clean targets need to be run to clean up properly. > @@ -132,6 +134,6 @@ config.h: config.status config.h.in > config.status: $(srcdir)/configure $(srcdir)/config.h.in > if test -x $@; then ./$@ -recheck; else $< @configure_args@; fi > > -.PHONY: all check clean distclean maintainer-clean > +.PHONY: all check mostlyclean clean distclean maintainer-clean And this was just missing. There might be other problems, but this means that "make distclean" works, and you can also do "make clean all" in the c++tools dir (rather than only being able to build c++tools from the top-level).