All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: Andrew Cooper <Andrew.Cooper3@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Wei Liu <wl@xen.org>, Juergen Gross <jgross@suse.com>
Subject: Re: [XEN PATCH for-4.17 v5 14/17] libs/light: Rework targets prerequisites
Date: Mon, 17 Oct 2022 15:39:06 +0100	[thread overview]
Message-ID: <Y01pCiLyPPEXVtVp@perard.uk.xensource.com> (raw)
In-Reply-To: <d6e4825f-6fd3-b48b-7a7b-e4f62acadd38@citrix.com>

On Fri, Oct 14, 2022 at 07:35:20PM +0000, Andrew Cooper wrote:
> On 13/10/2022 14:05, Anthony Perard wrote:
> > No need for $(AUTOSRCS), GNU make can generate them as needed when
> > trying to build them as needed when trying to build the object. Also,
> > those two AUTOSRCS don't need to be a prerequisite of "all". As for
> > the "clean" target, those two files are already removed via "_*.c".
> >
> > We don't need $(AUTOINCS) either:
> > - As for both _libxl_savm_msgs*.h headers, we are adding more
> >   selective dependencies so the headers will still be generated as
> >   needed.
> > - "clean" rule already delete the _*.h files, so AUTOINCS aren't needed
> >   there.
> >
> > "libxl_internal_json.h" doesn't seems to have ever existed, so the
> > dependency is removed.
> >
> > Add few prerequisite for "libxl_internal.h" so all headers that it
> > depends on should be generated. And have $(SAVE_HELPER_OBJS) depends
> > on "libxl_internal.h".
> >
> > Rework objects prerequisites, to have them dependents on either
> > "libxl.h" or "libxl_internal.h". "libxl.h" is not normally included
> > directly in the source code as "libxl_internal.h" is used instead. But
> > we are adding "libxl.h" as prerequisite of "libxl_internal.h", so
> > generated headers will still be generated as needed.
> >
> > "testidl.c" doesn't depends on "libxl.h" but "testidl.o" does.
> 
> I'm afraid I don't follow here.  How can this be true?

From make point-of-view, in order to generate "testidl.c", we only need
to execute "gentest.py" which takes "libxl_types.idl" as input. It
doesn't even matter if "libxl.h" exist when generating "testidl.c" via
`make testidl.c`.

"libxl.h" is only used later when compiling "testidl.c" into
"testidl.o".

I can probably expand the commit message to better explain this.

Thanks,

-- 
Anthony PERARD


  reply	other threads:[~2022-10-17 14:39 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 13:04 [XEN PATCH for-4.17 v5 00/17] Toolstack build system improvement, toward non-recursive makefiles Anthony PERARD
2022-10-13 13:04 ` [XEN PATCH for-4.17 v5 01/17] tools/debugger/gdbsx: Fix and cleanup makefiles Anthony PERARD
2022-10-13 13:04 ` [XEN PATCH for-4.17 v5 02/17] tools/xentrace: rework Makefile Anthony PERARD
2022-10-13 13:04 ` [XEN PATCH for-4.17 v5 03/17] tools: Introduce $(xenlibs-ldflags, ) macro Anthony PERARD
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 04/17] tools: Add -Werror by default to all tools/ Anthony PERARD
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 05/17] tools: Remove -Werror everywhere else Anthony PERARD
2022-10-13 15:13   ` Andrew Cooper
2022-10-14 10:16     ` Anthony PERARD
2022-10-14 15:06   ` Anthony PERARD
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 06/17] tools/hotplug: Generate "hotplugpath.sh" with configure Anthony PERARD
2022-10-14 18:03   ` Andrew Cooper
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 07/17] libs/light/gentypes.py: allow to generate headers in subdirectory Anthony PERARD
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 08/17] git-checkout.sh: handle running git-checkout from a different directory Anthony PERARD
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 09/17] libs: Avoid exposing -Wl,--version-script to other built library Anthony PERARD
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 10/17] libs: Fix auto-generation of version-script for unstable libs Anthony PERARD
2022-10-14 18:16   ` Andrew Cooper
2022-10-17 14:19     ` Anthony PERARD
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 11/17] tools/include: Rework Makefile Anthony PERARD
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 12/17] libs/light: Rework acpi table build targets Anthony PERARD
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 13/17] libs/light: Rework generation of include/_libxl_*.h Anthony PERARD
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 14/17] libs/light: Rework targets prerequisites Anthony PERARD
2022-10-14 19:35   ` Andrew Cooper
2022-10-17 14:39     ` Anthony PERARD [this message]
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 15/17] libs/light: Makefile cleanup Anthony PERARD
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 16/17] tools/golang/xenlight: Rework gengotypes.py and generation of *.gen.go Anthony PERARD
2022-10-13 15:00   ` Andrew Cooper
2022-10-14 11:24     ` George Dunlap
2022-10-14 11:37       ` Andrew Cooper
2022-10-14 11:42         ` George Dunlap
2022-10-14 11:51           ` Andrew Cooper
2022-10-14 11:25   ` George Dunlap
2022-10-13 13:05 ` [XEN PATCH for-4.17 v5 17/17] tools: Rework linking options for ocaml binding libraries Anthony PERARD
2022-10-13 18:02 ` [XEN PATCH for-4.17 v5 00/17] Toolstack build system improvement, toward non-recursive makefiles Andrew Cooper
2022-10-14  6:26   ` Henry Wang
2022-10-14 10:14     ` Anthony PERARD
2022-10-14 10:28       ` Henry Wang
2022-10-14 10:31       ` Andrew Cooper
2022-10-14 10:39         ` Henry Wang
2022-10-14 12:55 ` Christian Lindig

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=Y01pCiLyPPEXVtVp@perard.uk.xensource.com \
    --to=anthony.perard@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=jgross@suse.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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 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.