mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
b319ae9190
commit
cee35cd725
12
Makefile
12
Makefile
|
@ -595,23 +595,26 @@ mplayer$(EXESUF): EXTRALIBS += $(EXTRALIBS_MPLAYER)
|
||||||
mplayer$(EXESUF):
|
mplayer$(EXESUF):
|
||||||
$(CC) -o $@ $^ $(EXTRALIBS)
|
$(CC) -o $@ $^ $(EXTRALIBS)
|
||||||
|
|
||||||
|
codec-cfg.c: codecs.conf.h
|
||||||
codecs.conf.h: TOOLS/file2string.py etc/codecs.conf
|
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
|
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
|
libmpdemux/ebml_types.h: TOOLS/matroska.py
|
||||||
./$< --generate-header > $@
|
./$< --generate-header > $@
|
||||||
|
|
||||||
|
libmpdemux/ebml.c: libmpdemux/ebml_defs.c
|
||||||
libmpdemux/ebml_defs.c: TOOLS/matroska.py
|
libmpdemux/ebml_defs.c: TOOLS/matroska.py
|
||||||
./$< --generate-definitions > $@
|
./$< --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_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
|
# ./configure must be rerun if it changed
|
||||||
config.mak: configure
|
config.mak: configure
|
||||||
@echo "############################################################"
|
@echo "############################################################"
|
||||||
|
@ -642,12 +645,7 @@ checkheaders: $(ALLHEADERS:.h=.ho)
|
||||||
|
|
||||||
###### dependency declarations / specific CFLAGS ######
|
###### 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
|
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
|
# Files that depend on libavcodec internals
|
||||||
libmpcodecs/vf_fspp.o libmpcodecs/vf_mcdeint.o libmpcodecs/vf_spp.o: CFLAGS := -I$(FFMPEG_SOURCE_PATH) $(CFLAGS)
|
libmpcodecs/vf_fspp.o libmpcodecs/vf_mcdeint.o libmpcodecs/vf_spp.o: CFLAGS := -I$(FFMPEG_SOURCE_PATH) $(CFLAGS)
|
||||||
|
|
Loading…
Reference in New Issue