Re: [RFC kvm-unit-tests PATCH 5/8] Makefile: add explicit mkdir for .o targets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 06/04/2017 21:07, Alex Bennée wrote:
> This is fairly direct way of ensuring the target build directories are
> created before we build a binary blob. mkdir -p fails gracefully if
> the directory is already there.
> 
> Signed-off-by: Alex Bennée <alex.bennee@xxxxxxxxxx>
> ---
>  Makefile | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index 781186e..56598df 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -79,8 +79,13 @@ $(LIBFDT_archive): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS))
>  	$(AR) rcs $@ $^
>  
>  %.o: %.S
> +	mkdir -p $(dir $@)

Should this use @ for cleanliness?

Paolo

>  	$(CC) $(CFLAGS) -c -nostdlib -o $@ $<
>  
> +%.o: %.c
> +	mkdir -p $(dir $@)
> +	$(CC) $(CFLAGS) -c -o $@ $<
> +
>  -include */.*.d */*/.*.d
>  
>  all: $(shell git -C $(SRCDIR) rev-parse --verify --short=8 HEAD >build-head 2>/dev/null)
> 
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux