public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: "H.J. Lu" <hjl.tools@gmail.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH v2] elf: Use a temporary file to generate Makefile fragments [BZ #28550]
Date: Tue, 16 Nov 2021 10:16:36 -0300	[thread overview]
Message-ID: <eaf7efea-f140-6a72-002d-3aa0acaf8eb0@linaro.org> (raw)
In-Reply-To: <20211116131418.2070092-1-hjl.tools@gmail.com>



On 16/11/2021 10:14, H.J. Lu wrote:
> 1. Use a temporary file to generate Makefile fragments for DSO sorting
> tests and use -include on them.
> 2. Add Makefile fragments to postclean-generated so that a "make clean"
> removes the autogenerated fragments and a subsequent "make" regenerates
> them.
> 
> This partially fixes BZ #28550.

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  elf/Makefile | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/elf/Makefile b/elf/Makefile
> index a311c3e23c..525f302d1a 100644
> --- a/elf/Makefile
> +++ b/elf/Makefile
> @@ -491,6 +491,7 @@ tests-special += $(objpfx)order-cmp.out $(objpfx)tst-array1-cmp.out \
>  		 $(objpfx)tst-unused-dep-cmp.out
>  endif
>  
> +ifndef avoid-generated
>  # DSO sorting tests:
>  # The dso-ordering-test.py script generates testcase source files in $(objpfx),
>  # creating a $(objpfx)<testcase-name>-dir for each testcase, and creates a
> @@ -498,9 +499,14 @@ endif
>  define include_dsosort_tests
>  $(objpfx)$(1).generated-makefile: $(1)
>  	$(PYTHON) $(..)scripts/dso-ordering-test.py \
> -	--description-file $$< --objpfx $(objpfx) --output-makefile $$@
> -include $(objpfx)$(1).generated-makefile
> +	--description-file $$< --objpfx $(objpfx) --output-makefile $$@T
> +	mv $$@T $$@
> +-include $(objpfx)$(1).generated-makefile
>  endef
> +endif
> +
> +postclean-generated += $(objpfx)/dso-sort-tests-2.generated-makefile \
> +		       $(objpfx)/dso-sort-tests-2.generated-makefile
>  
>  # Generate from each testcase description file
>  ifeq (yes,$(have-tunables))
> 

  reply	other threads:[~2021-11-16 13:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 13:14 H.J. Lu
2021-11-16 13:16 ` Adhemerval Zanella [this message]
2021-11-17 13:49 ` Florian Weimer
2021-11-17 13:56   ` H.J. Lu
2021-11-17 15:29     ` Florian Weimer
2021-11-17 15:39       ` H.J. Lu
2021-11-17 15:52         ` Florian Weimer
2021-11-17 16:02           ` H.J. Lu
2021-11-17 16:41             ` Florian Weimer

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=eaf7efea-f140-6a72-002d-3aa0acaf8eb0@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).