Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/6] barebox: fix coding style
Date: Wed, 12 Mar 2014 07:45:15 +0100	[thread overview]
Message-ID: <5320027B.3000005@mind.be> (raw)
In-Reply-To: <20140311173350.GA3330@free.fr>

On 03/11/14 18:33, Yann E. MORIN wrote:
> Fabio, All,
> 
> On 2014-03-11 13:17 +0100, Fabio Porcedda spake thusly:
>> Break long lines.
> [--SNIP--]
>> -BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"
>> +BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) \
>> +	$(TARGET_CROSS)"

 Splitting a line between quotes is evil.

> 
> Although we have no written rule about thus, I'd rather that folded-lines
> assignments continue after the '=' sign, like:
> 
> BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) \
>                      $(TARGET_CROSS)"
> 
> It makes it easier to see the assignment.

 Or better yet (and this is the unwritten rule that we tend to follow):

BAREBOX_MAKE_FLAGS = \
	ARCH=$(BAREBOX_ARCH) \
	CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"


> 
>>  ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)
>> -BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
>> +BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,\
>> +	$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig

 Splitting a single path is also evil. We do usually keep the long lines
in such a case.

> 
> Ditto.
> 
>>  else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
>>  BAREBOX_SOURCE_CONFIG = $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
>>  endif
>>  
>>  define BAREBOX_CONFIGURE_CMDS
>> -	cp $(BAREBOX_SOURCE_CONFIG) $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
>> -	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
>> +	cp $(BAREBOX_SOURCE_CONFIG) \
>> +		$(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
>> +	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) \
>> +		buildroot_defconfig
>>  endef
>>  
>>  ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
>> @@ -68,7 +73,8 @@ endef
>>  endif
>>  
>>  ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y)
>> -BAREBOX_ENV_NAME = $(notdir $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
>> +BAREBOX_ENV_NAME = $(notdir $(call qstrip,\
>> +	$(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))

 This one is probably OK :-)


 Regards,
 Arnout

> 
> Ditto.
> 
> But I'd like the maintainer to Ack this before you resend. I have no
> strong opinion about it, I just find it easier to read...
> 
> Regards,
> Yann E. MORIN.
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  reply	other threads:[~2014-03-12  6:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-11 12:17 [Buildroot] [PATCH 0/6] Miscellauneus patches Fabio Porcedda
2014-03-11 12:17 ` [Buildroot] [PATCH 1/6] barebox: fix coding style Fabio Porcedda
2014-03-11 17:33   ` Yann E. MORIN
2014-03-12  6:45     ` Arnout Vandecappelle [this message]
2014-03-13 16:35       ` Fabio Porcedda
2014-03-17  6:20         ` Arnout Vandecappelle
2014-03-11 12:17 ` [Buildroot] [PATCH 2/6] Remove "dirs" dependencies Fabio Porcedda
2014-03-12  7:09   ` Arnout Vandecappelle
2014-03-11 12:17 ` [Buildroot] [PATCH 3/6] Makefile: fix coding style Fabio Porcedda
2014-03-12  7:55   ` Arnout Vandecappelle
2014-04-09  9:21     ` Fabio Porcedda
2014-03-11 12:17 ` [Buildroot] [PATCH 4/6] luajit: needs for 32bit archictectures a 32bit host gcc Fabio Porcedda
2014-03-11 19:16   ` François Perrad
2014-03-11 12:17 ` [Buildroot] [PATCH 5/6] infra: add to luarocks support for top-level parallel make Fabio Porcedda
2014-03-11 19:42   ` François Perrad
2014-04-01  8:39     ` Fabio Porcedda
2014-03-11 12:17 ` [Buildroot] [PATCH 6/6] Makefile: do not add the toolchain target to the TARGETS variable Fabio Porcedda
2014-03-17  7:42   ` Arnout Vandecappelle
2014-03-19 11:10     ` Fabio Porcedda
2014-03-19 11:46       ` Arnout Vandecappelle
2014-03-19 18:35         ` Yann E. MORIN
2014-03-20 10:01           ` Fabio Porcedda
2014-03-20  9:38         ` Fabio Porcedda
2014-03-20 10:13           ` Arnout Vandecappelle
2014-03-11 17:38 ` [Buildroot] [PATCH 0/6] Miscellauneus patches Fabio Porcedda

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=5320027B.3000005@mind.be \
    --to=arnout@mind.be \
    --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