[FFmpeg-devel] [PATCH] build: don't strip binaries during compilation

James Almer jamrial at gmail.com
Mon Oct 2 01:55:29 EEST 2017


Do it during install instead, like with the libraries.

There's no benefit making a stripped copy of the CLI tools in the
build folder. Doing it during install saves build time and storage
space.

Signed-off-by: James Almer <jamrial at gmail.com>
---
FATE slots will love this, especially those running on disk space
deprived VMs.

 Makefile              |  6 +-----
 doc/examples/Makefile |  7 ++-----
 fftools/Makefile      | 10 +++++-----
 3 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index 3007da50f7..1c6bc2fbb9 100644
--- a/Makefile
+++ b/Makefile
@@ -96,11 +96,7 @@ include $(SRC_PATH)/doc/examples/Makefile
 
 libavcodec/utils.o libavformat/utils.o libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : libavutil/ffversion.h
 
-$(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
-	$(CP) $< $@
-	$(STRIP) $@
-
-%$(PROGSSUF)_g$(EXESUF): $(FF_DEP_LIBS)
+$(PROGS): %$(PROGSSUF)$(EXESUF): $(FF_DEP_LIBS)
 	$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
 
 VERSION_SH  = $(SRC_PATH)/ffbuild/version.sh
diff --git a/doc/examples/Makefile b/doc/examples/Makefile
index ff958d33c6..c813da4505 100644
--- a/doc/examples/Makefile
+++ b/doc/examples/Makefile
@@ -21,16 +21,14 @@ DOC_EXAMPLES-$(CONFIG_TRANSCODE_AAC_EXAMPLE)     += transcode_aac
 DOC_EXAMPLES-$(CONFIG_TRANSCODING_EXAMPLE)       += transcoding
 
 DOC_EXAMPLES       := $(DOC_EXAMPLES-yes:%=doc/examples/%$(PROGSSUF)$(EXESUF))
-DOC_EXAMPLES_G     := $(DOC_EXAMPLES-yes:%=doc/examples/%$(PROGSSUF)_g$(EXESUF))
 ALL_DOC_EXAMPLES   := $(DOC_EXAMPLES) $(DOC_EXAMPLES-:%=doc/examples/%$(PROGSSUF)$(EXESUF))
-ALL_DOC_EXAMPLES_G := $(DOC_EXAMPLES_G) $(DOC_EXAMPLES-:%=doc/examples/%$(PROGSSUF)_g$(EXESUF))
 PROGS              += $(DOC_EXAMPLES)
 
 EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) $(SRC_PATH)/doc/examples/README
 EXAMPLE_MAKEFILE := $(SRC_PATH)/doc/examples/Makefile
 
 $(foreach P,$(DOC_EXAMPLES),$(eval OBJS-$(P:%$(PROGSSUF)$(EXESUF)=%) = $(P:%$(PROGSSUF)$(EXESUF)=%).o))
-$(DOC_EXAMPLES_G): %$(PROGSSUF)_g$(EXESUF): %.o
+$(DOC_EXAMPLES): %$(PROGSSUF)$(EXESUF): %.o
 
 examples: $(DOC_EXAMPLES)
 
@@ -40,8 +38,7 @@ OBJDIRS += doc/examples
 DOXY_INPUT += $(DOC_EXAMPLES:%$(PROGSSUF)$(EXESUF)=%.c)
 
 examplesclean:
-	$(RM) $(ALL_DOC_EXAMPLES) $(ALL_DOC_EXAMPLES_G)
-	$(RM) $(CLEANSUFFIXES:%=doc/examples/%)
+	$(RM) $(ALL_DOC_EXAMPLES) $(CLEANSUFFIXES:%=doc/examples/%)
 
 docclean:: examplesclean
 
diff --git a/fftools/Makefile b/fftools/Makefile
index 094f6d6265..37ff131165 100644
--- a/fftools/Makefile
+++ b/fftools/Makefile
@@ -8,7 +8,6 @@ PROGS       += $(AVPROGS)
 
 AVBASENAMES  = ffmpeg ffplay ffprobe ffserver
 ALLAVPROGS   = $(AVBASENAMES:%=%$(PROGSSUF)$(EXESUF))
-ALLAVPROGS_G = $(AVBASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
 
 OBJS-ffmpeg                        += fftools/ffmpeg_opt.o fftools/ffmpeg_filter.o fftools/ffmpeg_hw.o
 OBJS-ffmpeg-$(CONFIG_CUVID)        += fftools/ffmpeg_cuvid.o
@@ -22,11 +21,11 @@ OBJS-ffserver                      += fftools/ffserver_config.o
 define DOFFTOOL
 OBJS-$(1)-$(CONFIG_OPENCL) += fftools/cmdutils_opencl.o
 OBJS-$(1) += fftools/cmdutils.o fftools/$(1).o $(OBJS-$(1)-yes)
-$(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
+$(1)$(PROGSSUF)$(EXESUF): $$(OBJS-$(1))
 $$(OBJS-$(1)): | fftools
 $$(OBJS-$(1)): CFLAGS  += $(CFLAGS-$(1))
-$(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
-$(1)$(PROGSSUF)_g$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1))
+$(1)$(PROGSSUF)$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
+$(1)$(PROGSSUF)$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1))
 -include $$(OBJS-$(1):.o=.d)
 endef
 
@@ -47,6 +46,7 @@ install-progs-$(CONFIG_SHARED): install-libs
 install-progs: install-progs-yes $(AVPROGS)
 	$(Q)mkdir -p "$(BINDIR)"
 	$(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)"
+	$(STRIP) $(addprefix "$(BINDIR)/", $(AVPROGS))
 
 uninstall: uninstall-progs
 
@@ -54,4 +54,4 @@ uninstall-progs:
 	$(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS))
 
 clean::
-	$(RM) $(ALLAVPROGS) $(ALLAVPROGS_G) $(CLEANSUFFIXES:%=fftools/%)
+	$(RM) $(ALLAVPROGS) $(CLEANSUFFIXES:%=fftools/%)
-- 
2.14.1



More information about the ffmpeg-devel mailing list