All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>, dev@dpdk.org
Subject: Re: [PATCH v2] mk: fix parallel build of test resources
Date: Fri, 24 Jun 2016 16:06:18 +0200	[thread overview]
Message-ID: <576D3E5A.6060108@6wind.com> (raw)
In-Reply-To: <1466767379-7552-1-git-send-email-thomas.monjalon@6wind.com>

Hi Thomas,

On 06/24/2016 01:22 PM, Thomas Monjalon wrote:
> --- a/app/test/Makefile
> +++ b/app/test/Makefile
> @@ -43,14 +43,14 @@ define linked_resource
>  SRCS-y += $(1).res.o
>  $(1).res.o: $(2)
>  	@  echo '  MKRES $$@'
> -	$Q ln -fs $$< resource.tmp
> +	$Q [ "$$(<D)" = . ] || ln -fs $$<

Maybe the symbolic link file in the build directory could be prefixed
with "lnk_"... (see following below)

>  	$Q $(OBJCOPY) -I binary -B $(RTE_OBJCOPY_ARCH) -O $(RTE_OBJCOPY_TARGET) \
>  		--rename-section                                         \
>  			.data=.rodata,alloc,load,data,contents,readonly  \
> -		--redefine-sym _binary_resource_tmp_start=beg_$(1)       \
> -		--redefine-sym _binary_resource_tmp_end=end_$(1)         \
> -		--redefine-sym _binary_resource_tmp_size=siz_$(1)        \
> -		resource.tmp $$@ && rm -f resource.tmp
> +		--redefine-sym _binary_$$(subst .,_,$$(<F))_start=beg_$(1) \
> +		--redefine-sym _binary_$$(subst .,_,$$(<F))_end=end_$(1)   \
> +		--redefine-sym _binary_$$(subst .,_,$$(<F))_size=siz_$(1)  \
> +		$$(<F) $$@
>  endef
>  
>  ifeq ($(CONFIG_RTE_APP_TEST_RESOURCE_TAR),y)
> @@ -76,7 +76,9 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) := commands.c
>  SRCS-y += test.c
>  SRCS-y += resource.c
>  SRCS-y += test_resource.c
> -$(eval $(call linked_resource,test_resource_c,resource.c))
> +test_resource.res: test_resource.c
> +	@ cp $< $@
> +$(eval $(call linked_resource,test_resource_c,test_resource.res))
>  $(eval $(call linked_tar_resource,test_resource_tar,test_resource.c))
>  SRCS-$(CONFIG_RTE_APP_TEST_RESOURCE_TAR) += test_pci.c
>  $(eval $(call linked_tar_resource,test_pci_sysfs,test_pci_sysfs))

...this would avoid to rename the resource file and make the patch
easier to understand.

Olivier

  reply	other threads:[~2016-06-24 14:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23 22:36 [PATCH] mk: fix parallel build of test resources Thomas Monjalon
2016-06-24 11:22 ` [PATCH v2] " Thomas Monjalon
2016-06-24 14:06   ` Olivier Matz [this message]
2016-06-24 14:19     ` Thomas Monjalon
2016-06-24 14:24       ` Olivier Matz
2016-06-24 14:59         ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=576D3E5A.6060108@6wind.com \
    --to=olivier.matz@6wind.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.