From cee35cd72501e47d6de6c17af7d6eefdb2e3bb99 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 28 Jul 2012 18:48:59 +0200 Subject: Makefile: move dependency rules for autogenerated files Explicit dependency rules are needed when a source file depends on an autogenerated file. Move these rules to the same place in the Makefile as the rules for creating the generated files. Also, change the rules to declare the direct dependency, not a transitive one (e.g. codecs.conf.h is needed by codec-cfg.c, not codec-cfg.o). In practice, this shouldn't change anything, but it's cleaner. --- Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 7f30c49e4e..1503690015 100644 --- a/Makefile +++ b/Makefile @@ -595,23 +595,26 @@ mplayer$(EXESUF): EXTRALIBS += $(EXTRALIBS_MPLAYER) mplayer$(EXESUF): $(CC) -o $@ $^ $(EXTRALIBS) +codec-cfg.c: codecs.conf.h codecs.conf.h: TOOLS/file2string.py etc/codecs.conf ./$^ >$@ +libvo/vo_vdpau.c: libvo/vdpau_template.c libvo/vdpau_template.c: TOOLS/vdpau_functions.py ./$< > $@ +libmpdemux/ebml.c libmpdemux/demux_mkv.c: libmpdemux/ebml_types.h libmpdemux/ebml_types.h: TOOLS/matroska.py ./$< --generate-header > $@ +libmpdemux/ebml.c: libmpdemux/ebml_defs.c libmpdemux/ebml_defs.c: TOOLS/matroska.py ./$< --generate-definitions > $@ +libvo/vo_gl3.c: libvo/vo_gl3_shaders.h libvo/vo_gl3_shaders.h: TOOLS/file2string.py libvo/vo_gl3_shaders.glsl ./$^ >$@ -libvo/vo_gl3.c: libvo/vo_gl3_shaders.h - # ./configure must be rerun if it changed config.mak: configure @echo "############################################################" @@ -642,12 +645,7 @@ checkheaders: $(ALLHEADERS:.h=.ho) ###### dependency declarations / specific CFLAGS ###### -# 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) -- cgit v1.2.3