[01/10] Make mostlyclean an alias for clean

Message ID 20210408203312.2938165-2-tom@tromey.com
State New
Headers show
Series
  • sim build improvements
Related show

Commit Message

Tom Tromey April 8, 2021, 8:33 p.m.
I found out by accident that "mostlyclean" in a sim subdir removes all
the configure artifacts.  The usual rule is:

* If the maintainer built it, maintainer-clean should remove it;
* If configure built it, distclean should remove it;
* If make built it, "clean" should remove it;
* If there is a handy subset of "clean" that is "easy" to rebuild,
  "mostlyclean" should remove it; otherwise mostlyclean should be an
  alias for clean

This patch makes mostlyclean an alias for clean.

sim/common/ChangeLog
2021-04-07  Tom Tromey  <tom@tromey.com>

	* Make-common.in (mostlyclean): Now an alias for clean, not
	distclean.
---
 sim/common/ChangeLog      | 5 +++++
 sim/common/Make-common.in | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

-- 
2.26.2

Comments

Aktemur, Tankut Baris via Gdb-patches April 9, 2021, 12:25 a.m. | #1
On 08 Apr 2021 14:33, Tom Tromey wrote:
> I found out by accident that "mostlyclean" in a sim subdir removes all

> the configure artifacts.  The usual rule is:

> 

> * If the maintainer built it, maintainer-clean should remove it;

> * If configure built it, distclean should remove it;

> * If make built it, "clean" should remove it;

> * If there is a handy subset of "clean" that is "easy" to rebuild,

>   "mostlyclean" should remove it; otherwise mostlyclean should be an

>   alias for clean

> 

> This patch makes mostlyclean an alias for clean.


lgtm, thanks
-mike

Patch

diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 28f50abb220..34e8d5c5298 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -504,7 +504,7 @@  TAGS: force
 	etags --regex '/^\([[:lower:]_]+\) (/\1/' --regex '/^\/[*] TAGS: .*/' \
 		*.[ch] ../common/*.[ch]
 
-clean: $(SIM_EXTRA_CLEAN)
+mostlyclean clean: $(SIM_EXTRA_CLEAN)
 	rm -f *.[oa] *~ core
 	rm -f run$(EXEEXT) libsim.a
 	rm -f gentmap targ-map.c targ-vals.h stamp-tvals
@@ -513,7 +513,7 @@  clean: $(SIM_EXTRA_CLEAN)
 	fi
 	rm -f tmp-mloop.hin tmp-mloop.h tmp-mloop.cin tmp-mloop.c
 
-distclean mostlyclean maintainer-clean realclean: clean $(SIM_EXTRA_DISTCLEAN)
+distclean maintainer-clean realclean: clean $(SIM_EXTRA_DISTCLEAN)
 	rm -f TAGS
 	rm -f Makefile config.cache config.log config.status .gdbinit
 	rm -f config.h stamp-h