Browse Source

[Make] Consistently use $(RM) instead of rm -f

Isaku Yamahata 4 years ago
parent
commit
df358b8ba8

+ 4 - 4
LibOS/Makefile

@@ -97,7 +97,7 @@ endif
 GLIBC_PATCHES += $(GLIBC_PATCHES_$(GLIBC_VERSION))
 
 $(GLIBC_SRC)/configure: $(GLIBC_PATCHES) $(GLIBC_SRC).tar.gz
-	rm -rf $(GLIBC_SRC)
+	$(RM) -r $(GLIBC_SRC)
 	tar -xzf $(GLIBC_SRC).tar.gz
 	cd $(GLIBC_SRC) && \
 	for p in $(GLIBC_PATCHES); do \
@@ -117,7 +117,7 @@ $(GLIBC_SRC)/dlfcn/Versions: $(GLIBC_SRC)/configure
 
 .PHONY: clean_
 clean_:
-	rm -rf $(BUILD_DIR) $(GLIBC_SRC) build.log
+	$(RM) -r $(BUILD_DIR) $(GLIBC_SRC) build.log
 
 .PHONY: clean
 clean: clean_
@@ -126,7 +126,7 @@ clean: clean_
 .PHONY: distclean
 distclean: clean_
 	$(MAKE) -C $(SHIM_DIR) distclean
-	rm -f $(GLIBC_SRC).tar.gz
+	$(RM) $(GLIBC_SRC).tar.gz
 
 else
 .IGNORE: $(GLIBC_TARGET)
@@ -134,7 +134,7 @@ $(GLIBC_TARGET):
 
 .PHONY: clean
 clean:
-	rm -rf $(BUILD_DIR)
+	$(RM) -r $(BUILD_DIR)
 
 .PHONY: distclean
 distclean: clean

+ 3 - 3
LibOS/shim/src/Makefile

@@ -121,9 +121,9 @@ CLEAN_FILES += vdso/vdso.so.dbg vdso/vdso.so vdso/.vdso-linked-for-reloc-check.s
 
 .PHONY: clean
 clean:
-	rm -rf $(addsuffix .o,$(all_objs)) $(addsuffix .d,$(all_objs)) \
-	       $(addsuffix .i.d,$(all_objs)) $(addsuffix .s.d,$(all_objs)) \
-	       $(shim_target) $(files_to_build) .lib $(CLEAN_FILES)
+	$(RM) -r $(addsuffix .o,$(all_objs)) $(addsuffix .d,$(all_objs)) \
+	         $(addsuffix .i.d,$(all_objs)) $(addsuffix .s.d,$(all_objs)) \
+	         $(shim_target) $(files_to_build) .lib $(CLEAN_FILES)
 
 ifeq ($(filter %clean,$(MAKECMDGOALS)),)
 -include $(addsuffix .d,$(all_objs)) $(addsuffix .i.d,$(all_objs)) $(addsuffix .s.d,$(all_objs))

+ 1 - 1
LibOS/shim/test/fs/Makefile

@@ -41,4 +41,4 @@ fs-test.xml: test_fs.py $(call expand_target_to_token,$(target))
 
 .PHONY: clean-tmp
 clean-tmp:
-	rm -rf *.tmp *.cached *.manifest.sgx *~ *.sig *.token *.o __pycache__ .pytest_cache .cache *.xml
+	$(RM) -r *.tmp *.cached *.manifest.sgx *~ *.sig *.token *.o __pycache__ .pytest_cache .cache *.xml

+ 1 - 1
LibOS/shim/test/regression/Makefile

@@ -45,4 +45,4 @@ libos-regression.xml: test_libos.py $(call expand_target_to_token,$(target))
 
 .PHONY: clean-tmp
 clean-tmp:
-	rm -rf *.tmp *.cached *.manifest.sgx *~ *.sig *.token .cache __pycache__ libos-regression.xml testfile tmp/*
+	$(RM) -r *.tmp *.cached *.manifest.sgx *~ *.sig *.token .cache __pycache__ libos-regression.xml testfile tmp/*

+ 1 - 1
Pal/lib/Makefile

@@ -87,7 +87,7 @@ endif
 
 .PHONY: clean
 clean:
-	rm -f $(objs) graphene-lib.a
+	$(RM) $(objs) graphene-lib.a
 
 .PHONY: distclean
 distclean: clean

+ 1 - 1
Pal/src/Makefile

@@ -137,7 +137,7 @@ $(clean_targets): clean_
 	@[ ! -d $(HOST_DIR) ] || $(MAKE) -C $(HOST_DIR) $@
 
 clean_:
-	rm -rf $(LIB_DIR) $(OBJ_DIR) $(files_to_build) *.d
+	$(RM) -r $(LIB_DIR) $(OBJ_DIR) $(files_to_build) *.d
 
 .PHONY: test
 test:

+ 3 - 3
Pal/src/host/Linux-SGX/Makefile

@@ -95,8 +95,8 @@ CLEAN_FILES += quote/generated-cacert.h
 
 .PHONY: clean_
 clean_:
-	rm -rf *.o *.e *.i *.s $(host_files) $(CLEAN_FILES) *.d debugger/*.d signer/*.pyc __pycache__ \
-	       signer/__pycache__
+	$(RM) -r *.o *.e *.i *.s $(host_files) $(CLEAN_FILES) *.d debugger/*.d signer/*.pyc __pycache__ \
+	         signer/__pycache__
 
 .PHONY: clean
 clean: clean_
@@ -104,7 +104,7 @@ clean: clean_
 
 .PHONY: distclean
 distclean: clean_
-	rm -f $(ias_cert_file)
+	$(RM) $(ias_cert_file)
 	$(MAKE) -C sgx-driver $@
 
 .PHONY: test

+ 1 - 1
Pal/src/host/Linux/Makefile

@@ -47,7 +47,7 @@ CLEAN_FILES += $(notdir $(pal_static) $(pal_lib) $(pal_sec) $(pal_loader))
 
 .PHONY: clean
 clean:
-	rm -f $(addsuffix .o,$(objs)) $(host_files) $(CLEAN_FILES) \
+	$(RM) $(addsuffix .o,$(objs)) $(host_files) $(CLEAN_FILES) \
 	      $(addsuffix .d,$(objs)) $(addsuffix .i.d,$(objs)) \
 	      $(addsuffix .s.d,$(objs))
 

+ 1 - 1
Pal/src/host/Skeleton/Makefile

@@ -29,7 +29,7 @@ include ../../../../Scripts/Makefile.rules
 
 .PHONY: clean
 clean:
-	rm -f $(addsuffix .o,$(objs)) $(addsuffix .d,$(objs)) $(host_files) $(pal_lib)
+	$(RM) $(addsuffix .o,$(objs)) $(addsuffix .d,$(objs)) $(host_files) $(pal_lib)
 
 .PHONY: distclean
 distclean: clean

+ 1 - 1
Runtime/Makefile

@@ -3,7 +3,7 @@ all:
 
 .PHONY: clean
 clean:
-	rm -f *.a *.o *.so *.so.* pal_gdb* pal-*
+	$(RM) *.a *.o *.so *.so.* pal_gdb* pal-*
 
 .PHONY: distclean
 distclean: clean

+ 1 - 1
Scripts/Makefile

@@ -3,7 +3,7 @@ all: ;
 
 .PHONY: clean
 clean:
-	rm -rf __pycache__
+	$(RM) -r __pycache__
 
 .PHONY: distclean
 distclean: clean