aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2018-09-24 10:44:34 -0700
committerPaul Eggert2018-09-24 10:45:07 -0700
commit36243179695a1711308e1d2f57c9ff847f3ef2d0 (patch)
treea89e0bad3013bc6787bdc20ecbebe59838009d89
parent662bee7d70ccd3903e123b08c7ec9108a1a2ce0b (diff)
downloademacs-36243179695a1711308e1d2f57c9ff847f3ef2d0.tar.gz
emacs-36243179695a1711308e1d2f57c9ff847f3ef2d0.zip
Fix ‘make clean’ with a file named ‘-.o’
Problem reported by T.V Raman in: https://lists.gnu.org/r/emacs-devel/2018-09/msg00866.html * Makefile.in (clean, extraclean): * doc/emacs/Makefile.in (mostlyclean): * doc/lispintro/Makefile.in (mostlyclean): * doc/lispref/Makefile.in (mostlyclean): * doc/misc/Makefile.in (mostlyclean, clean): * etc/refcards/Makefile (clean): * lib-src/Makefile.in (mostlyclean, extraclean): * lib/Makefile.in (clean): * lwlib/Makefile.in (clean mostlyclean): * oldXMenu/Makefile.in (clean mostlyclean): * src/Makefile.in (mostlyclean, extraclean): * test/Makefile.in (mostlyclean): Say ‘rm ./*.o’ instead of ‘rm *.o’ to avoid undesirable failure when a file name begins with ‘-’.
-rw-r--r--Makefile.in4
-rw-r--r--doc/emacs/Makefile.in4
-rw-r--r--doc/lispintro/Makefile.in4
-rw-r--r--doc/lispref/Makefile.in4
-rw-r--r--doc/misc/Makefile.in8
-rw-r--r--etc/refcards/Makefile2
-rw-r--r--lib-src/Makefile.in4
-rw-r--r--lib/Makefile.in2
-rw-r--r--lwlib/Makefile.in2
-rw-r--r--oldXMenu/Makefile.in2
-rw-r--r--src/Makefile.in6
-rw-r--r--test/Makefile.in2
12 files changed, 22 insertions, 22 deletions
diff --git a/Makefile.in b/Makefile.in
index 5ea48824bd3..c6b2cfa78af 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -839,7 +839,7 @@ $(foreach dir,$(clean_dirs),$(eval $(call submake_template,$(dir),clean)))
839clean: $(clean_dirs:=_clean) 839clean: $(clean_dirs:=_clean)
840 $(MAKE) -C admin/charsets $@ 840 $(MAKE) -C admin/charsets $@
841 [ ! -d test ] || $(MAKE) -C test $@ 841 [ ! -d test ] || $(MAKE) -C test $@
842 -rm -f *.tmp etc/*.tmp* 842 -rm -f ./*.tmp etc/*.tmp*
843 -rm -rf info-dir.* 843 -rm -rf info-dir.*
844 844
845### 'bootclean' 845### 'bootclean'
@@ -926,7 +926,7 @@ $(foreach dir,$(extraclean_dirs),$(eval $(call submake_template,$(dir),extraclea
926extraclean: $(extraclean_dirs:=_extraclean) 926extraclean: $(extraclean_dirs:=_extraclean)
927 ${top_maintainer_clean} 927 ${top_maintainer_clean}
928 -rm -f config-tmp-* 928 -rm -f config-tmp-*
929 -rm -f *~ \#* 929 -rm -f ./*~ \#*
930 930
931# The src subdir knows how to do the right thing 931# The src subdir knows how to do the right thing
932# even when the build directory and source dir are different. 932# even when the build directory and source dir are different.
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in
index 1da2f1550f9..54e173f8d67 100644
--- a/doc/emacs/Makefile.in
+++ b/doc/emacs/Makefile.in
@@ -206,8 +206,8 @@ doc-emacsver:
206 206
207## Temp files. 207## Temp files.
208mostlyclean: 208mostlyclean:
209 rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \ 209 rm -f ./*.aux ./*.log ./*.toc ./*.cp ./*.cps ./*.fn ./*.fns ./*.ky ./*.kys \
210 *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs 210 ./*.op ./*.ops ./*.pg ./*.pgs ./*.tp ./*.tps ./*.vr ./*.vrs
211 211
212## Products not in the release tarfiles. 212## Products not in the release tarfiles.
213clean: mostlyclean 213clean: mostlyclean
diff --git a/doc/lispintro/Makefile.in b/doc/lispintro/Makefile.in
index 71739fdb35f..e2a1229d5ca 100644
--- a/doc/lispintro/Makefile.in
+++ b/doc/lispintro/Makefile.in
@@ -109,8 +109,8 @@ emacs-lisp-intro.ps: emacs-lisp-intro.dvi
109.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean 109.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean
110 110
111mostlyclean: 111mostlyclean:
112 rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \ 112 rm -f ./*.aux ./*.log ./*.toc ./*.cp ./*.cps ./*.fn ./*.fns ./*.ky ./*.kys \
113 *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs 113 ./*.op ./*.ops ./*.pg ./*.pgs ./*.tp ./*.tps ./*.vr ./*.vrs
114 114
115clean: mostlyclean 115clean: mostlyclean
116 rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS) 116 rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS)
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index 98ca90a96d4..221f4f97f51 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -167,8 +167,8 @@ elisp.ps: elisp.dvi
167 167
168## [12] stuff is from two-volume.make. 168## [12] stuff is from two-volume.make.
169mostlyclean: 169mostlyclean:
170 rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \ 170 rm -f ./*.aux ./*.log ./*.toc ./*.cp ./*.cps ./*.fn ./*.fns ./*.ky ./*.kys \
171 *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs 171 ./*.op ./*.ops ./*.pg ./*.pgs ./*.tp ./*.tps ./*.vr ./*.vrs
172 rm -f elisp[12]* vol[12].tmp 172 rm -f elisp[12]* vol[12].tmp
173 173
174clean: mostlyclean 174clean: mostlyclean
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 11086b33037..fd07ea4ca13 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -224,13 +224,13 @@ ${buildinfodir}/tramp.info tramp.html: ${srcdir}/trampver.texi
224.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean 224.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
225 225
226mostlyclean: 226mostlyclean:
227 rm -f *.aux *.log *.toc *.c[mp] *.c[mp]s *.fn *.fns \ 227 rm -f ./*.aux ./*.log ./*.toc ./*.c[mp] ./*.c[mp]s ./*.fn ./*.fns \
228 *.ky *.kys *.op *.ops *.p[gj] *.p[gj]s *.sc *.scs *.ss \ 228 ./*.ky ./*.kys ./*.op ./*.ops ./*.p[gj] ./*.p[gj]s ./*.sc ./*.scs ./*.ss \
229 *.t[gp] *.t[gp]s *.vr *.vrs 229 ./*.t[gp] ./*.t[gp]s ./*.vr ./*.vrs
230 rm -f gnustmp* 230 rm -f gnustmp*
231 231
232clean: mostlyclean 232clean: mostlyclean
233 rm -f *.dvi *.html *.pdf *.ps 233 rm -f ./*.dvi ./*.html ./*.pdf ./*.ps
234 234
235distclean: clean 235distclean: clean
236 rm -f Makefile 236 rm -f Makefile
diff --git a/etc/refcards/Makefile b/etc/refcards/Makefile
index b61ff5f8032..a3c8e551722 100644
--- a/etc/refcards/Makefile
+++ b/etc/refcards/Makefile
@@ -311,7 +311,7 @@ viperCard.dvi: $(vipercard_deps)
311.PHONY: clean 311.PHONY: clean
312 312
313clean: 313clean:
314 -rm -f *.dvi *.log *.aux 314 -rm -f ./*.dvi ./*.log ./*.aux
315 315
316distclean: clean 316distclean: clean
317 317
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index b2b901788a5..ecb9208a1cd 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -334,7 +334,7 @@ uninstall:
334 fi 334 fi
335 335
336mostlyclean: 336mostlyclean:
337 rm -f core *.o *.res 337 rm -f core ./*.o ./*.res
338 338
339clean: mostlyclean 339clean: mostlyclean
340 rm -f ${EXE_FILES} 340 rm -f ${EXE_FILES}
@@ -345,7 +345,7 @@ distclean: clean
345bootstrap-clean maintainer-clean: distclean 345bootstrap-clean maintainer-clean: distclean
346 346
347extraclean: maintainer-clean 347extraclean: maintainer-clean
348 rm -f *~ \#* 348 rm -f ./*~ \#*
349 349
350## Test the contents of the directory. 350## Test the contents of the directory.
351check: 351check:
diff --git a/lib/Makefile.in b/lib/Makefile.in
index b26db27423d..7dba31be711 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -118,7 +118,7 @@ TAGS: $(ETAGS) $(tagsfiles)
118.PHONY: $(ETAGS) tags 118.PHONY: $(ETAGS) tags
119 119
120clean: 120clean:
121 rm -f *.[ao] *-t \#* $(DEPDIR)/* 121 rm -f ./*.[ao] ./*-t \#* $(DEPDIR)/*
122mostlyclean: clean 122mostlyclean: clean
123 rm -f $(filter-out %-t,$(MOSTLYCLEANFILES)) 123 rm -f $(filter-out %-t,$(MOSTLYCLEANFILES))
124distclean bootstrap-clean: mostlyclean 124distclean bootstrap-clean: mostlyclean
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in
index 6bd26083816..ed71270a771 100644
--- a/lwlib/Makefile.in
+++ b/lwlib/Makefile.in
@@ -111,7 +111,7 @@ $(globals_h):
111.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean 111.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
112 112
113clean mostlyclean: 113clean mostlyclean:
114 rm -f *.o liblw.a \#* $(DEPDIR)/* 114 rm -f ./*.o liblw.a \#* $(DEPDIR)/*
115 115
116distclean: clean 116distclean: clean
117 rm -f Makefile 117 rm -f Makefile
diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in
index d795038797a..211bac97ee4 100644
--- a/oldXMenu/Makefile.in
+++ b/oldXMenu/Makefile.in
@@ -138,7 +138,7 @@ libXMenu11.a: $(OBJS) $(EXTRA)
138.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean 138.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
139 139
140clean mostlyclean: 140clean mostlyclean:
141 rm -f libXMenu11.a *.o $(DEPDIR)/* 141 rm -f libXMenu11.a ./*.o $(DEPDIR)/*
142 142
143bootstrap-clean maintainer-clean distclean: clean 143bootstrap-clean maintainer-clean distclean: clean
144 rm -f Makefile 144 rm -f Makefile
diff --git a/src/Makefile.in b/src/Makefile.in
index 7d9c2361a9b..72f568988a8 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -645,12 +645,12 @@ ns-app: emacs$(EXEEXT)
645.PHONY: versionclean extraclean 645.PHONY: versionclean extraclean
646 646
647mostlyclean: 647mostlyclean:
648 rm -f temacs$(EXEEXT) core *.core \#* *.o 648 rm -f temacs$(EXEEXT) core ./*.core \#* ./*.o
649 rm -f ../etc/DOC 649 rm -f ../etc/DOC
650 rm -f bootstrap-emacs$(EXEEXT) emacs-$(version)$(EXEEXT) 650 rm -f bootstrap-emacs$(EXEEXT) emacs-$(version)$(EXEEXT)
651 rm -f buildobj.h 651 rm -f buildobj.h
652 rm -f globals.h gl-stamp 652 rm -f globals.h gl-stamp
653 rm -f *.res *.tmp 653 rm -f ./*.res ./*.tmp
654clean: mostlyclean 654clean: mostlyclean
655 rm -f emacs-*.*.*[0-9]$(EXEEXT) emacs$(EXEEXT) $(DEPDIR)/* 655 rm -f emacs-*.*.*[0-9]$(EXEEXT) emacs$(EXEEXT) $(DEPDIR)/*
656 656
@@ -674,7 +674,7 @@ maintainer-clean: distclean
674versionclean: 674versionclean:
675 -rm -f emacs$(EXEEXT) emacs-*.*.*[0-9]$(EXEEXT) ../etc/DOC* 675 -rm -f emacs$(EXEEXT) emacs-*.*.*[0-9]$(EXEEXT) ../etc/DOC*
676extraclean: distclean 676extraclean: distclean
677 -rm -f *~ \#* 677 -rm -f ./*~ \#*
678 678
679 679
680ETAGS = ../lib-src/etags${EXEEXT} 680ETAGS = ../lib-src/etags${EXEEXT}
diff --git a/test/Makefile.in b/test/Makefile.in
index a1f43882881..adb316c3d9c 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -307,7 +307,7 @@ endif
307 307
308mostlyclean: 308mostlyclean:
309 -@for f in ${LOGFILES}; do test ! -f $$f || mv $$f $$f~; done 309 -@for f in ${LOGFILES}; do test ! -f $$f || mv $$f $$f~; done
310 rm -f *.tmp 310 rm -f ./*.tmp
311 311
312clean: 312clean:
313 find . '(' -name '*.log' -o -name '*.log~' ')' $(FIND_DELETE) 313 find . '(' -name '*.log' -o -name '*.log~' ')' $(FIND_DELETE)