diff mbox series

[FFmpeg-devel,2/6] ffbuild/common: Make deletion of templates possible

Message ID 20210128162646.2811269-2-andreas.rheinhardt@gmail.com
State Accepted
Commit 3044d0efee9136c19dfdcf6dcdf957e910a73fd5
Headers show
Series [FFmpeg-devel,1/6] avcodec/aac_defines: Make macro more general | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Jan. 28, 2021, 4:26 p.m. UTC
If a target to be built includes a template file, the target's .d file
includes the template file as a prerequisite; if the code were changed so
that the template file no longer exists, one would get an error from
make that it has no rule for the template file target. Therefore add a
dummy rule for template files to make deleting them possible.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 ffbuild/common.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andreas Rheinhardt Feb. 5, 2021, 4:17 a.m. UTC | #1
Andreas Rheinhardt:
> If a target to be built includes a template file, the target's .d file
> includes the template file as a prerequisite; if the code were changed so
> that the template file no longer exists, one would get an error from
> make that it has no rule for the template file target. Therefore add a
> dummy rule for template files to make deleting them possible.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  ffbuild/common.mak | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ffbuild/common.mak b/ffbuild/common.mak
> index 13e13553b8..e070b6b5e2 100644
> --- a/ffbuild/common.mak
> +++ b/ffbuild/common.mak
> @@ -107,7 +107,7 @@ COMPILE_MSA = $(call COMPILE,CC,MSAFLAGS)
>  %.c %.h %.pc %.ver %.version: TAG = GEN
>  
>  # Dummy rule to stop make trying to rebuild removed or renamed headers
> -%.h:
> +%.h %_template.c:
>  	@:
>  
>  # Disable suffix rules.  Most of the builtin rules are suffix rules,
> 

Will apply this patchset tomorrow unless there are objections. Patch one
and three will be merged as Lynne suggested.

- Andreas
diff mbox series

Patch

diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index 13e13553b8..e070b6b5e2 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -107,7 +107,7 @@  COMPILE_MSA = $(call COMPILE,CC,MSAFLAGS)
 %.c %.h %.pc %.ver %.version: TAG = GEN
 
 # Dummy rule to stop make trying to rebuild removed or renamed headers
-%.h:
+%.h %_template.c:
 	@:
 
 # Disable suffix rules.  Most of the builtin rules are suffix rules,