Re: [libav-devel] [PATCH] build: Move cli tools to a separate subdirectory

2017-02-01 Thread Luca Barbato
On 01/02/2017 01:05, Vittorio Giovara wrote:
> IMO the final executable should still stay in the build directory.

+1
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] build: Move cli tools to a separate subdirectory

2017-01-31 Thread Vittorio Giovara
On Tue, Jan 31, 2017 at 9:11 PM, Diego Biurrun  wrote:
> This unclutters the top-level directory and groups related files together.
> ---
> diff --git a/avtools/Makefile b/avtools/Makefile
> new file mode 100644
> index 000..04d2a02
> --- /dev/null
> +++ b/avtools/Makefile
> @@ -0,0 +1,43 @@
> +AVPROGS-$(CONFIG_AVCONV)   += avtools/avconv
> +AVPROGS-$(CONFIG_AVPLAY)   += avtools/avplay
> +AVPROGS-$(CONFIG_AVPROBE)  += avtools/avprobe

IMO the final executable should still stay in the build directory.
-- 
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] [PATCH] build: Move cli tools to a separate subdirectory

2017-01-31 Thread Diego Biurrun
This unclutters the top-level directory and groups related files together.
---

Now everything is placed below "avtools" as discussed on IRC.

 .gitignore |  3 --
 Makefile   | 45 +++---
 avtools/.gitignore |  3 ++
 avtools/Makefile   | 43 
 avconv.c => avtools/avconv.c   |  0
 avconv.h => avtools/avconv.h   |  0
 avconv_dxva2.c => avtools/avconv_dxva2.c   |  0
 avconv_filter.c => avtools/avconv_filter.c |  0
 avconv_opt.c => avtools/avconv_opt.c   |  0
 avconv_qsv.c => avtools/avconv_qsv.c   |  0
 avconv_vaapi.c => avtools/avconv_vaapi.c   |  0
 avconv_vda.c => avtools/avconv_vda.c   |  0
 avconv_vdpau.c => avtools/avconv_vdpau.c   |  0
 avplay.c => avtools/avplay.c   |  0
 avprobe.c => avtools/avprobe.c |  0
 cmdutils.c => avtools/cmdutils.c   |  0
 cmdutils.h => avtools/cmdutils.h   |  0
 configure  |  2 +-
 tests/Makefile |  2 +-
 tests/fate-run.sh  | 28 +--
 tests/fate/mov.mak |  2 +-
 tests/fate/probe.mak   |  2 +-
 tests/regression-funcs.sh  |  2 +-
 23 files changed, 69 insertions(+), 63 deletions(-)
 create mode 100644 avtools/.gitignore
 create mode 100644 avtools/Makefile
 rename avconv.c => avtools/avconv.c (100%)
 rename avconv.h => avtools/avconv.h (100%)
 rename avconv_dxva2.c => avtools/avconv_dxva2.c (100%)
 rename avconv_filter.c => avtools/avconv_filter.c (100%)
 rename avconv_opt.c => avtools/avconv_opt.c (100%)
 rename avconv_qsv.c => avtools/avconv_qsv.c (100%)
 rename avconv_vaapi.c => avtools/avconv_vaapi.c (100%)
 rename avconv_vda.c => avtools/avconv_vda.c (100%)
 rename avconv_vdpau.c => avtools/avconv_vdpau.c (100%)
 rename avplay.c => avtools/avplay.c (100%)
 rename avprobe.c => avtools/avprobe.c (100%)
 rename cmdutils.c => avtools/cmdutils.c (100%)
 rename cmdutils.h => avtools/cmdutils.h (100%)

diff --git a/.gitignore b/.gitignore
index f6d97b0..5bca92d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,9 +19,6 @@
 *.ver
 /.config
 /.version
-/avconv
-/avplay
-/avprobe
 /avversion.h
 /config.asm
 /config.h
diff --git a/Makefile b/Makefile
index 98eb3ab..d1b24eb 100644
--- a/Makefile
+++ b/Makefile
@@ -69,25 +69,6 @@ COMPILE_HOSTC = $(call COMPILE,HOSTCC)
 
 %.c %.h %.pc %.ver %.version: TAG = GEN
 
-AVPROGS-$(CONFIG_AVCONV)   += avconv
-AVPROGS-$(CONFIG_AVPLAY)   += avplay
-AVPROGS-$(CONFIG_AVPROBE)  += avprobe
-
-AVPROGS:= $(AVPROGS-yes:%=%$(EXESUF))
-PROGS  += $(AVPROGS)
-
-AVBASENAMES = avconv avplay avprobe
-ALLAVPROGS  = $(AVBASENAMES:%=%$(EXESUF))
-
-$(foreach prog,$(AVBASENAMES),$(eval OBJS-$(prog) += cmdutils.o))
-
-OBJS-avconv   += avconv_opt.o avconv_filter.o
-OBJS-avconv-$(CONFIG_LIBMFX)  += avconv_qsv.o
-OBJS-avconv-$(CONFIG_VAAPI)   += avconv_vaapi.o
-OBJS-avconv-$(CONFIG_VDA) += avconv_vda.o
-OBJS-avconv-$(HAVE_DXVA2_LIB) += avconv_dxva2.o
-OBJS-avconv-$(HAVE_VDPAU_X11) += avconv_vdpau.o
-
 TESTTOOLS   = audiogen videogen rotozoom tiny_psnr base64
 HOSTPROGS  := $(TESTTOOLS:%=tests/%) doc/print_options
 
@@ -115,8 +96,6 @@ FF_EXTRALIBS := $(FFEXTRALIBS)
 FF_DEP_LIBS  := $(DEP_LIBS)
 FF_STATIC_DEP_LIBS := $(STATIC_DEP_LIBS)
 
-all: $(AVPROGS)
-
 $(TOOLS): %$(EXESUF): %.o
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(EXTRALIBS) $(ELIBS)
 
@@ -153,8 +132,6 @@ endef
 
 $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D
 
-include $(SRC_PATH)/doc/Makefile
-
 define DOPROG
 OBJS-$(1) += $(1).o $(OBJS-$(1)-yes)
 $(1)$(EXESUF): $$(OBJS-$(1))
@@ -164,7 +141,8 @@ $(1)$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1))
 -include $$(OBJS-$(1):.o=.d)
 endef
 
-$(foreach P,$(PROGS),$(eval $(call DOPROG,$(P:$(EXESUF)=
+include $(SRC_PATH)/doc/Makefile
+include $(SRC_PATH)/avtools/Makefile
 
 $(PROGS): %$(EXESUF): %.o $(FF_DEP_LIBS)
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
@@ -175,7 +153,7 @@ GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
 .version: $(wildcard $(GIT_LOG)) $(VERSION_SH) avbuild/config.mak
 .version: M=@
 
-cmdutils.o libavutil/utils.o: avversion.h
+libavutil/utils.o: avversion.h
 avversion.h .version:
$(M)$(VERSION_SH) $(SRC_PATH) avversion.h $(EXTRA_VERSION)
$(Q)touch .version
@@ -183,35 +161,20 @@ avversion.h .version:
 # force version.sh to run whenever version might have changed
 -include .version
 
-ifdef AVPROGS
-install: install-progs install-data
-endif
-
 install: install-libs install-headers
 
 install-libs: install-libs-yes
 
-install-progs-yes:
-install-progs-$(CONFIG_SHARED): install-libs
-
-install-progs: install-progs-yes $(AVPROGS)
-   $(Q)mkdir -p "$(BINDIR)"
-   $(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)"
-
 install-data: $(DATA_FILES)
$(Q)mkdir -p