From: Jarkko Hietaniemi Date: Sat, 19 Aug 2000 15:34:04 +0000 (+0000) Subject: Introduce a 'veryclean' target that is like 'distclean' X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2edbd6dac2bb2abcd4bc2c6669162b31938fd4fd;p=p5sagit%2Fp5-mst-13.2.git Introduce a 'veryclean' target that is like 'distclean' but also removes *~ and *.orig. p4raw-id: //depot/perl@6714 --- diff --git a/Makefile.SH b/Makefile.SH index f7ebb42..4a48ded 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -676,14 +676,18 @@ n_dummy $(nonxs_ext): miniperl preplibrary $(DYNALOADER) FORCE clean: _tidy _mopup -realclean: _cleaner _mopup +realclean: _realcleaner _mopup @echo "Note that make realclean does not delete config.sh or Policy.sh" -clobber: _cleaner _mopup +clobber: _realcleaner _mopup rm -f config.sh cppstdin Policy.sh + -@rm -f Obsolete Wanted distclean: clobber +# Like distclean but also removes emacs backups and *.orig. +veryclean: _verycleaner _mopup + # Do not 'make _mopup' directly. _mopup: rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c @@ -704,15 +708,16 @@ _tidy: done rm -f testcompile compilelog -# Do not 'make _cleaner' directly. -_cleaner: +_cleaner1: -cd os2; rm -f Makefile - -cd pod; $(LDLIBPTH) $(MAKE) realclean - -cd utils; $(LDLIBPTH) $(MAKE) realclean - -cd x2p; $(LDLIBPTH) $(MAKE) realclean + -cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN) + -cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN) + -cd x2p; $(LDLIBPTH) $(MAKE) $(CLEAN) -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \ - $(LDLIBPTH) sh ext/util/make_ext realclean $$x MAKE=$(MAKE) ; \ + $(LDLIBPTH) sh ext/util/make_ext $(CLEAN) $$x MAKE=$(MAKE) ; \ done + +_cleaner2: rm -f core core.*perl.*.? *perl.core t/core t/core.perl.*.? t/*perl.core t/misctmp* t/forktmp* t/tmp* t/c t/perl .?*.c so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR) rm -rf $(addedbyconf) rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old @@ -724,6 +729,15 @@ _cleaner: rm -f testcompile compilelog -rmdir lib/B lib/Data lib/IO/Socket lib/IO lib/Sys +_realcleaner: + @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=realclean + @$(LDLIBPTH) $(MAKE) _cleaner2 + +_verycleaner: + @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=veryclean + @$(LDLIBPTH) $(MAKE) _cleaner2 + -rm -f *~ *.orig */*~ */*.orig + # The following lint has practically everything turned on. Unfortunately, # you have to wade through a lot of mumbo jumbo that can't be suppressed. # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 8e337d9..c55cc0a 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -812,7 +812,7 @@ DIST_DEFAULT = $dist_default =item dist_basics (o) -Defines the targets distclean, distcheck, skipcheck, manifest. +Defines the targets distclean, distcheck, skipcheck, manifest, veryclean. =cut @@ -840,6 +840,11 @@ manifest : $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=mkmanifest \\ -e mkmanifest }; + + push @m, q{ +veryclean : realclean + $(RM_F) *~ *.orig */*~ */*.orig +}; join "", @m; } diff --git a/pod/Makefile.SH b/pod/Makefile.SH index 45f1856..1471bb7 100644 --- a/pod/Makefile.SH +++ b/pod/Makefile.SH @@ -122,6 +122,9 @@ realclean: clean distclean: realclean +veryclean: distclean + -rm -f *~ *.orig + check: checkpods @echo "checking..."; \ $(PERL) -I../lib checkpods $(POD) diff --git a/utils/Makefile b/utils/Makefile index 944cbe8..95d286e 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -44,3 +44,6 @@ realclean: clobber: realclean distclean: clobber + +veryclean: distclean + -rm -f *~ *.org diff --git a/x2p/Makefile.SH b/x2p/Makefile.SH index ce5c46c..be09401 100755 --- a/x2p/Makefile.SH +++ b/x2p/Makefile.SH @@ -138,6 +138,9 @@ realclean: clean rm -f core $(addedbyconf) all malloc.c rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old +veryclean: realclean + rm -f *~ *.orig + # The following lint has practically everything turned on. Unfortunately, # you have to wade through a lot of mumbo jumbo that can't be suppressed. # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message