From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] linux/linux-ext-fbtft: remove unnecessary ; \
Date: Wed, 2 Nov 2016 22:45:02 +0100 [thread overview]
Message-ID: <20161102224502.4e5c3d3b@free-electrons.com> (raw)
In-Reply-To: <1478121182-17011-1-git-send-email-david@lechnology.com>
Hello,
On Wed, 2 Nov 2016 16:13:02 -0500, David Lechner wrote:
> The makefile has some unnecessary instances of ; \ at the end of the lines,
> so remove them to make code a bit more readable.
>
> Signed-off-by: David Lechner <david@lechnology.com>
> ---
> linux/linux-ext-fbtft.mk | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/linux/linux-ext-fbtft.mk b/linux/linux-ext-fbtft.mk
> index 5eb3d94..64e65a1 100644
> --- a/linux/linux-ext-fbtft.mk
> +++ b/linux/linux-ext-fbtft.mk
> @@ -13,10 +13,10 @@ define FBTFT_PREPARE_KERNEL
> dest=drivers/video/fbdev ; \
> else \
> dest=drivers/video ; \
> - fi ; \
> - mkdir -p $(LINUX_DIR)/$${dest}/fbtft; \
> - cp -dpfr $(FBTFT_DIR)/* $(LINUX_DIR)/$${dest}/fbtft/ ; \
> + fi
> + mkdir -p $(LINUX_DIR)/$${dest}/fbtft
> + cp -dpfr $(FBTFT_DIR)/* $(LINUX_DIR)/$${dest}/fbtft/
> echo "source \"$${dest}/fbtft/Kconfig\"" \
> - >> $(LINUX_DIR)/$${dest}/Kconfig ; \
> + >> $(LINUX_DIR)/$${dest}/Kconfig
Did you test this? It won't work. Indeed in this case, you are sharing
a shell variable between multiple commands, so they must be a single
shell command.
It can however probably be rewritten in make like this:
define FBTFT_PREPARE_KERNEL_INNER
mkdir -p $(LINUX_DIR)/$(1)/fbtft
cp -dpfr $(FBTFT_DIR)/* $(LINUX_DIR)/$(1)/fbtft/
echo "source \"$(1)/fbtft/Kconfig\"" \
>> $(LINUX_DIR)/$(1)/Kconfig
echo 'obj-y += fbtft/' >> $(LINUX_DIR)/$(1)/Makefile
endef
define FBTFT_PREPARE_KERNEL
$(if $(wildcard $(LINUX_DIR)/drivers/video/fbdev), \
$(call FBTFT_PREPARE_KERNEL_INNER,drivers/video/fbdev), \
$(call FBTFT_PREPARE_KERNEL_INNER,drivers/video/) \
)
endef
However, I am not sure it is really more readable.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-11-02 21:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-02 21:13 [Buildroot] [PATCH] linux/linux-ext-fbtft: remove unnecessary ; \ David Lechner
2016-11-02 21:45 ` Thomas Petazzoni [this message]
2016-11-02 21:49 ` David Lechner
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=20161102224502.4e5c3d3b@free-electrons.com \
--to=thomas.petazzoni@free-electrons.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