[x264-devel] [PATCH 3/9] build: Switch 'rm' to '$(RM)'

Stephen Hutchinson qyot27 at gmail.com
Sat Apr 26 23:45:17 CEST 2014


---
 Makefile | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index 5b13351..ca76334 100644
--- a/Makefile
+++ b/Makefile
@@ -164,7 +164,7 @@ lib-static: $(LIBX264)
 lib-shared: $(SONAME)
 
 $(LIBX264): $(GENERATED) .depend $(OBJS) $(OBJASM)
-	rm -f $(LIBX264)
+	$(RM) -f $(LIBX264)
 	$(AR)$@ $(OBJS) $(OBJASM)
 	$(if $(RANLIB), $(RANLIB) $@)
 
@@ -200,7 +200,7 @@ $(OBJS) $(OBJASM) $(OBJSO) $(OBJCLI) $(OBJCHK): .depend
 	$(RC) $(RCFLAGS)$@ $<
 
 .depend: config.mak
-	@rm -f .depend
+	@$(RM) -f .depend
 	@$(foreach SRC, $(addprefix $(SRCPATH)/, $(SRCS) $(SRCCLI) $(SRCSO)), \
                 $(DEPCC) $(CFLAGS) $(SRC) $(DEPMT) \
                 $(SRC:$(SRCPATH)/%.c=%.o) $(DEPMM) 1>> .depend;)
@@ -234,18 +234,18 @@ fprofiled:
 	$(MAKE) clean
 	$(MAKE) x264$(EXE) CFLAGS="$(CFLAGS) $(PROF_GEN_CC)" LDFLAGS="$(LDFLAGS) $(PROF_GEN_LD)"
 	$(foreach V, $(VIDS), $(foreach I, 0 1 2 3 4 5 6 7, ./x264$(EXE) $(OPT$I) --threads 1 $(V) -o $(DEVNULL) ;))
-	rm -f $(SRC2:%.c=%.o)
+	$(RM) -f $(SRC2:%.c=%.o)
 	$(MAKE) CFLAGS="$(CFLAGS) $(PROF_USE_CC)" LDFLAGS="$(LDFLAGS) $(PROF_USE_LD)"
-	rm -f $(SRC2:%.c=%.gcda) $(SRC2:%.c=%.gcno) *.dyn pgopti.dpi pgopti.dpi.lock
+	$(RM) -f $(SRC2:%.c=%.gcda) $(SRC2:%.c=%.gcno) *.dyn pgopti.dpi pgopti.dpi.lock
 endif
 
 clean:
-	rm -f $(OBJS) $(OBJASM) $(OBJCLI) $(OBJSO) $(SONAME) *.a *.lib *.exp *.pdb x264 x264.exe .depend TAGS
-	rm -f checkasm checkasm.exe $(OBJCHK) $(GENERATED) x264_lookahead.clbin
-	rm -f $(SRC2:%.c=%.gcda) $(SRC2:%.c=%.gcno) *.dyn pgopti.dpi pgopti.dpi.lock
+	$(RM) -f $(OBJS) $(OBJASM) $(OBJCLI) $(OBJSO) $(SONAME) *.a *.lib *.exp *.pdb x264 x264.exe .depend TAGS
+	$(RM) -f checkasm checkasm.exe $(OBJCHK) $(GENERATED) x264_lookahead.clbin
+	$(RM) -f $(SRC2:%.c=%.gcda) $(SRC2:%.c=%.gcno) *.dyn pgopti.dpi pgopti.dpi.lock
 
 distclean: clean
-	rm -f config.mak x264_config.h config.h config.log x264.pc x264.def
+	$(RM) -f config.mak x264_config.h config.h config.log x264.pc x264.def
 
 install-cli: x264$(EXE)
 	$(INSTALL) -d $(DESTDIR)$(bindir)
@@ -271,12 +271,12 @@ else ifneq ($(SONAME),)
 endif
 
 uninstall:
-	rm -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(includedir)/x264_config.h $(DESTDIR)$(libdir)/libx264.a
-	rm -f $(DESTDIR)$(bindir)/x264$(EXE) $(DESTDIR)$(libdir)/pkgconfig/x264.pc
+	$(RM) -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(includedir)/x264_config.h $(DESTDIR)$(libdir)/libx264.a
+	$(RM) -f $(DESTDIR)$(bindir)/x264$(EXE) $(DESTDIR)$(libdir)/pkgconfig/x264.pc
 ifneq ($(IMPLIBNAME),)
-	rm -f $(DESTDIR)$(bindir)/$(SONAME) $(DESTDIR)$(libdir)/$(IMPLIBNAME)
+	$(RM) -f $(DESTDIR)$(bindir)/$(SONAME) $(DESTDIR)$(libdir)/$(IMPLIBNAME)
 else ifneq ($(SONAME),)
-	rm -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
+	$(RM) -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
 endif
 
 etags: TAGS
-- 
1.9.1



More information about the x264-devel mailing list