summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2012-07-02 02:09:03 +0300
committerUoti Urpala <uau@mplayer2.org>2012-07-16 21:08:42 +0300
commit39a45c7a175acf7ef5546073f62f5b9b7f83a893 (patch)
tree119a4015e788128b5fcc6e4f9a013f43eff1467f /Makefile
parent86571435baf116a91a31451d26224600f3575270 (diff)
downloadmpv-39a45c7a175acf7ef5546073f62f5b9b7f83a893.tar.bz2
mpv-39a45c7a175acf7ef5546073f62f5b9b7f83a893.tar.xz
build: use python3 to generate some files previously in git
Some files used during build are generated with Python scripts in TOOLS/. Before, the generated files were included in the git tree. Start creating them at build time. This introduces a build-dependency on python3. The files in question are: libvo/vdpau_template.c libmpdemux/ebml_types.h libmpdemux/ebml_defs.c
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index eb81564ce0..f90aa5e906 100644
--- a/Makefile
+++ b/Makefile
@@ -598,6 +598,15 @@ codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h
codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf
./$^ > $@
+libvo/vdpau_template.c: TOOLS/vdpau_functions.py
+ ./$< > $@
+
+libmpdemux/ebml_types.h: TOOLS/matroska.py
+ ./$< --generate-header > $@
+
+libmpdemux/ebml_defs.c: TOOLS/matroska.py
+ ./$< --generate-definitions > $@
+
# ./configure must be rerun if it changed
config.mak: configure
@echo "############################################################"
@@ -631,6 +640,9 @@ checkheaders: $(ALLHEADERS:.h=.ho)
# Make sure all generated header files are created.
codec-cfg.o: codecs.conf.h
mpcommon.o osdep/mplayer-rc.o: version.h
+libvo/vo_vdpau.o: libvo/vdpau_template.c
+libmpdemux/ebml.o libmpdemux/demux_mkv.o: libmpdemux/ebml_types.h
+libmpdemux/ebml.o: libmpdemux/ebml_defs.c
# Files that depend on libavcodec internals
libmpcodecs/vf_fspp.o libmpcodecs/vf_mcdeint.o libmpcodecs/vf_spp.o: CFLAGS := -I$(FFMPEG_SOURCE_PATH) $(CFLAGS)
@@ -702,6 +714,8 @@ distclean: clean testsclean toolsclean driversclean
-$(RM) -r locale
-$(RM) $(call ADD_ALL_DIRS,/*.d)
-$(RM) config.log config.mak config.h codecs.conf.h version.h TAGS tags
+ -$(RM) libvo/vdpau_template.c
+ -$(RM) libmpdemux/ebml_types.h libmpdemux/ebml_defs.c
-$(RM) $(call ADD_ALL_EXESUFS,codec-cfg cpuinfo)
doxygen:
@@ -713,10 +727,6 @@ TAGS:
tags:
$(RM) $@; find . -name '*.[chS]' -o -name '*.asm' | xargs ctags -a
-generated_ebml:
- TOOLS/matroska.py --generate-header >libmpdemux/ebml_types.h
- TOOLS/matroska.py --generate-definitions >libmpdemux/ebml_defs.c
-
###### tests / tools #######
TEST_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm