diff mbox series

x86emul/test: drop bogus .PHONY

Message ID 515bbf07-91fa-1932-1be1-1411f7814e6e@suse.com (mailing list archive)
State New, archived
Headers show
Series x86emul/test: drop bogus .PHONY | expand

Commit Message

Jan Beulich April 4, 2023, 6:37 a.m. UTC
x86_emulate is a real (directory) target.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Andrew Cooper April 4, 2023, 6:54 a.m. UTC | #1
On 04/04/2023 7:37 am, Jan Beulich wrote:
> x86_emulate is a real (directory) target.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Anthony PERARD April 5, 2023, 3:48 p.m. UTC | #2
On Tue, Apr 04, 2023 at 08:37:55AM +0200, Jan Beulich wrote:
> x86_emulate is a real (directory) target.

Indeed, x86_emulate is a directory, so having the target in .PHONY
isn't bogus, but kind of expected in most cases.

Here, the recipe is written with .PHONY been used, as suggest the used
option "-p" from `mkdir` and "-f" from `ln`.

Without .PHONY, the recipe will never be executed if the directory
exist. And, if the content of the original x86_emulate directory
change, the linked directory will never be updated.

So, this patch description needs a reason for removing x86_emulate from
.PHONY. Is there some kind of bug?

> --- a/tools/tests/x86_emulator/Makefile
> +++ b/tools/tests/x86_emulator/Makefile
> @@ -278,7 +278,6 @@ else
>  run32 clean32: %32: %
>  endif
>  
> -.PHONY: x86_emulate
>  x86_emulate:
>  	mkdir -p $@
>  	ln -sf $(XEN_ROOT)/xen/arch/x86/$@/*.[ch] $@/

Cheers,
Jan Beulich April 5, 2023, 4:16 p.m. UTC | #3
On 05.04.2023 17:48, Anthony PERARD wrote:
> On Tue, Apr 04, 2023 at 08:37:55AM +0200, Jan Beulich wrote:
>> x86_emulate is a real (directory) target.
> 
> Indeed, x86_emulate is a directory, so having the target in .PHONY
> isn't bogus, but kind of expected in most cases.
> 
> Here, the recipe is written with .PHONY been used, as suggest the used
> option "-p" from `mkdir` and "-f" from `ln`.
> 
> Without .PHONY, the recipe will never be executed if the directory
> exist. And, if the content of the original x86_emulate directory
> change, the linked directory will never be updated.
> 
> So, this patch description needs a reason for removing x86_emulate from
> .PHONY. Is there some kind of bug?

Yes, but it was my brain that was buggy. I deliberately added that
line long ago when converting the symlink to a real dir, and then for
whatever reason thought recently that it was bogus. Right you are,
and I'll revert this change.

Jan

>> --- a/tools/tests/x86_emulator/Makefile
>> +++ b/tools/tests/x86_emulator/Makefile
>> @@ -278,7 +278,6 @@ else
>>  run32 clean32: %32: %
>>  endif
>>  
>> -.PHONY: x86_emulate
>>  x86_emulate:
>>  	mkdir -p $@
>>  	ln -sf $(XEN_ROOT)/xen/arch/x86/$@/*.[ch] $@/
> 
> Cheers,
>
diff mbox series

Patch

--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -278,7 +278,6 @@  else
 run32 clean32: %32: %
 endif
 
-.PHONY: x86_emulate
 x86_emulate:
 	mkdir -p $@
 	ln -sf $(XEN_ROOT)/xen/arch/x86/$@/*.[ch] $@/