[FFmpeg-devel] [PATCH] Buildsystem verbosity suppression
Matti Hamalainen
mhamalai
Sat Aug 8 06:15:38 CEST 2009
Attached patch suppresses most of the build system noise by default.
Compilation- and depency generation, etc. output becomes something
like this:
[CC] libavformat/cutils.c
[CC] libavformat/metadata.c
[CC] libavformat/metadata_compat.c
libavformat/metadata_compat.c: In function 'ff_metadata_mux_compat':
...
Original noisy operation can be restored via --enable-verbose-build
configure option. I think it is unlikely that feature/patch like this
would be accepted, but since I've used and maintained this locally,
it seems proper to submit it in any case.
--
] ccr/TNSP^DKD^pWp :: ccr(at)tnsp(dot)org :: http://ccr.tnsp.org/
] Fingerprint: 0466 95ED 96DF 3701 C71D D62D 10A6 28A6 1374 C112
-------------- next part --------------
Index: configure
===================================================================
--- configure (revision 19607)
+++ configure (working copy)
@@ -223,6 +223,7 @@
echo " --disable-yasm disable use of yasm assembler"
echo
echo "Developer options (useful when working on FFmpeg itself):"
+ echo " --enable-verbose-build do not suppress certain build system output"
echo " --disable-debug disable debugging symbols"
echo " --enable-debug=LEVEL set the debug level [$debuglevel]"
echo " --enable-gprof enable profiling with gprof [$gprof]"
@@ -991,6 +992,7 @@
optimizations
stripping
yasm
+ verbose_build
"
PATHS_LIST='
@@ -2620,6 +2622,7 @@
echo "HOSTLIBS=$host_libs" >> config.mak
echo "TARGET_EXEC=$target_exec" >> config.mak
echo "TARGET_PATH=$target_path" >> config.mak
+echo "VERBOSE_BUILD=$verbose_build" >> config.mak
if enabled sdl; then
echo "SDL_LIBS=$("${SDL_CONFIG}" --libs)" >> config.mak
Index: subdir.mak
===================================================================
--- subdir.mak (revision 19607)
+++ subdir.mak (working copy)
@@ -22,19 +22,19 @@
define RULES
$(SUBDIR)%$(EXESUF): $(SUBDIR)%.o
- $(LD) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS)
+ $(call build_cmd,LD,$<, $(LD) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS) )
$(SUBDIR)%-test.o: $(SUBDIR)%.c
- $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c -o $$@ $$^
+ $(call build_cmd,CC-TEST,$<, $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c -o $$@ $$^ )
$(SUBDIR)%-test.o: $(SUBDIR)%-test.c
- $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c -o $$@ $$^
+ $(call build_cmd,CC-TEST,$<, $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c -o $$@ $$^ )
$(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm
- $(YASM) $(YASMFLAGS) -I $$(<D)/ -o $$@ $$<
+ $(call build_cmd,YASM,$<, $(YASM) $(YASMFLAGS) -I $$(<D)/ -o $$@ $$< )
$(SUBDIR)x86/%.d: $(SUBDIR)x86/%.asm
- $(YASM) $(YASMFLAGS) -I $$(<D)/ -M -o $$(@:%.d=%.o) $$< > $$@
+ $(call build_cmd,DEPEND,$< $(YASM) $(YASMFLAGS) -I $$(<D)/ -M -o $$(@:%.d=%.o) $$< > $$@ )
clean::
rm -f $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
Index: common.mak
===================================================================
--- common.mak (revision 19607)
+++ common.mak (working copy)
@@ -20,23 +20,25 @@
CPPFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS)
+build_cmd = @if test "x$(VERBOSE_BUILD)" != "xyes"; then echo "[$1] $2"; else echo "$3"; fi; eval "$3"
+
%.o: %.c
- $(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -c $(CC_O) $<
+ $(call build_cmd,CC,$<, $(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -c $(CC_O) $< )
%.o: %.S
- $(AS) $(CPPFLAGS) $(ASFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
+ $(call build_cmd,AS,$<, $(AS) $(CPPFLAGS) $(ASFLAGS) $(LIBOBJFLAGS) -c -o $@ $< )
%.ho: %.h
- $(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $<
+ $(call build_cmd,HO,$<, $(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $< )
%.d: %.c
- $(DEPEND_CMD)
+ $(call build_cmd,DEPEND,$<, $(DEPEND_CMD) )
%.d: %.S
- $(DEPEND_CMD)
+ $(call build_cmd,DEPEND,$<, $(DEPEND_CMD) )
%.d: %.cpp
- $(DEPEND_CMD)
+ $(call build_cmd,DEPEND,$<, $(DEPEND_CMD) )
%.o: %.d
More information about the ffmpeg-devel
mailing list