Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Herve Codina <herve.codina@bootlin.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 1/5] package/alchemy: new host package
Date: Sat, 1 Jan 2022 16:50:22 +0100	[thread overview]
Message-ID: <20220101155022.GD2777@scaer> (raw)
In-Reply-To: <20211112131258.2671293-2-herve.codina@bootlin.com>

Hervé, All,

On 2021-11-12 14:12 +0100, Herve Codina spake thusly:
> Alchemy is a build system developed by Parrot.
> 
> It is a new build system based on the one used in Android.
> A central makefile instance scans a workspace to find user
> makefiles, includes them and register modules to be built.
> 
> https://github.com/Parrot-Developers/alchemy
> 
> Signed-off-by: Herve Codina <herve.codina@bootlin.com>

I was about to push this, with a few changes, but I have some questions
about the packages, so here's the patch of the changes I did:

    [yann.morin.1998@free.fr:
      - use ALCHEMY_HOME everywhere rather than repeating the location in
        the install macro
      - don't remove install dir before installing
      - use a template for atom.mk, not in-line in alchemy.mk
    ]

    diff --git a/package/alchemy/alchemy.mk b/package/alchemy/alchemy.mk
    index 63d5a941c5..f802c62425 100644
    --- a/package/alchemy/alchemy.mk
    +++ b/package/alchemy/alchemy.mk
    @@ -10,19 +10,19 @@ ALCHEMY_LICENSE = BSD-3-Clause (Alchemy), GPL-2.0 (kconfig)
     ALCHEMY_LICENSE_FILES = COPYING README
     HOST_ALCHEMY_DEPENDENCIES = host-python3
     
    +ALCHEMY_HOME = $(HOST_DIR)/opt/alchemy
     ALCHEMY_SDK_BASEDIR = $(STAGING_DIR)/usr/lib/alchemy/sdk
     
     define HOST_ALCHEMY_INSTALL_CMDS
    -	rm -rf $(HOST_DIR)/opt/alchemy
    -	mkdir -p $(HOST_DIR)/opt/alchemy
    -	cp -rf $(@D)/* $(HOST_DIR)/opt/alchemy/
    +	mkdir -p $(ALCHEMY_HOME)
    +	cp -rf $(@D)/* $(ALCHEMY_HOME)
    +	cp $(ALCHEMY_PKGDIR)/atom.mk.in $(ALCHEMY_HOM	E)/atom.mk.in
     endef
     
     $(eval $(host-generic-package))
     
     # Variables used by other packages
     
    -ALCHEMY_HOME = $(HOST_DIR)/opt/alchemy
     ALCHEMY_MAKE = $(ALCHEMY_HOME)/scripts/alchemake
     
     # TARGET_ARCH is set to 'xxx' to avoid Alchemy managing the architecture.
    @@ -59,14 +59,11 @@ endif
     # $2: Alchemy module name
     # $3: Alchemy module file name
     define ALCHEMY_INSTALL_LIB_SDK_FILE
    -	mkdir -p $(ALCHEMY_SDK_BASEDIR)/$(strip $(1))
    -	( \
    -		echo 'LOCAL_PATH := $$(call my-dir)'; \
    -		echo 'include $$(CLEAR_VARS)'; \
    -		echo 'LOCAL_MODULE := $(strip $(2))'; \
    -		echo 'LOCAL_SDK := $(STAGING_DIR)'; \
    -		echo 'LOCAL_DESTDIR := usr/lib'; \
    -		echo 'LOCAL_MODULE_FILENAME := $(strip $(3))'; \
    -		echo 'include $$(BUILD_LIBRARY)'; \
    -	) > $(ALCHEMY_SDK_BASEDIR)/$(strip $(1))/atom.mk
    +	$(INSTALL) -m 0644 -D \
    +		$(ALCHEMY_HOME)/atom.mk.in \
    +		$(ALCHEMY_SDK_BASEDIR)/$(strip $(1))/atom.mk
    +	$(SED) 's#@STAGING_DIR@#$(STAGING_DIR)#' \
    +		-e 's#@MODULE@#$(strip $(2))#' \
    +		-e 's#@MODULE_FILENAME@#$(strip $(3))#' \
    +		$(ALCHEMY_SDK_BASEDIR)/$(strip $(1))/atom.mk
     endef
    diff --git a/package/alchemy/atom.mk.in b/package/alchemy/atom.mk.in
    new file mode 100644
    index 0000000000..30eb6d5e23
    --- /dev/null
    +++ b/package/alchemy/atom.mk.in
    @@ -0,0 +1,7 @@
    +LOCAL_PATH := $(call my-dir)
    +include $(CLEAR_VARS)
    +LOCAL_MODULE := @MODULE@
    +LOCAL_SDK := @STAGING_DIR@
    +LOCAL_DESTDIR := usr/lib
    +LOCAL_MODULE_FILENAME := @MODULE_FILENAME@
    +include $(BUILD_LIBRARY)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-01-01 15:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12 13:12 [Buildroot] [PATCH v2 0/5] Add Alchemy build system and some related libs Herve Codina
2021-11-12 13:12 ` [Buildroot] [PATCH v2 1/5] package/alchemy: new host package Herve Codina
2022-01-01 15:50   ` Yann E. MORIN [this message]
2022-01-09 15:17     ` Herve Codina
2021-11-12 13:12 ` [Buildroot] [PATCH v2 2/5] package/ulog: new package Herve Codina
2022-01-01 16:05   ` Yann E. MORIN
2022-01-10  9:02     ` Herve Codina
2021-11-12 13:12 ` [Buildroot] [PATCH v2 3/5] package/libfutils: " Herve Codina
2021-11-12 13:12 ` [Buildroot] [PATCH v2 4/5] package/libshdata: " Herve Codina
2021-11-12 13:12 ` [Buildroot] [PATCH v2 5/5] support/testing/tests/package/test_libshdata: new test Herve Codina

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=20220101155022.GD2777@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=herve.codina@bootlin.com \
    --cc=thomas.petazzoni@bootlin.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