From: Masahiro Yamada <masahiroy@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nicolas@fjasle.eu>,
Rob Clark <robdclark@gmail.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>,
linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org,
dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org
Subject: Re: [PATCH RFC 01/12] kbuild: create destination directory for _shipped handling
Date: Tue, 27 Feb 2024 23:52:32 +0900 [thread overview]
Message-ID: <CAK7LNASTCNRQBG3DAFaMi4k4LUfoeU7q-JV4q8TLFqrD4YLSww@mail.gmail.com> (raw)
In-Reply-To: <CAA8EJpqhjXjaKKhp3HGxpwN+fLnL9tC_T1ibpK4TVmgayeaQwg@mail.gmail.com>
On Mon, Feb 26, 2024 at 8:01 PM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> On Mon, 26 Feb 2024 at 08:33, Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > On Mon, Feb 26, 2024 at 11:11 AM Dmitry Baryshkov
> > <dmitry.baryshkov@linaro.org> wrote:
> > >
> > > The driver might decide to put the _shipped files to the subdir.
> >
> >
> >
> > Please stop this sentence.
> >
> > This sounds like we are not learning.
> >
> > https://lore.kernel.org/all/CAHk-=wgSEi_ZrHdqr=20xv+d6dr5G895CbOAi8ok+7-CQUN=fQ@mail.gmail.com/
> >
> >
> >
> >
> > > In such
> > > case the cmd_copy might fail because the destination directory is not
> > > present. Call mkdir -p to make sure that the destination directory is
> > > present.
> >
> >
> > There is no justification for this.
> >
> > If you need a single generated directory
> > (drivers/gpu/drm/msm/registers/, divers/gpu/drm/msm/generated/ or whatever)
> > that should be super simple.
> >
> > Why does scripts/Makefile.lib need the modification?
>
> Could you please tell me how I should handle this?
> I was looking for a way to generate
> drivers/gpu/drm/msm/registers/foo.xml.h and then use it during
> compilation.
> In drivers/gpu/drm/msm/Makefile I added $(obj)/registers/foo.xml.h as
> a dependency to the corresponding object files and then added
> drivers/gpu/drm/msm/registers/foo.xml.h_shipped file.
> This way Kbuild/make will attempt to call cmd_copy to generate target
> file, which thanks to VPATH expansion boils down to `cat
> $(srctree)/$(src)/registers/foo.xml.h_shopped >
> $(obj)/registers/foo.xml.h`. However this breaks as there is no
> $(obj)/registers.
>
One simple solution is to use $(shell mkdir -p ...)
to create the output directory.
scripts/Makefile.build does a similar thing.
You can add the following to drivers/gpu/drm/msm/Makefile.
# Create output directory when CONFIG_DRM_MSM is defined.
# This avoids creating the output directory during 'make clean'
ifdef CONFIG_DRM_MSM
$(shell mkdir -p $(obj)/registers)
endif
--
Best Regards
Masahiro Yamada
next prev parent reply other threads:[~2024-02-27 14:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 2:11 [PATCH RFC 00/12] drm/msm: add support for regenerating shipped xml.h headers Dmitry Baryshkov
2024-02-26 2:11 ` [PATCH RFC 01/12] kbuild: create destination directory for _shipped handling Dmitry Baryshkov
2024-02-26 6:32 ` Masahiro Yamada
2024-02-26 11:01 ` Dmitry Baryshkov
2024-02-27 14:52 ` Masahiro Yamada [this message]
2024-02-26 2:11 ` [PATCH RFC 02/12] drm/msm/mdp5: add writeback block bases Dmitry Baryshkov
2024-02-26 2:11 ` [PATCH RFC 03/12] drm/msm/hdmi: drop qfprom.xml.h Dmitry Baryshkov
2024-02-26 2:11 ` [PATCH RFC 04/12] drm/msm/dsi: drop mmss_cc.xml.h Dmitry Baryshkov
2024-02-26 2:11 ` [PATCH RFC 05/12] drm/msm: use _shipped suffix for all xml.h files Dmitry Baryshkov
2024-02-27 3:13 ` Masahiro Yamada
2024-02-26 2:11 ` [PATCH RFC 06/12] drm/msm/headergen: import source files from freedreno/envytools Dmitry Baryshkov
2024-02-26 2:11 ` [PATCH RFC 07/12] drm/msm/headergen: use asprintf instead of custom aprintf Dmitry Baryshkov
2024-02-26 2:11 ` [PATCH RFC 08/12] drm/msm/headergen: don't output full file paths Dmitry Baryshkov
2024-02-26 2:11 ` [PATCH RFC 09/12] drm/msm/headergen: generate _shipped files Dmitry Baryshkov
2024-02-26 2:11 ` [PATCH RFC 10/12] drm/msm: import XML registers database Dmitry Baryshkov
2024-02-26 2:11 ` [PATCH RFC 11/12] drm/msm: tie regeneration of shipped headers Dmitry Baryshkov
2024-02-26 2:11 ` [PATCH RFC 12/12] drm/msm: sync shipped headers database Dmitry Baryshkov
2024-02-26 6:24 ` [PATCH RFC 00/12] drm/msm: add support for regenerating shipped xml.h headers Masahiro Yamada
2024-02-26 10:49 ` Dmitry Baryshkov
2024-02-27 3:29 ` Masahiro Yamada
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=CAK7LNASTCNRQBG3DAFaMi4k4LUfoeU7q-JV4q8TLFqrD4YLSww@mail.gmail.com \
--to=masahiroy@kernel.org \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=nathan@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
/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).