Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Stefan <buildroot-list_21@green-sparklet.de>
Cc: buildroot@busybox.net, Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: Re: [Buildroot] [PATCH] docs/manual/adding-packages-cargo.txt: re-add FOO_CARGO_MODE variable
Date: Tue, 20 Jul 2021 23:47:29 +0200	[thread overview]
Message-ID: <20210720234729.04a7349c@windsurf> (raw)
In-Reply-To: <2e60c4dc-6a6f-7124-c512-2b4495482f4c@green-sparklet.de>

Hello Stefan,

On Tue, 15 Jun 2021 15:55:54 +0200
Stefan <buildroot-list_21@green-sparklet.de> wrote:

> +16: FOO_CARGO_MODE = $(if $(BR2_ENABLE_DEBUG),debug,release)
> +17:
> +18: FOO_BIN_DIR = target/$(RUSTC_TARGET_NAME)/$(FOO_CARGO_MODE)
> +19:
> +20: FOO_CARGO_OPTS = \
> +21:    $(if $(BR2_ENABLE_DEBUG),,--release) \
> +22:    --target=$(RUSTC_TARGET_NAME) \
> +23:    --manifest-path=$(@D)/Cargo.toml
> +24:
> +25: define FOO_BUILD_CMDS
> +26:    $(TARGET_MAKE_ENV) $(FOO_CARGO_ENV) \
> +27:            cargo build $(FOO_CARGO_OPTS)
> +28: endef
> +29:
> +30: define FOO_INSTALL_TARGET_CMDS
> +31:    $(INSTALL) -D -m 0755 $(@D)/$(FOO_BIN_DIR)/foo \
> +32:            $(TARGET_DIR)/usr/bin/foo
> +33: endef
> +34:
> +35: $(eval $(generic-package))

Thanks for the patch. However, it seems like the only package that uses
this currently is not formatted like you're suggesting. See
package/ripgrep/ripgrep.mk. First, it uses BR2_ENABLE_RUNTIME_DEBUG
instead of BR2_ENABLE_DEBUG, and it does it in a different way.

Could you adjust the documentation according to what
package/ripgrep/ripgrep.mk is doing ?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] docs/manual/adding-packages-cargo.txt: re-add FOO_CARGO_MODE variable
Date: Tue, 20 Jul 2021 23:47:29 +0200	[thread overview]
Message-ID: <20210720234729.04a7349c@windsurf> (raw)
Message-ID: <20210720214729.WSEJAO5tlx79mTmq1uIQCREqU-YKgFAkMgtoim7AAc0@z> (raw)
In-Reply-To: <2e60c4dc-6a6f-7124-c512-2b4495482f4c@green-sparklet.de>

Hello Stefan,

On Tue, 15 Jun 2021 15:55:54 +0200
Stefan <buildroot-list_21@green-sparklet.de> wrote:

> +16: FOO_CARGO_MODE = $(if $(BR2_ENABLE_DEBUG),debug,release)
> +17:
> +18: FOO_BIN_DIR = target/$(RUSTC_TARGET_NAME)/$(FOO_CARGO_MODE)
> +19:
> +20: FOO_CARGO_OPTS = \
> +21:    $(if $(BR2_ENABLE_DEBUG),,--release) \
> +22:    --target=$(RUSTC_TARGET_NAME) \
> +23:    --manifest-path=$(@D)/Cargo.toml
> +24:
> +25: define FOO_BUILD_CMDS
> +26:    $(TARGET_MAKE_ENV) $(FOO_CARGO_ENV) \
> +27:            cargo build $(FOO_CARGO_OPTS)
> +28: endef
> +29:
> +30: define FOO_INSTALL_TARGET_CMDS
> +31:    $(INSTALL) -D -m 0755 $(@D)/$(FOO_BIN_DIR)/foo \
> +32:            $(TARGET_DIR)/usr/bin/foo
> +33: endef
> +34:
> +35: $(eval $(generic-package))

Thanks for the patch. However, it seems like the only package that uses
this currently is not formatted like you're suggesting. See
package/ripgrep/ripgrep.mk. First, it uses BR2_ENABLE_RUNTIME_DEBUG
instead of BR2_ENABLE_DEBUG, and it does it in a different way.

Could you adjust the documentation according to what
package/ripgrep/ripgrep.mk is doing ?

Thanks a lot!

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

  reply	other threads:[~2021-07-20 21:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15 13:55 [Buildroot] [PATCH] docs/manual/adding-packages-cargo.txt: re-add FOO_CARGO_MODE variable Stefan
2021-07-20 21:47 ` Thomas Petazzoni [this message]
2021-07-20 21:47   ` Thomas Petazzoni

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=20210720234729.04a7349c@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot-list_21@green-sparklet.de \
    --cc=buildroot@busybox.net \
    --cc=fontaine.fabrice@gmail.com \
    /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