diff mbox series

[kvm-unit-tests,2/9] s390x/Makefile: simplify `%.hdr` target rules

Message ID 20230116175757.71059-3-mhartmay@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series Some cleanup patches | expand

Commit Message

Marc Hartmayer Jan. 16, 2023, 5:57 p.m. UTC
Merge the two Makefile target rules `$(SNIPPET_DIR)/asm/%.hdr` and
`$(SNIPPET_DIR)/c/%.hdr` into one target rule.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
---
 s390x/Makefile | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Janosch Frank Jan. 18, 2023, 8:14 a.m. UTC | #1
On 1/16/23 18:57, Marc Hartmayer wrote:
> Merge the two Makefile target rules `$(SNIPPET_DIR)/asm/%.hdr` and
> `$(SNIPPET_DIR)/c/%.hdr` into one target rule.

Should have thought of that myself after adding the linker script for 
assembly snippets...


Reviewed-by: Janosch Frank <frankja@linux.ibm.com>

> 
> Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
> ---
>   s390x/Makefile | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/s390x/Makefile b/s390x/Makefile
> index 97a616111680..660ff06f1e7c 100644
> --- a/s390x/Makefile
> +++ b/s390x/Makefile
> @@ -145,10 +145,7 @@ $(SNIPPET_DIR)/c/%.gbin: $(SNIPPET_DIR)/c/%.o $(snippet_lib) $(FLATLIBS)
>   	$(OBJCOPY) -O binary -j ".rodata" -j ".lowcore" -j ".text" -j ".data" -j ".bss" --set-section-flags .bss=alloc,load,contents $@ $@
>   	truncate -s '%4096' $@
>   
> -$(SNIPPET_DIR)/asm/%.hdr: $(SNIPPET_DIR)/asm/%.gbin $(HOST_KEY_DOCUMENT)
> -	$(GEN_SE_HEADER) -k $(HOST_KEY_DOCUMENT) -c $<,0x0,0x00000000000000420000000000000000 --psw-addr 0x4000 -o $@
> -
> -$(SNIPPET_DIR)/c/%.hdr: $(SNIPPET_DIR)/c/%.gbin $(HOST_KEY_DOCUMENT)
> +%.hdr: %.gbin $(HOST_KEY_DOCUMENT)
>   	$(GEN_SE_HEADER) -k $(HOST_KEY_DOCUMENT) -c $<,0x0,0x00000000000000420000000000000000 --psw-addr 0x4000 -o $@
>   
>   .SECONDARY:
diff mbox series

Patch

diff --git a/s390x/Makefile b/s390x/Makefile
index 97a616111680..660ff06f1e7c 100644
--- a/s390x/Makefile
+++ b/s390x/Makefile
@@ -145,10 +145,7 @@  $(SNIPPET_DIR)/c/%.gbin: $(SNIPPET_DIR)/c/%.o $(snippet_lib) $(FLATLIBS)
 	$(OBJCOPY) -O binary -j ".rodata" -j ".lowcore" -j ".text" -j ".data" -j ".bss" --set-section-flags .bss=alloc,load,contents $@ $@
 	truncate -s '%4096' $@
 
-$(SNIPPET_DIR)/asm/%.hdr: $(SNIPPET_DIR)/asm/%.gbin $(HOST_KEY_DOCUMENT)
-	$(GEN_SE_HEADER) -k $(HOST_KEY_DOCUMENT) -c $<,0x0,0x00000000000000420000000000000000 --psw-addr 0x4000 -o $@
-
-$(SNIPPET_DIR)/c/%.hdr: $(SNIPPET_DIR)/c/%.gbin $(HOST_KEY_DOCUMENT)
+%.hdr: %.gbin $(HOST_KEY_DOCUMENT)
 	$(GEN_SE_HEADER) -k $(HOST_KEY_DOCUMENT) -c $<,0x0,0x00000000000000420000000000000000 --psw-addr 0x4000 -o $@
 
 .SECONDARY: