diff mbox

[1/2] freescale-imx: separate variable assignment from Makefile

Message ID 1380650790-18097-2-git-send-email-eric.nelson@boundarydevices.com
State Superseded
Headers show

Commit Message

Eric Nelson Oct. 1, 2013, 6:06 p.m. UTC
This patch pulls the variable assignments for the site and
version from freescale-imx.mk and places them into freescale-imx.inc
so they can be used by components in other trees
(e.g. gstreamer plugins).

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
---
 package/freescale-imx/freescale-imx.inc | 9 +++++++++
 package/freescale-imx/freescale-imx.mk  | 6 +-----
 2 files changed, 10 insertions(+), 5 deletions(-)
 create mode 100644 package/freescale-imx/freescale-imx.inc

Comments

Eric Nelson Oct. 1, 2013, 6:08 p.m. UTC | #1
Hi Arnout,

On 10/01/2013 11:06 AM, Eric Nelson wrote:
> This patch pulls the variable assignments for the site and
> version from freescale-imx.mk and places them into freescale-imx.inc
> so they can be used by components in other trees
> (e.g. gstreamer plugins).
>
> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
> ---
>   package/freescale-imx/freescale-imx.inc | 9 +++++++++
>   package/freescale-imx/freescale-imx.mk  | 6 +-----
>   2 files changed, 10 insertions(+), 5 deletions(-)
>   create mode 100644 package/freescale-imx/freescale-imx.inc
>
> diff --git a/package/freescale-imx/freescale-imx.inc b/package/freescale-imx/freescale-imx.inc
> new file mode 100644
> index 0000000..51709f4
> --- /dev/null
> +++ b/package/freescale-imx/freescale-imx.inc
> @@ -0,0 +1,9 @@
> +################################################################################
> +#
> +# Set freescale-imx variables to make it easy to align versions of various
> +# packages
> +#
> +################################################################################
> +FREESCALE_IMX_VERSION = 3.5.7-1.0.0
> +FREESCALE_IMX_SITE   = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/
> +
> diff --git a/package/freescale-imx/freescale-imx.mk b/package/freescale-imx/freescale-imx.mk
> index 2762972..46f4ddb 100644
> --- a/package/freescale-imx/freescale-imx.mk
> +++ b/package/freescale-imx/freescale-imx.mk
> @@ -4,9 +4,5 @@
>   #
>   ################################################################################
>
> -FREESCALE_IMX_VERSION = 3.5.7-1.0.0
> -
> -FREESCALE_IMX_SITE   = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/
> -#FREESCALE_IMX_MIRROR_SITE   = http://download.ossystems.com.br/bsp/freescale/source
> -
> +include package/freescale-imx/freescale-imx.inc
>   include $(sort $(wildcard package/freescale-imx/*/*.mk))
>

Note that with this patch, we could leave libfslcodec, libfslparser,
and libvpuwrap in their original locations if that's what you'd
like to do.

I still have a preference to keep them together, FWIW.

Regards,


Eric
Thomas Petazzoni Oct. 1, 2013, 7:44 p.m. UTC | #2
Dear Eric Nelson,

On Tue,  1 Oct 2013 11:06:29 -0700, Eric Nelson wrote:
> This patch pulls the variable assignments for the site and
> version from freescale-imx.mk and places them into freescale-imx.inc
> so they can be used by components in other trees
> (e.g. gstreamer plugins).
> 
> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
> ---
>  package/freescale-imx/freescale-imx.inc | 9 +++++++++
>  package/freescale-imx/freescale-imx.mk  | 6 +-----

I know there has been past discussion with Arnout on this, but I
clearly don't agree with the introduction of this new .inc extension in
our makefiles.

Due to how make expands variable, I am not sure it is needed for the
FREESCALE_IMX_VERSION and FREESCALE_IMX_SITE variables to be defined
before they are used.

Thomas
Eric Nelson Oct. 1, 2013, 9:19 p.m. UTC | #3
Hi Thomas,

On 10/01/2013 12:44 PM, Thomas Petazzoni wrote:
> Dear Eric Nelson,
>
> On Tue,  1 Oct 2013 11:06:29 -0700, Eric Nelson wrote:
>> This patch pulls the variable assignments for the site and
>> version from freescale-imx.mk and places them into freescale-imx.inc
>> so they can be used by components in other trees
>> (e.g. gstreamer plugins).
>>
>> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
>> ---
>>   package/freescale-imx/freescale-imx.inc | 9 +++++++++
>>   package/freescale-imx/freescale-imx.mk  | 6 +-----
>
> I know there has been past discussion with Arnout on this, but I
> clearly don't agree with the introduction of this new .inc extension in
> our makefiles.
>
> Due to how make expands variable, I am not sure it is needed for the
> FREESCALE_IMX_VERSION and FREESCALE_IMX_SITE variables to be defined
> before they are used.
>

I can do that if I move packages/gstreamer/gst-fsl-plugins/ under
packages/freescale-imx, but not otherwise.

And as you said, we could have packages/gstreamer/Config.in
point at the new location, though that seems a bit odd.

Let me know how you'd like this handled. I just want to make
sure that everybody's using the latest and greatest code.

Regards,


Eric
Thomas Petazzoni Oct. 1, 2013, 9:27 p.m. UTC | #4
Dear Eric Nelson,

On Tue, 01 Oct 2013 14:19:09 -0700, Eric Nelson wrote:

> I can do that if I move packages/gstreamer/gst-fsl-plugins/ under
> packages/freescale-imx, but not otherwise.

Are you sure?

See:

$ cat foo.mk 
YOURPACKAGE_VERSION = $(FREESCALE_IMX_VERSION)

FREESCALE_IMX_VERSION = 42

all:
	@echo $(YOURPACKAGE_VERSION)

$ make -f foo.mk
42
$

This shows that the value of FREESCALE_IMX_VERSION can be given *after*
it is used.

Best regards,

Thomas
Eric Nelson Oct. 1, 2013, 9:50 p.m. UTC | #5
Hi Thomas,

You (and Arnout) are right, of course.

On 10/01/2013 02:27 PM, Thomas Petazzoni wrote:
> Dear Eric Nelson,
>
> On Tue, 01 Oct 2013 14:19:09 -0700, Eric Nelson wrote:
>
>> I can do that if I move packages/gstreamer/gst-fsl-plugins/ under
>> packages/freescale-imx, but not otherwise.
>
> Are you sure?
>
> See:
>
> $ cat foo.mk
> YOURPACKAGE_VERSION = $(FREESCALE_IMX_VERSION)
>
> FREESCALE_IMX_VERSION = 42
>
> all:
> 	@echo $(YOURPACKAGE_VERSION)
>
> $ make -f foo.mk
> 42
> $
>
> This shows that the value of FREESCALE_IMX_VERSION can be given *after*
> it is used.
>

As Arnout said, I didn't grok that this is Make, with no
sub-makes, so everything's global...

I'll re-submit the gstreamer patch without this bit.

Regards,


Eric
diff mbox

Patch

diff --git a/package/freescale-imx/freescale-imx.inc b/package/freescale-imx/freescale-imx.inc
new file mode 100644
index 0000000..51709f4
--- /dev/null
+++ b/package/freescale-imx/freescale-imx.inc
@@ -0,0 +1,9 @@ 
+################################################################################
+#
+# Set freescale-imx variables to make it easy to align versions of various
+# packages
+#
+################################################################################
+FREESCALE_IMX_VERSION = 3.5.7-1.0.0
+FREESCALE_IMX_SITE   = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/
+
diff --git a/package/freescale-imx/freescale-imx.mk b/package/freescale-imx/freescale-imx.mk
index 2762972..46f4ddb 100644
--- a/package/freescale-imx/freescale-imx.mk
+++ b/package/freescale-imx/freescale-imx.mk
@@ -4,9 +4,5 @@ 
 #
 ################################################################################
 
-FREESCALE_IMX_VERSION = 3.5.7-1.0.0
-
-FREESCALE_IMX_SITE   = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/
-#FREESCALE_IMX_MIRROR_SITE   = http://download.ossystems.com.br/bsp/freescale/source
-
+include package/freescale-imx/freescale-imx.inc
 include $(sort $(wildcard package/freescale-imx/*/*.mk))