diff --git a/lldb/test/functionalities/fat_archives/Makefile b/lldb/test/functionalities/fat_archives/Makefile index 52d56e389ce8..e1832fdefbee 100644 --- a/lldb/test/functionalities/fat_archives/Makefile +++ b/lldb/test/functionalities/fat_archives/Makefile @@ -10,5 +10,5 @@ all: clean $(CC) -o a.out main.o -L. -la clean: - rm -rf a.o a.out liba-i386.a liba-x86_64.a liba.a *un~ .*un~ main.o *.pyc + rm -rf a.o a.out liba-i386.a liba-x86_64.a liba.a $(wildcard *un~ .*un~ main.o *.pyc) diff --git a/lldb/test/functionalities/load_unload/Makefile b/lldb/test/functionalities/load_unload/Makefile index 062df022a60d..d8fd461c34c3 100644 --- a/lldb/test/functionalities/load_unload/Makefile +++ b/lldb/test/functionalities/load_unload/Makefile @@ -76,4 +76,4 @@ d.o: d.c $(CC) $(CFLAGS) -c d.c clean: - rm -rf *.o *~ *.dylib *.so a.out *.dSYM hidden/* + rm -rf $(wildcard *.o *~ *.dylib *.so a.out *.dSYM hidden/*) diff --git a/lldb/test/macosx/indirect_symbol/Makefile b/lldb/test/macosx/indirect_symbol/Makefile index 41819033acc9..07aa39eac3be 100644 --- a/lldb/test/macosx/indirect_symbol/Makefile +++ b/lldb/test/macosx/indirect_symbol/Makefile @@ -45,4 +45,4 @@ $(LIB_REEXPORT): reexport.o $(LIB_INDIRECT) reexport.o: reexport.c $(CC) $(CFLAGS) -c reexport.c clean: - rm -rf *.o *~ *.dylib *.so a.out *.dSYM + rm -rf $(wildcard *.o *~ *.dylib *.so a.out *.dSYM) diff --git a/lldb/test/macosx/queues/Makefile b/lldb/test/macosx/queues/Makefile index d956512a2799..93f2f7b2f340 100644 --- a/lldb/test/macosx/queues/Makefile +++ b/lldb/test/macosx/queues/Makefile @@ -25,4 +25,4 @@ main.o: main.c $(CC) $(CFLAGS) -c main.c clean: - rm -rf *.o *~ *.dylib *.so a.out *.dSYM + rm -rf $(wildcard *.o *~ *.dylib *.so a.out *.dSYM) diff --git a/lldb/test/macosx/safe-to-func-call/Makefile b/lldb/test/macosx/safe-to-func-call/Makefile index d956512a2799..93f2f7b2f340 100644 --- a/lldb/test/macosx/safe-to-func-call/Makefile +++ b/lldb/test/macosx/safe-to-func-call/Makefile @@ -25,4 +25,4 @@ main.o: main.c $(CC) $(CFLAGS) -c main.c clean: - rm -rf *.o *~ *.dylib *.so a.out *.dSYM + rm -rf $(wildcard *.o *~ *.dylib *.so a.out *.dSYM) diff --git a/lldb/test/macosx/universal/Makefile b/lldb/test/macosx/universal/Makefile index f42aee9e3467..854c78ed8c29 100644 --- a/lldb/test/macosx/universal/Makefile +++ b/lldb/test/macosx/universal/Makefile @@ -16,4 +16,4 @@ testit.x86_64.o: main.c $(CC) -g -O0 -arch x86_64 -c -o testit.x86_64.o main.c clean: - rm -rf testit* *~ + rm -rf $(wildcard testit* *~) diff --git a/lldb/test/make/Makefile.rules b/lldb/test/make/Makefile.rules index 2c5d34fc3902..787f4c51274f 100644 --- a/lldb/test/make/Makefile.rules +++ b/lldb/test/make/Makefile.rules @@ -367,7 +367,7 @@ dsym: $(DSYM) all: $(EXE) $(DSYM) clean:: $(RM) "$(EXE)" $(OBJECTS) $(PREREQS) $(ARCHIVE_NAME) $(ARCHIVE_OBJECTS) - $(RM) -r *.d.[0-9] *.d.[0-9][0-9] *.d.[0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9][0-9] + $(RM) -r $(wildcard *.d.[0-9] *.d.[0-9][0-9] *.d.[0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9][0-9]) ifneq "$(DYLIB_NAME)" "" $(RM) -r $(DYLIB_FILENAME).dSYM $(RM) $(DYLIB_OBJECTS) $(DYLIB_PREREQS) $(DYLIB_FILENAME) $(DYLIB_FILENAME).debug