Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3] package/dosfstools: introduce custom install routine
Date: Fri, 31 May 2019 21:24:10 +0200	[thread overview]
Message-ID: <20190531212410.28aca8d7@windsurf> (raw)
In-Reply-To: <CAGt4E5ugVZfpy_pcrQ0ZSPm1y5xupb1NCmU+uzm7LzWsej92sQ@mail.gmail.com>

Hello Markus,

On Fri, 31 May 2019 08:32:54 -0700
Markus Mayer <mmayer@broadcom.com> wrote:

> Right. Won't I have to define the install macros as empty if they are
> supposed to be noops?
> 
> Like this:
> 
> ifeq ($(BR2_PACKAGE_DOSFSTOOLS_FATLABEL),y)
> define DOSFSTOOLS_REMOVE_FATLABEL
> ... install code here ...
> endef
> else
> # empty declaration
> define DOSFSTOOLS_REMOVE_FATLABEL
> endef
> endif

No: undefined variables in make are automatically empty, so there's no
need for this else condition. We use this principle all over Buildroot.


> > define DOSFSTOOLS_INSTALL_TARGET_CMDS
> >         $(foreach f,$(DOSFSTOOLS_INSTALL_FILES_y), \
> >                 $(INSTALL) -D -m 0744 $(@D)/src/$(f) $(TARGET_DIR)/sbin/$(f)  
> 
> 0755 I imagine? :-)

Yes, indeed, sorry.

> >         $(foreach l,$(DOSFSTOOLS_INSTALL_SYMLINKS_y), \
> >                 ln -s $(word 2,$(subst :, ,$(l))) $(TARGET_DIR)/sbin/$(word 1,$(subst :, ,$(l)))
> >         )
> > endef
> >
> > But admittedly, it becomes a bit hackish, and we don't do that anywhere
> > in Buildroot today. So probably sticking to three
> > DOSFSTOOLS_INSTALL_<foo> defines is better for now.  
> 
> This is an interesting approach. But I'll likely stick with the other one.

Yes, as I said, I think it makes more sense to stick to the simpler
approach for now.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      reply	other threads:[~2019-05-31 19:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-30 23:42 [Buildroot] [PATCH v3] package/dosfstools: introduce custom install routine Markus Mayer
2019-05-31 14:34 ` Thomas Petazzoni
2019-05-31 15:32   ` Markus Mayer
2019-05-31 19:24     ` Thomas Petazzoni [this message]

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=20190531212410.28aca8d7@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /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