From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 211C23850854; Thu, 30 Mar 2023 12:00:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 211C23850854 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680177654; bh=Ycc/2de52M96XLbDHdPhQuzz3TbGuagZWZgxXZOK01Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=X+9smwi0aCZtTcpqzG7kD7MiNHacgie207u69khG7jXgr9T3m2K8MkjHgK2QPzsYk +nZcWndmAHJ0veB4tFGEB5QDrMC++40srD0iNm3zHmA3h4+nHPug0yH5oH0bbD7dxI c7/gh7hKvx00vFJDOIZPYFvULCC0c87z8pUo+7iA= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/101834] make distclean forgets ./c++tools/ Date: Thu, 30 Mar 2023 12:00:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101834 --- Comment #11 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #10) > @@ -22,6 +22,7 @@ libexecdir :=3D @libexecdir@ > target_noncanonical :=3D @target_noncanonical@ > gcc_version :=3D $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER) > libexecsubdir :=3D $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_versio= n) > +INSTALL :=3D @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 :=3D @INSTALL_PROGRAM@ > INSTALL_STRIP_PROGRAM :=3D $(srcdir)/../install-sh -c -s > AUTOCONF :=3D @AUTOCONF@ > @@ -41,13 +42,14 @@ all:: > mostlyclean:: > rm -f $(MAPPER.O) >=20=20 > -clean:: > +clean:: mostlyclean > rm -f g++-mapper-server$(exeext) >=20=20 > -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=3D%.d) >=20=20 > -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 >=20=20 > -.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).=