[Mesa-dev] [PATCH] mesa: automake: replace $(RM) with rm -f

Jonathan Gray jsg at jsg.id.au
Sat Jul 18 15:13:40 PDT 2015


$(RM) is set to 'rm -f' by GNU make, this is not true of other versions
of make and RM is not one of the macros required by POSIX.

Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
---
 Makefile.am                           | 2 +-
 src/gallium/targets/dri/Makefile.am   | 6 +++---
 src/gallium/targets/vdpau/Makefile.am | 6 +++---
 src/gallium/targets/xvmc/Makefile.am  | 4 ++--
 src/glsl/Makefile.am                  | 6 +++---
 src/mesa/drivers/dri/Makefile.am      | 8 ++++----
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 9f49ce6..6243b4d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -58,4 +58,4 @@ noinst_HEADERS = \
 # We list some directories in EXTRA_DIST, but don't actually want to include
 # the .gitignore files in the tarball.
 dist-hook:
-	find $(distdir) -name .gitignore -exec $(RM) {} +
+	find $(distdir) -name .gitignore -exec rm -f {} +
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index 7c86ea1..e047f33 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -117,7 +117,7 @@ all-local: $(dri_LTLIBRARIES)
 clean-local:
 	$(AM_V_GEN)link_dir=$(top_builddir)/$(LIB_DIR)/gallium;         \
 	$(AM_V_GEN)for i in $(TARGET_DRIVERS); do                       \
-		$(RM) $${link_dir}/$${i}_dri.so;                        \
+		rm -f $${link_dir}/$${i}_dri.so;                        \
 	done;
 endif
 
@@ -128,9 +128,9 @@ install-data-hook:
 		ln -f $(DESTDIR)$(dridir)/gallium_dri.so                \
 		      $(DESTDIR)$(dridir)/$${i}_dri.so;                 \
 	done;                                                           \
-	$(RM) $(DESTDIR)$(dridir)/gallium_dri.*
+	rm -f $(DESTDIR)$(dridir)/gallium_dri.*
 
 uninstall-hook:
 	for i in $(TARGET_DRIVERS); do                                  \
-		$(RM) $(DESTDIR)$(dridir)/$${i}_dri.so;                 \
+		rm -f $(DESTDIR)$(dridir)/$${i}_dri.so;                 \
 	done;
diff --git a/src/gallium/targets/vdpau/Makefile.am b/src/gallium/targets/vdpau/Makefile.am
index 7eb62c1..67d8cac 100644
--- a/src/gallium/targets/vdpau/Makefile.am
+++ b/src/gallium/targets/vdpau/Makefile.am
@@ -97,7 +97,7 @@ all-local: $(vdpau_LTLIBRARIES)
 clean-local:
 	$(AM_V_GEN)link_dir=$(top_builddir)/$(LIB_DIR)/gallium;		\
 	$(AM_V_GEN)for i in $(TARGET_DRIVERS); do			\
-		$(RM) $${link_dir}/libvdpau_$${i}.so{,.$(VDPAU_MAJOR){,.$(VDPAU_MINOR){,.0}}}; \
+		rm -f $${link_dir}/libvdpau_$${i}.so{,.$(VDPAU_MAJOR){,.$(VDPAU_MINOR){,.0}}}; \
 	done;
 endif
 
@@ -118,9 +118,9 @@ install-data-hook:
 		ln -sf $${l}						\
 		       $${dest_dir}/$${k};				\
 	done;								\
-	$(RM) $${dest_dir}/libvdpau_gallium.*
+	rm -f $${dest_dir}/libvdpau_gallium.*
 
 uninstall-hook:
 	for i in $(TARGET_DRIVERS); do					\
-		$(RM) $(DESTDIR)$(vdpaudir)/libvdpau_$${i}.so{,.$(VDPAU_MAJOR){,.$(VDPAU_MINOR){,.0}}}; \
+		rm -f $(DESTDIR)$(vdpaudir)/libvdpau_$${i}.so{,.$(VDPAU_MAJOR){,.$(VDPAU_MINOR){,.0}}}; \
 	done;
diff --git a/src/gallium/targets/xvmc/Makefile.am b/src/gallium/targets/xvmc/Makefile.am
index b328589..28f98ce 100644
--- a/src/gallium/targets/xvmc/Makefile.am
+++ b/src/gallium/targets/xvmc/Makefile.am
@@ -80,9 +80,9 @@ install-data-hook:
 		ln -sf $${l}						\
 		       $${dest_dir}/$${k};				\
 	done;								\
-	$(RM) $${dest_dir}/libXvMCgallium.*
+	rm -f $${dest_dir}/libXvMCgallium.*
 
 uninstall-hook:
 	for i in $(TARGET_DRIVERS); do					\
-		$(RM) $(DESTDIR)$(xvmcdir)/libXvMC$${i}.so{,.$(XVMC_MAJOR){,.$(XVMC_MINOR){,.0}}}; \
+		rm -f $(DESTDIR)$(xvmcdir)/libXvMC$${i}.so{,.$(XVMC_MAJOR){,.$(XVMC_MINOR){,.0}}}; \
 	done;
diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
index e87b8bb..bb7d169 100644
--- a/src/glsl/Makefile.am
+++ b/src/glsl/Makefile.am
@@ -223,11 +223,11 @@ CLEANFILES =						\
 	$(BUILT_SOURCES)
 
 clean-local:
-	$(RM) -r subtest-cr subtest-cr-lf subtest-lf subtest-lf-cr
+	rm -f -r subtest-cr subtest-cr-lf subtest-lf subtest-lf-cr
 
 dist-hook:
-	$(RM) glcpp/tests/*.out
-	$(RM) glcpp/tests/subtest*/*.out
+	rm -f glcpp/tests/*.out
+	rm -f glcpp/tests/subtest*/*.out
 
 PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
 
diff --git a/src/mesa/drivers/dri/Makefile.am b/src/mesa/drivers/dri/Makefile.am
index 7656261..044967c 100644
--- a/src/mesa/drivers/dri/Makefile.am
+++ b/src/mesa/drivers/dri/Makefile.am
@@ -79,9 +79,9 @@ all-local: mesa_dri_drivers.la
 	done;
 
 clean-local:
-	$(AM_V_GEN)$(RM) $(top_builddir)/$(LIB_DIR)/mesa_dri_drivers.so;
+	$(AM_V_GEN)rm -f $(top_builddir)/$(LIB_DIR)/mesa_dri_drivers.so;
 	$(AM_V_GEN)for i in $(MEGADRIVERS); do \
-		$(RM) $(top_builddir)/$(LIB_DIR)/$$i; \
+		rm -f $(top_builddir)/$(LIB_DIR)/$$i; \
 	done;
 endif
 
@@ -92,11 +92,11 @@ install-data-hook:
 		ln -f $(DESTDIR)$(dridir)/mesa_dri_drivers.so \
 		      $(DESTDIR)$(dridir)/$$i; \
 	done;
-	$(RM) $(DESTDIR)$(dridir)/mesa_dri_drivers.*
+	rm -f $(DESTDIR)$(dridir)/mesa_dri_drivers.*
 
 uninstall-hook:
 	for i in $(MEGADRIVERS); do \
-		$(RM) $(DESTDIR)$(dridir)/$$i; \
+		rm -f $(DESTDIR)$(dridir)/$$i; \
 	done;
 
 endif
-- 
2.4.5



More information about the mesa-dev mailing list