diff options
author | Martin Storsjö <martin@martin.st> | 2022-02-23 14:56:49 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2022-03-16 14:12:49 +0200 |
commit | a78f136f3fa039fd7ad664fd6e6e976f1448c68b (patch) | |
tree | 071be1991a6b641284543e77dbb82a0dcfc8f35d /configure | |
parent | f3a0e2ee2b97e2d46b351c29853c056d126884e2 (diff) | |
download | ffmpeg-a78f136f3fa039fd7ad664fd6e6e976f1448c68b.tar.gz |
configure: Use a separate config_components.h header for $ALL_COMPONENTS
This avoids unnecessary rebuilds of most source files if only the
list of enabled components has changed, but not the other properties
of the build, set in config.h.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -7791,17 +7791,30 @@ print_config ARCH_ "$config_files" $ARCH_LIST print_config HAVE_ "$config_files" $HAVE_LIST print_config CONFIG_ "$config_files" $CONFIG_LIST \ $CONFIG_EXTRA \ - $ALL_COMPONENTS \ echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH -echo "endif # FFMPEG_CONFIG_MAK" >> ffbuild/config.mak # Do not overwrite an unchanged config.h to avoid superfluous rebuilds. cp_if_changed $TMPH config.h touch ffbuild/.config +# Copy config.asm before printing ALL_COMPONENTS; that's not needed in assembly. enabled x86asm && cp_if_changed $TMPASM config.asm +# Reopen a new TMPH for config_components.h. +cat > $TMPH <<EOF +/* Automatically generated by configure - do not modify! */ +#ifndef FFMPEG_CONFIG_COMPONENTS_H +#define FFMPEG_CONFIG_COMPONENTS_H +EOF + +print_config CONFIG_ "$config_files" $ALL_COMPONENTS + +echo "#endif /* FFMPEG_CONFIG_COMPONENTS_H */" >> $TMPH +echo "endif # FFMPEG_CONFIG_MAK" >> ffbuild/config.mak + +cp_if_changed $TMPH config_components.h + cat > $TMPH <<EOF /* Generated by ffmpeg configure */ #ifndef AVUTIL_AVCONFIG_H |