* [ptxdist] [PATCH] lowpan-tools: new package
@ 2013-01-27 17:09 Alexander Aring
2013-01-29 22:40 ` Michael Olbrich
0 siblings, 1 reply; 9+ messages in thread
From: Alexander Aring @ 2013-01-27 17:09 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
This package provides utils to set up ieee802.15.4 devices.
Add option do not install test-utils. These test-utils depends
on python. Currently the buildsystem of lowpan-tools can't
disable building of test-tools, which makes a dependency of
python to this package.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
rules/lowpan-tools.in | 21 +++++++++++++
rules/lowpan-tools.make | 84 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 105 insertions(+)
create mode 100644 rules/lowpan-tools.in
create mode 100644 rules/lowpan-tools.make
diff --git a/rules/lowpan-tools.in b/rules/lowpan-tools.in
new file mode 100644
index 0000000..b83f44a
--- /dev/null
+++ b/rules/lowpan-tools.in
@@ -0,0 +1,21 @@
+## SECTION=networking
+
+menuconfig LOWPAN_TOOLS
+ tristate
+ prompt "lowpan-tools "
+ select LIBNL3
+ select PYTHON
+ help
+ This is a set of utils to manage the Linux LoWPAN stack.
+ The LoWPAN stack aims for IEEE 802.15.4-2003 (and for
+ lesser extent IEEE 802.15.4-2006) compatibility.
+
+if LOWPAN_TOOLS
+
+config LOWPAN_TOOLS_TESTS
+ bool
+ prompt "lowpan-tests"
+ help
+ Install lowpan-tests suites in /usr/libexec/lowpan-tools.
+
+endif # LOWPAN_TOOLS
diff --git a/rules/lowpan-tools.make b/rules/lowpan-tools.make
new file mode 100644
index 0000000..b40946f
--- /dev/null
+++ b/rules/lowpan-tools.make
@@ -0,0 +1,84 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Alexander Aring <aar@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LOWPAN_TOOLS) += lowpan-tools
+
+#
+# Paths and names
+#
+LOWPAN_TOOLS_VERSION := 0.3
+LOWPAN_TOOLS_MD5 := 564bdf163de5b33232d751383495a65c
+LOWPAN_TOOLS := lowpan-tools-$(LOWPAN_TOOLS_VERSION)
+LOWPAN_TOOLS_SUFFIX := tar.gz
+LOWPAN_TOOLS_URL := $(call ptx/mirror, SF, linux-zigbee/$(LOWPAN_TOOLS).$(LOWPAN_TOOLS_SUFFIX))
+LOWPAN_TOOLS_SOURCE := $(SRCDIR)/$(LOWPAN_TOOLS).$(LOWPAN_TOOLS_SUFFIX)
+LOWPAN_TOOLS_DIR := $(BUILDDIR)/$(LOWPAN_TOOLS)
+LOWPAN_TOOLS_LICENSE := GPLv2
+
+#
+# autoconf
+#
+LOWPAN_TOOLS_CONF_TOOL := autoconf
+LOWPAN_TOOLS_CONF_OPT := \
+ $(CROSS_AUTOCONF_USR) \
+ --disable-manpages \
+ --enable-shared \
+ --disable-static \
+ --with-gnu-ld
+
+LOWPAN_TOOLS_INSTALL_FILES-y =
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=gnl
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=izlisten
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=listen-packet
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test1
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test2
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test3
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test4
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test5
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test6
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test7
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_edscan.py
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_packets.py
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_recv.py
+LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_trx.py
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/lowpan-tools.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, lowpan-tools)
+ @$(call install_fixup, lowpan-tools,PRIORITY,optional)
+ @$(call install_fixup, lowpan-tools,SECTION,base)
+ @$(call install_fixup, lowpan-tools,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
+ @$(call install_fixup, lowpan-tools,DESCRIPTION,missing)
+
+ $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/bin/izchat)
+ $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/iz)
+ $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/izattach)
+ $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/izcoordinator)
+
+ifdef PTXCONF_LOWPAN_TOOLS_TESTS
+ @$(call install_copy, lowpan-tools, 0, 0, 0644, -, $(PYTHON_SITEPACKAGES)/test_DQ.pyc)
+
+ @$(foreach tool,$(LOWPAN_TOOLS_INSTALL_FILES-y), \
+ $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/libexec/lowpan-tools/$(tool));)
+endif
+
+ @$(call install_finish, lowpan-tools)
+
+ @$(call touch)
+
+# vim: syntax=make
--
1.8.1.1
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH] lowpan-tools: new package
2013-01-27 17:09 [ptxdist] [PATCH] lowpan-tools: new package Alexander Aring
@ 2013-01-29 22:40 ` Michael Olbrich
2013-01-30 11:12 ` Alexander Aring
0 siblings, 1 reply; 9+ messages in thread
From: Michael Olbrich @ 2013-01-29 22:40 UTC (permalink / raw)
To: ptxdist
On Sun, Jan 27, 2013 at 06:09:49PM +0100, Alexander Aring wrote:
> This package provides utils to set up ieee802.15.4 devices.
>
> Add option do not install test-utils. These test-utils depends
> on python. Currently the buildsystem of lowpan-tools can't
> disable building of test-tools, which makes a dependency of
> python to this package.
not true. By setting ac_cv_path_PYTHON=: you can force the build not to use
python.
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
> rules/lowpan-tools.in | 21 +++++++++++++
> rules/lowpan-tools.make | 84 +++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 105 insertions(+)
> create mode 100644 rules/lowpan-tools.in
> create mode 100644 rules/lowpan-tools.make
>
> diff --git a/rules/lowpan-tools.in b/rules/lowpan-tools.in
> new file mode 100644
> index 0000000..b83f44a
> --- /dev/null
> +++ b/rules/lowpan-tools.in
> @@ -0,0 +1,21 @@
> +## SECTION=networking
> +
> +menuconfig LOWPAN_TOOLS
> + tristate
> + prompt "lowpan-tools "
> + select LIBNL3
> + select PYTHON
select PYTHON if LOWPAN_TOOLS_TESTS
> + help
> + This is a set of utils to manage the Linux LoWPAN stack.
> + The LoWPAN stack aims for IEEE 802.15.4-2003 (and for
> + lesser extent IEEE 802.15.4-2006) compatibility.
> +
> +if LOWPAN_TOOLS
> +
> +config LOWPAN_TOOLS_TESTS
> + bool
> + prompt "lowpan-tests"
> + help
> + Install lowpan-tests suites in /usr/libexec/lowpan-tools.
> +
> +endif # LOWPAN_TOOLS
> diff --git a/rules/lowpan-tools.make b/rules/lowpan-tools.make
> new file mode 100644
> index 0000000..b40946f
> --- /dev/null
> +++ b/rules/lowpan-tools.make
> @@ -0,0 +1,84 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2012 by Alexander Aring <aar@pengutronix.de>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LOWPAN_TOOLS) += lowpan-tools
> +
> +#
> +# Paths and names
> +#
> +LOWPAN_TOOLS_VERSION := 0.3
> +LOWPAN_TOOLS_MD5 := 564bdf163de5b33232d751383495a65c
> +LOWPAN_TOOLS := lowpan-tools-$(LOWPAN_TOOLS_VERSION)
> +LOWPAN_TOOLS_SUFFIX := tar.gz
> +LOWPAN_TOOLS_URL := $(call ptx/mirror, SF, linux-zigbee/$(LOWPAN_TOOLS).$(LOWPAN_TOOLS_SUFFIX))
> +LOWPAN_TOOLS_SOURCE := $(SRCDIR)/$(LOWPAN_TOOLS).$(LOWPAN_TOOLS_SUFFIX)
> +LOWPAN_TOOLS_DIR := $(BUILDDIR)/$(LOWPAN_TOOLS)
> +LOWPAN_TOOLS_LICENSE := GPLv2
> +
You need to add ac_cv_path_PYTHON=: or ac_cv_path_PYTHON=$(CROSS_PYTHON)
(depending on LOWPAN_TOOLS_TESTS) too LOWPAN_TOOLS_CONF_ENV, otherwise the
wrong python is used.
> +#
> +# autoconf
> +#
> +LOWPAN_TOOLS_CONF_TOOL := autoconf
> +LOWPAN_TOOLS_CONF_OPT := \
> + $(CROSS_AUTOCONF_USR) \
> + --disable-manpages \
> + --enable-shared \
> + --disable-static \
> + --with-gnu-ld
> +
> +LOWPAN_TOOLS_INSTALL_FILES-y =
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=gnl
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=izlisten
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=listen-packet
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test1
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test2
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test3
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test4
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test5
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test6
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test7
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_edscan.py
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_packets.py
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_recv.py
> +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_trx.py
You have a "ifdef PTXCONF_LOWPAN_TOOLS_TESTS" anyways below, so this list
can be unconditionally
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/lowpan-tools.targetinstall:
> + @$(call targetinfo)
> +
> + @$(call install_init, lowpan-tools)
> + @$(call install_fixup, lowpan-tools,PRIORITY,optional)
> + @$(call install_fixup, lowpan-tools,SECTION,base)
> + @$(call install_fixup, lowpan-tools,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
> + @$(call install_fixup, lowpan-tools,DESCRIPTION,missing)
> +
> + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/bin/izchat)
> + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/iz)
> + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/izattach)
> + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/izcoordinator)
> +
> +ifdef PTXCONF_LOWPAN_TOOLS_TESTS
> + @$(call install_copy, lowpan-tools, 0, 0, 0644, -, $(PYTHON_SITEPACKAGES)/test_DQ.pyc)
> +
> + @$(foreach tool,$(LOWPAN_TOOLS_INSTALL_FILES-y), \
> + $(call install_copy, lowpan-tools, 0, 0, 0755, -, \
/usr/libexec/lowpan-tools/$(tool));)
break
Michael
> +endif
> +
> + @$(call install_finish, lowpan-tools)
> +
> + @$(call touch)
> +
> +# vim: syntax=make
> --
> 1.8.1.1
>
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH] lowpan-tools: new package
2013-01-29 22:40 ` Michael Olbrich
@ 2013-01-30 11:12 ` Alexander Aring
2013-01-30 20:28 ` Michael Olbrich
0 siblings, 1 reply; 9+ messages in thread
From: Alexander Aring @ 2013-01-30 11:12 UTC (permalink / raw)
To: ptxdist
Hi,
thanks for reviewing this one.
On Tue, Jan 29, 2013 at 11:40:00PM +0100, Michael Olbrich wrote:
> On Sun, Jan 27, 2013 at 06:09:49PM +0100, Alexander Aring wrote:
> > This package provides utils to set up ieee802.15.4 devices.
> >
> > Add option do not install test-utils. These test-utils depends
> > on python. Currently the buildsystem of lowpan-tools can't
> > disable building of test-tools, which makes a dependency of
> > python to this package.
>
> not true. By setting ac_cv_path_PYTHON=: you can force the build not to use
> python.
Ok, that works fine. Thanks for this information.
>
> > Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> > ---
> > rules/lowpan-tools.in | 21 +++++++++++++
> > rules/lowpan-tools.make | 84 +++++++++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 105 insertions(+)
> > create mode 100644 rules/lowpan-tools.in
> > create mode 100644 rules/lowpan-tools.make
> >
> > diff --git a/rules/lowpan-tools.in b/rules/lowpan-tools.in
> > new file mode 100644
> > index 0000000..b83f44a
> > --- /dev/null
> > +++ b/rules/lowpan-tools.in
> > @@ -0,0 +1,21 @@
> > +## SECTION=networking
> > +
> > +menuconfig LOWPAN_TOOLS
> > + tristate
> > + prompt "lowpan-tools "
> > + select LIBNL3
> > + select PYTHON
>
> select PYTHON if LOWPAN_TOOLS_TESTS
>
> > + help
> > + This is a set of utils to manage the Linux LoWPAN stack.
> > + The LoWPAN stack aims for IEEE 802.15.4-2003 (and for
> > + lesser extent IEEE 802.15.4-2006) compatibility.
> > +
> > +if LOWPAN_TOOLS
> > +
> > +config LOWPAN_TOOLS_TESTS
> > + bool
> > + prompt "lowpan-tests"
> > + help
> > + Install lowpan-tests suites in /usr/libexec/lowpan-tools.
> > +
> > +endif # LOWPAN_TOOLS
> > diff --git a/rules/lowpan-tools.make b/rules/lowpan-tools.make
> > new file mode 100644
> > index 0000000..b40946f
> > --- /dev/null
> > +++ b/rules/lowpan-tools.make
> > @@ -0,0 +1,84 @@
> > +# -*-makefile-*-
> > +#
> > +# Copyright (C) 2012 by Alexander Aring <aar@pengutronix.de>
> > +#
> > +# See CREDITS for details about who has contributed to this project.
> > +#
> > +# For further information about the PTXdist project and license conditions
> > +# see the README file.
> > +#
> > +
> > +#
> > +# We provide this package
> > +#
> > +PACKAGES-$(PTXCONF_LOWPAN_TOOLS) += lowpan-tools
> > +
> > +#
> > +# Paths and names
> > +#
> > +LOWPAN_TOOLS_VERSION := 0.3
> > +LOWPAN_TOOLS_MD5 := 564bdf163de5b33232d751383495a65c
> > +LOWPAN_TOOLS := lowpan-tools-$(LOWPAN_TOOLS_VERSION)
> > +LOWPAN_TOOLS_SUFFIX := tar.gz
> > +LOWPAN_TOOLS_URL := $(call ptx/mirror, SF, linux-zigbee/$(LOWPAN_TOOLS).$(LOWPAN_TOOLS_SUFFIX))
> > +LOWPAN_TOOLS_SOURCE := $(SRCDIR)/$(LOWPAN_TOOLS).$(LOWPAN_TOOLS_SUFFIX)
> > +LOWPAN_TOOLS_DIR := $(BUILDDIR)/$(LOWPAN_TOOLS)
> > +LOWPAN_TOOLS_LICENSE := GPLv2
> > +
>
> You need to add ac_cv_path_PYTHON=: or ac_cv_path_PYTHON=$(CROSS_PYTHON)
> (depending on LOWPAN_TOOLS_TESTS) too LOWPAN_TOOLS_CONF_ENV, otherwise the
> wrong python is used.
I test this one, but ac_cv_path_PYTHON=$(CROSS_PYTHON) doesn't work for
me.
I need to set PYTHON=$(CROSS_PYTHON).
I tried to figure out this in configure script.
...
if ${ac_cv_path_PYTHON+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PYTHON in
[\\/]* | ?:[\\/]*)
ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
;;
*)
...
First, this is some autoconf magic and I am not a master of the known
universe in this.
But there is a check if PYTHON is a valid path and then it's sets
ac_cv_path_PYTHON to $PYTHON variable, there is no check on
ac_cv_path_PYTHON.
The first one "if ${ac_cv_path_PYTHON+:}" will only skip this test, if
ac_cv_path_PYTHON is set to ":".
>
> > +#
> > +# autoconf
> > +#
> > +LOWPAN_TOOLS_CONF_TOOL := autoconf
> > +LOWPAN_TOOLS_CONF_OPT := \
> > + $(CROSS_AUTOCONF_USR) \
> > + --disable-manpages \
> > + --enable-shared \
> > + --disable-static \
> > + --with-gnu-ld
> > +
> > +LOWPAN_TOOLS_INSTALL_FILES-y =
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=gnl
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=izlisten
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=listen-packet
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test1
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test2
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test3
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test4
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test5
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test6
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test7
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_edscan.py
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_packets.py
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_recv.py
> > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_trx.py
>
> You have a "ifdef PTXCONF_LOWPAN_TOOLS_TESTS" anyways below, so this list
> can be unconditionally
>
Should I do only a ifdef for *.pyc file and then call foreach outside
the ifdef?
Or should I remove the complete list and call install_copy for each of
them?
In my opinion a list is easier to maintain.
> > +
> > +# ----------------------------------------------------------------------------
> > +# Target-Install
> > +# ----------------------------------------------------------------------------
> > +
> > +$(STATEDIR)/lowpan-tools.targetinstall:
> > + @$(call targetinfo)
> > +
> > + @$(call install_init, lowpan-tools)
> > + @$(call install_fixup, lowpan-tools,PRIORITY,optional)
> > + @$(call install_fixup, lowpan-tools,SECTION,base)
> > + @$(call install_fixup, lowpan-tools,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
> > + @$(call install_fixup, lowpan-tools,DESCRIPTION,missing)
> > +
> > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/bin/izchat)
> > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/iz)
> > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/izattach)
> > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/izcoordinator)
> > +
> > +ifdef PTXCONF_LOWPAN_TOOLS_TESTS
> > + @$(call install_copy, lowpan-tools, 0, 0, 0644, -, $(PYTHON_SITEPACKAGES)/test_DQ.pyc)
> > +
> > + @$(foreach tool,$(LOWPAN_TOOLS_INSTALL_FILES-y), \
> > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, \
> /usr/libexec/lowpan-tools/$(tool));)
>
> break
>
> Michael
>
> > +endif
> > +
> > + @$(call install_finish, lowpan-tools)
> > +
> > + @$(call touch)
> > +
> > +# vim: syntax=make
> > --
> > 1.8.1.1
> >
> >
> > --
> > ptxdist mailing list
> > ptxdist@pengutronix.de
> >
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH] lowpan-tools: new package
2013-01-30 11:12 ` Alexander Aring
@ 2013-01-30 20:28 ` Michael Olbrich
2013-01-30 20:44 ` Alexander Aring
2013-01-30 21:00 ` Alexander Aring
0 siblings, 2 replies; 9+ messages in thread
From: Michael Olbrich @ 2013-01-30 20:28 UTC (permalink / raw)
To: ptxdist
On Wed, Jan 30, 2013 at 12:12:43PM +0100, Alexander Aring wrote:
> Hi,
>
> thanks for reviewing this one.
>
> On Tue, Jan 29, 2013 at 11:40:00PM +0100, Michael Olbrich wrote:
> > On Sun, Jan 27, 2013 at 06:09:49PM +0100, Alexander Aring wrote:
> > > This package provides utils to set up ieee802.15.4 devices.
> > >
> > > Add option do not install test-utils. These test-utils depends
> > > on python. Currently the buildsystem of lowpan-tools can't
> > > disable building of test-tools, which makes a dependency of
> > > python to this package.
> >
> > not true. By setting ac_cv_path_PYTHON=: you can force the build not to use
> > python.
>
> Ok, that works fine. Thanks for this information.
>
> >
> > > Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> > > ---
> > > rules/lowpan-tools.in | 21 +++++++++++++
> > > rules/lowpan-tools.make | 84 +++++++++++++++++++++++++++++++++++++++++++++++++
> > > 2 files changed, 105 insertions(+)
> > > create mode 100644 rules/lowpan-tools.in
> > > create mode 100644 rules/lowpan-tools.make
> > >
> > > diff --git a/rules/lowpan-tools.in b/rules/lowpan-tools.in
> > > new file mode 100644
> > > index 0000000..b83f44a
> > > --- /dev/null
> > > +++ b/rules/lowpan-tools.in
> > > @@ -0,0 +1,21 @@
> > > +## SECTION=networking
> > > +
> > > +menuconfig LOWPAN_TOOLS
> > > + tristate
> > > + prompt "lowpan-tools "
> > > + select LIBNL3
> > > + select PYTHON
> >
> > select PYTHON if LOWPAN_TOOLS_TESTS
> >
> > > + help
> > > + This is a set of utils to manage the Linux LoWPAN stack.
> > > + The LoWPAN stack aims for IEEE 802.15.4-2003 (and for
> > > + lesser extent IEEE 802.15.4-2006) compatibility.
> > > +
> > > +if LOWPAN_TOOLS
> > > +
> > > +config LOWPAN_TOOLS_TESTS
> > > + bool
> > > + prompt "lowpan-tests"
> > > + help
> > > + Install lowpan-tests suites in /usr/libexec/lowpan-tools.
> > > +
> > > +endif # LOWPAN_TOOLS
> > > diff --git a/rules/lowpan-tools.make b/rules/lowpan-tools.make
> > > new file mode 100644
> > > index 0000000..b40946f
> > > --- /dev/null
> > > +++ b/rules/lowpan-tools.make
> > > @@ -0,0 +1,84 @@
> > > +# -*-makefile-*-
> > > +#
> > > +# Copyright (C) 2012 by Alexander Aring <aar@pengutronix.de>
> > > +#
> > > +# See CREDITS for details about who has contributed to this project.
> > > +#
> > > +# For further information about the PTXdist project and license conditions
> > > +# see the README file.
> > > +#
> > > +
> > > +#
> > > +# We provide this package
> > > +#
> > > +PACKAGES-$(PTXCONF_LOWPAN_TOOLS) += lowpan-tools
> > > +
> > > +#
> > > +# Paths and names
> > > +#
> > > +LOWPAN_TOOLS_VERSION := 0.3
> > > +LOWPAN_TOOLS_MD5 := 564bdf163de5b33232d751383495a65c
> > > +LOWPAN_TOOLS := lowpan-tools-$(LOWPAN_TOOLS_VERSION)
> > > +LOWPAN_TOOLS_SUFFIX := tar.gz
> > > +LOWPAN_TOOLS_URL := $(call ptx/mirror, SF, linux-zigbee/$(LOWPAN_TOOLS).$(LOWPAN_TOOLS_SUFFIX))
> > > +LOWPAN_TOOLS_SOURCE := $(SRCDIR)/$(LOWPAN_TOOLS).$(LOWPAN_TOOLS_SUFFIX)
> > > +LOWPAN_TOOLS_DIR := $(BUILDDIR)/$(LOWPAN_TOOLS)
> > > +LOWPAN_TOOLS_LICENSE := GPLv2
> > > +
> >
> > You need to add ac_cv_path_PYTHON=: or ac_cv_path_PYTHON=$(CROSS_PYTHON)
> > (depending on LOWPAN_TOOLS_TESTS) too LOWPAN_TOOLS_CONF_ENV, otherwise the
> > wrong python is used.
>
> I test this one, but ac_cv_path_PYTHON=$(CROSS_PYTHON) doesn't work for
> me.
> I need to set PYTHON=$(CROSS_PYTHON).
Hmmm, it worked for me (tm), but you need to make sure that
LOWPAN_TOOLS_CONF_ENV is defined with '=' not ':=', otherwise CROSS_PYTHON
is empty.
If you run ptxdist with '-v' then it will print the environment used when
executing configure. Make sure ac_cv_path_PYTHON contains a usefull value
there.
>
>
> I tried to figure out this in configure script.
>
> ...
> if ${ac_cv_path_PYTHON+:} false; then :
> $as_echo_n "(cached) " >&6
> else
> case $PYTHON in
> [\\/]* | ?:[\\/]*)
> ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
> ;;
> *)
> ...
>
> First, this is some autoconf magic and I am not a master of the known
> universe in this.
>
> But there is a check if PYTHON is a valid path and then it's sets
> ac_cv_path_PYTHON to $PYTHON variable, there is no check on
> ac_cv_path_PYTHON.
>
> The first one "if ${ac_cv_path_PYTHON+:}" will only skip this test, if
> ac_cv_path_PYTHON is set to ":".
>
> >
> > > +#
> > > +# autoconf
> > > +#
> > > +LOWPAN_TOOLS_CONF_TOOL := autoconf
> > > +LOWPAN_TOOLS_CONF_OPT := \
> > > + $(CROSS_AUTOCONF_USR) \
> > > + --disable-manpages \
> > > + --enable-shared \
> > > + --disable-static \
> > > + --with-gnu-ld
> > > +
> > > +LOWPAN_TOOLS_INSTALL_FILES-y =
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=gnl
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=izlisten
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=listen-packet
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test1
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test2
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test3
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test4
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test5
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test6
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test7
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_edscan.py
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_packets.py
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_recv.py
> > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_trx.py
> >
> > You have a "ifdef PTXCONF_LOWPAN_TOOLS_TESTS" anyways below, so this list
> > can be unconditionally
> >
>
> Should I do only a ifdef for *.pyc file and then call foreach outside
> the ifdef?
> Or should I remove the complete list and call install_copy for each of
> them?
> In my opinion a list is easier to maintain.
I meant, keep the foreach inside the ifdef and do this here:
LOWPAN_TOOLS_INSTALL_FILES := \
gnl izlisten listen-packet test1 test2 test3 test4 test5 \
test6 ...
Michael
> > > +
> > > +# ----------------------------------------------------------------------------
> > > +# Target-Install
> > > +# ----------------------------------------------------------------------------
> > > +
> > > +$(STATEDIR)/lowpan-tools.targetinstall:
> > > + @$(call targetinfo)
> > > +
> > > + @$(call install_init, lowpan-tools)
> > > + @$(call install_fixup, lowpan-tools,PRIORITY,optional)
> > > + @$(call install_fixup, lowpan-tools,SECTION,base)
> > > + @$(call install_fixup, lowpan-tools,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
> > > + @$(call install_fixup, lowpan-tools,DESCRIPTION,missing)
> > > +
> > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/bin/izchat)
> > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/iz)
> > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/izattach)
> > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/izcoordinator)
> > > +
> > > +ifdef PTXCONF_LOWPAN_TOOLS_TESTS
> > > + @$(call install_copy, lowpan-tools, 0, 0, 0644, -, $(PYTHON_SITEPACKAGES)/test_DQ.pyc)
> > > +
> > > + @$(foreach tool,$(LOWPAN_TOOLS_INSTALL_FILES-y), \
> > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, \
> > /usr/libexec/lowpan-tools/$(tool));)
> >
> > break
> >
> > Michael
> >
> > > +endif
> > > +
> > > + @$(call install_finish, lowpan-tools)
> > > +
> > > + @$(call touch)
> > > +
> > > +# vim: syntax=make
> > > --
> > > 1.8.1.1
> > >
> > >
> > > --
> > > ptxdist mailing list
> > > ptxdist@pengutronix.de
> > >
> >
> > --
> > Pengutronix e.K. | |
> > Industrial Linux Solutions | http://www.pengutronix.de/ |
> > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
> >
> > --
> > ptxdist mailing list
> > ptxdist@pengutronix.de
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH] lowpan-tools: new package
2013-01-30 20:28 ` Michael Olbrich
@ 2013-01-30 20:44 ` Alexander Aring
2013-01-30 21:00 ` Alexander Aring
1 sibling, 0 replies; 9+ messages in thread
From: Alexander Aring @ 2013-01-30 20:44 UTC (permalink / raw)
To: ptxdist
Hi,
On Wed, Jan 30, 2013 at 09:28:40PM +0100, Michael Olbrich wrote:
> On Wed, Jan 30, 2013 at 12:12:43PM +0100, Alexander Aring wrote:
> > Hi,
> >
> > thanks for reviewing this one.
> >
> > On Tue, Jan 29, 2013 at 11:40:00PM +0100, Michael Olbrich wrote:
> > > On Sun, Jan 27, 2013 at 06:09:49PM +0100, Alexander Aring wrote:
> > > > This package provides utils to set up ieee802.15.4 devices.
> > > >
> > > > Add option do not install test-utils. These test-utils depends
> > > > on python. Currently the buildsystem of lowpan-tools can't
> > > > disable building of test-tools, which makes a dependency of
> > > > python to this package.
> > >
> > > not true. By setting ac_cv_path_PYTHON=: you can force the build not to use
> > > python.
> >
> > Ok, that works fine. Thanks for this information.
> >
> > >
> > > > Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> > > > ---
> > > > rules/lowpan-tools.in | 21 +++++++++++++
> > > > rules/lowpan-tools.make | 84 +++++++++++++++++++++++++++++++++++++++++++++++++
> > > > 2 files changed, 105 insertions(+)
> > > > create mode 100644 rules/lowpan-tools.in
> > > > create mode 100644 rules/lowpan-tools.make
> > > >
> > > > diff --git a/rules/lowpan-tools.in b/rules/lowpan-tools.in
> > > > new file mode 100644
> > > > index 0000000..b83f44a
> > > > --- /dev/null
> > > > +++ b/rules/lowpan-tools.in
> > > > @@ -0,0 +1,21 @@
> > > > +## SECTION=networking
> > > > +
> > > > +menuconfig LOWPAN_TOOLS
> > > > + tristate
> > > > + prompt "lowpan-tools "
> > > > + select LIBNL3
> > > > + select PYTHON
> > >
> > > select PYTHON if LOWPAN_TOOLS_TESTS
> > >
> > > > + help
> > > > + This is a set of utils to manage the Linux LoWPAN stack.
> > > > + The LoWPAN stack aims for IEEE 802.15.4-2003 (and for
> > > > + lesser extent IEEE 802.15.4-2006) compatibility.
> > > > +
> > > > +if LOWPAN_TOOLS
> > > > +
> > > > +config LOWPAN_TOOLS_TESTS
> > > > + bool
> > > > + prompt "lowpan-tests"
> > > > + help
> > > > + Install lowpan-tests suites in /usr/libexec/lowpan-tools.
> > > > +
> > > > +endif # LOWPAN_TOOLS
> > > > diff --git a/rules/lowpan-tools.make b/rules/lowpan-tools.make
> > > > new file mode 100644
> > > > index 0000000..b40946f
> > > > --- /dev/null
> > > > +++ b/rules/lowpan-tools.make
> > > > @@ -0,0 +1,84 @@
> > > > +# -*-makefile-*-
> > > > +#
> > > > +# Copyright (C) 2012 by Alexander Aring <aar@pengutronix.de>
> > > > +#
> > > > +# See CREDITS for details about who has contributed to this project.
> > > > +#
> > > > +# For further information about the PTXdist project and license conditions
> > > > +# see the README file.
> > > > +#
> > > > +
> > > > +#
> > > > +# We provide this package
> > > > +#
> > > > +PACKAGES-$(PTXCONF_LOWPAN_TOOLS) += lowpan-tools
> > > > +
> > > > +#
> > > > +# Paths and names
> > > > +#
> > > > +LOWPAN_TOOLS_VERSION := 0.3
> > > > +LOWPAN_TOOLS_MD5 := 564bdf163de5b33232d751383495a65c
> > > > +LOWPAN_TOOLS := lowpan-tools-$(LOWPAN_TOOLS_VERSION)
> > > > +LOWPAN_TOOLS_SUFFIX := tar.gz
> > > > +LOWPAN_TOOLS_URL := $(call ptx/mirror, SF, linux-zigbee/$(LOWPAN_TOOLS).$(LOWPAN_TOOLS_SUFFIX))
> > > > +LOWPAN_TOOLS_SOURCE := $(SRCDIR)/$(LOWPAN_TOOLS).$(LOWPAN_TOOLS_SUFFIX)
> > > > +LOWPAN_TOOLS_DIR := $(BUILDDIR)/$(LOWPAN_TOOLS)
> > > > +LOWPAN_TOOLS_LICENSE := GPLv2
> > > > +
> > >
> > > You need to add ac_cv_path_PYTHON=: or ac_cv_path_PYTHON=$(CROSS_PYTHON)
> > > (depending on LOWPAN_TOOLS_TESTS) too LOWPAN_TOOLS_CONF_ENV, otherwise the
> > > wrong python is used.
> >
> > I test this one, but ac_cv_path_PYTHON=$(CROSS_PYTHON) doesn't work for
> > me.
> > I need to set PYTHON=$(CROSS_PYTHON).
>
> Hmmm, it worked for me (tm), but you need to make sure that
> LOWPAN_TOOLS_CONF_ENV is defined with '=' not ':=', otherwise CROSS_PYTHON
> is empty.
>
> If you run ptxdist with '-v' then it will print the environment used when
> executing configure. Make sure ac_cv_path_PYTHON contains a usefull value
> there.
>
My fault. This works perfectly! Thanks for the verbose tip!
> >
> >
> > I tried to figure out this in configure script.
> >
> > ...
> > if ${ac_cv_path_PYTHON+:} false; then :
> > $as_echo_n "(cached) " >&6
> > else
> > case $PYTHON in
> > [\\/]* | ?:[\\/]*)
> > ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
> > ;;
> > *)
> > ...
> >
> > First, this is some autoconf magic and I am not a master of the known
> > universe in this.
> >
> > But there is a check if PYTHON is a valid path and then it's sets
> > ac_cv_path_PYTHON to $PYTHON variable, there is no check on
> > ac_cv_path_PYTHON.
> >
> > The first one "if ${ac_cv_path_PYTHON+:}" will only skip this test, if
> > ac_cv_path_PYTHON is set to ":".
> >
> > >
> > > > +#
> > > > +# autoconf
> > > > +#
> > > > +LOWPAN_TOOLS_CONF_TOOL := autoconf
> > > > +LOWPAN_TOOLS_CONF_OPT := \
> > > > + $(CROSS_AUTOCONF_USR) \
> > > > + --disable-manpages \
> > > > + --enable-shared \
> > > > + --disable-static \
> > > > + --with-gnu-ld
> > > > +
> > > > +LOWPAN_TOOLS_INSTALL_FILES-y =
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=gnl
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=izlisten
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=listen-packet
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test1
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test2
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test3
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test4
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test5
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test6
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test7
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_edscan.py
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_packets.py
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_recv.py
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_trx.py
> > >
> > > You have a "ifdef PTXCONF_LOWPAN_TOOLS_TESTS" anyways below, so this list
> > > can be unconditionally
> > >
> >
> > Should I do only a ifdef for *.pyc file and then call foreach outside
> > the ifdef?
> > Or should I remove the complete list and call install_copy for each of
> > them?
> > In my opinion a list is easier to maintain.
>
> I meant, keep the foreach inside the ifdef and do this here:
>
> LOWPAN_TOOLS_INSTALL_FILES := \
> gnl izlisten listen-packet test1 test2 test3 test4 test5 \
> test6 ...
>
> Michael
>
Ok.
Regards
Alex
> > > > +
> > > > +# ----------------------------------------------------------------------------
> > > > +# Target-Install
> > > > +# ----------------------------------------------------------------------------
> > > > +
> > > > +$(STATEDIR)/lowpan-tools.targetinstall:
> > > > + @$(call targetinfo)
> > > > +
> > > > + @$(call install_init, lowpan-tools)
> > > > + @$(call install_fixup, lowpan-tools,PRIORITY,optional)
> > > > + @$(call install_fixup, lowpan-tools,SECTION,base)
> > > > + @$(call install_fixup, lowpan-tools,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
> > > > + @$(call install_fixup, lowpan-tools,DESCRIPTION,missing)
> > > > +
> > > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/bin/izchat)
> > > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/iz)
> > > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/izattach)
> > > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/izcoordinator)
> > > > +
> > > > +ifdef PTXCONF_LOWPAN_TOOLS_TESTS
> > > > + @$(call install_copy, lowpan-tools, 0, 0, 0644, -, $(PYTHON_SITEPACKAGES)/test_DQ.pyc)
> > > > +
> > > > + @$(foreach tool,$(LOWPAN_TOOLS_INSTALL_FILES-y), \
> > > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, \
> > > /usr/libexec/lowpan-tools/$(tool));)
> > >
> > > break
> > >
> > > Michael
> > >
> > > > +endif
> > > > +
> > > > + @$(call install_finish, lowpan-tools)
> > > > +
> > > > + @$(call touch)
> > > > +
> > > > +# vim: syntax=make
> > > > --
> > > > 1.8.1.1
> > > >
> > > >
> > > > --
> > > > ptxdist mailing list
> > > > ptxdist@pengutronix.de
> > > >
> > >
> > > --
> > > Pengutronix e.K. | |
> > > Industrial Linux Solutions | http://www.pengutronix.de/ |
> > > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> > > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
> > >
> > > --
> > > ptxdist mailing list
> > > ptxdist@pengutronix.de
> >
> > --
> > ptxdist mailing list
> > ptxdist@pengutronix.de
> >
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH] lowpan-tools: new package
2013-01-30 20:28 ` Michael Olbrich
2013-01-30 20:44 ` Alexander Aring
@ 2013-01-30 21:00 ` Alexander Aring
2013-01-31 7:54 ` Juergen Beisert
2013-02-05 15:03 ` Alexander Dahl
1 sibling, 2 replies; 9+ messages in thread
From: Alexander Aring @ 2013-01-30 21:00 UTC (permalink / raw)
To: ptxdist
Hi,
On Wed, Jan 30, 2013 at 09:28:40PM +0100, Michael Olbrich wrote:
> On Wed, Jan 30, 2013 at 12:12:43PM +0100, Alexander Aring wrote:
> > Hi,
> >
> > thanks for reviewing this one.
> >
> > On Tue, Jan 29, 2013 at 11:40:00PM +0100, Michael Olbrich wrote:
> > > On Sun, Jan 27, 2013 at 06:09:49PM +0100, Alexander Aring wrote:
> > > > This package provides utils to set up ieee802.15.4 devices.
> > > >
> > > > Add option do not install test-utils. These test-utils depends
> > > > on python. Currently the buildsystem of lowpan-tools can't
> > > > disable building of test-tools, which makes a dependency of
> > > > python to this package.
> > >
> > > not true. By setting ac_cv_path_PYTHON=: you can force the build not to use
> > > python.
> >
> > Ok, that works fine. Thanks for this information.
> >
> > >
> > > > Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> > > > ---
> > > > rules/lowpan-tools.in | 21 +++++++++++++
> > > > rules/lowpan-tools.make | 84 +++++++++++++++++++++++++++++++++++++++++++++++++
> > > > 2 files changed, 105 insertions(+)
> > > > create mode 100644 rules/lowpan-tools.in
> > > > create mode 100644 rules/lowpan-tools.make
> > > >
> > > > diff --git a/rules/lowpan-tools.in b/rules/lowpan-tools.in
> > > > new file mode 100644
> > > > index 0000000..b83f44a
> > > > --- /dev/null
> > > > +++ b/rules/lowpan-tools.in
> > > > @@ -0,0 +1,21 @@
> > > > +## SECTION=networking
> > > > +
> > > > +menuconfig LOWPAN_TOOLS
> > > > + tristate
> > > > + prompt "lowpan-tools "
> > > > + select LIBNL3
> > > > + select PYTHON
> > >
> > > select PYTHON if LOWPAN_TOOLS_TESTS
> > >
> > > > + help
> > > > + This is a set of utils to manage the Linux LoWPAN stack.
> > > > + The LoWPAN stack aims for IEEE 802.15.4-2003 (and for
> > > > + lesser extent IEEE 802.15.4-2006) compatibility.
> > > > +
> > > > +if LOWPAN_TOOLS
> > > > +
> > > > +config LOWPAN_TOOLS_TESTS
> > > > + bool
> > > > + prompt "lowpan-tests"
> > > > + help
> > > > + Install lowpan-tests suites in /usr/libexec/lowpan-tools.
> > > > +
> > > > +endif # LOWPAN_TOOLS
> > > > diff --git a/rules/lowpan-tools.make b/rules/lowpan-tools.make
> > > > new file mode 100644
> > > > index 0000000..b40946f
> > > > --- /dev/null
> > > > +++ b/rules/lowpan-tools.make
> > > > @@ -0,0 +1,84 @@
> > > > +# -*-makefile-*-
> > > > +#
> > > > +# Copyright (C) 2012 by Alexander Aring <aar@pengutronix.de>
> > > > +#
> > > > +# See CREDITS for details about who has contributed to this project.
> > > > +#
> > > > +# For further information about the PTXdist project and license conditions
> > > > +# see the README file.
> > > > +#
> > > > +
> > > > +#
> > > > +# We provide this package
> > > > +#
> > > > +PACKAGES-$(PTXCONF_LOWPAN_TOOLS) += lowpan-tools
> > > > +
> > > > +#
> > > > +# Paths and names
> > > > +#
> > > > +LOWPAN_TOOLS_VERSION := 0.3
> > > > +LOWPAN_TOOLS_MD5 := 564bdf163de5b33232d751383495a65c
> > > > +LOWPAN_TOOLS := lowpan-tools-$(LOWPAN_TOOLS_VERSION)
> > > > +LOWPAN_TOOLS_SUFFIX := tar.gz
> > > > +LOWPAN_TOOLS_URL := $(call ptx/mirror, SF, linux-zigbee/$(LOWPAN_TOOLS).$(LOWPAN_TOOLS_SUFFIX))
> > > > +LOWPAN_TOOLS_SOURCE := $(SRCDIR)/$(LOWPAN_TOOLS).$(LOWPAN_TOOLS_SUFFIX)
> > > > +LOWPAN_TOOLS_DIR := $(BUILDDIR)/$(LOWPAN_TOOLS)
> > > > +LOWPAN_TOOLS_LICENSE := GPLv2
> > > > +
> > >
> > > You need to add ac_cv_path_PYTHON=: or ac_cv_path_PYTHON=$(CROSS_PYTHON)
> > > (depending on LOWPAN_TOOLS_TESTS) too LOWPAN_TOOLS_CONF_ENV, otherwise the
> > > wrong python is used.
> >
> > I test this one, but ac_cv_path_PYTHON=$(CROSS_PYTHON) doesn't work for
> > me.
> > I need to set PYTHON=$(CROSS_PYTHON).
>
> Hmmm, it worked for me (tm), but you need to make sure that
> LOWPAN_TOOLS_CONF_ENV is defined with '=' not ':=', otherwise CROSS_PYTHON
> is empty.
Now I realize it. I found rules with ':=' and '='. Could you explain the
different?
Should I use '=' if I access variables(like CROSS_PYTHON) except
CROSS_ENV?
>
> If you run ptxdist with '-v' then it will print the environment used when
> executing configure. Make sure ac_cv_path_PYTHON contains a usefull value
> there.
>
> >
> >
> > I tried to figure out this in configure script.
> >
> > ...
> > if ${ac_cv_path_PYTHON+:} false; then :
> > $as_echo_n "(cached) " >&6
> > else
> > case $PYTHON in
> > [\\/]* | ?:[\\/]*)
> > ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
> > ;;
> > *)
> > ...
> >
> > First, this is some autoconf magic and I am not a master of the known
> > universe in this.
> >
> > But there is a check if PYTHON is a valid path and then it's sets
> > ac_cv_path_PYTHON to $PYTHON variable, there is no check on
> > ac_cv_path_PYTHON.
> >
> > The first one "if ${ac_cv_path_PYTHON+:}" will only skip this test, if
> > ac_cv_path_PYTHON is set to ":".
> >
> > >
> > > > +#
> > > > +# autoconf
> > > > +#
> > > > +LOWPAN_TOOLS_CONF_TOOL := autoconf
> > > > +LOWPAN_TOOLS_CONF_OPT := \
> > > > + $(CROSS_AUTOCONF_USR) \
> > > > + --disable-manpages \
> > > > + --enable-shared \
> > > > + --disable-static \
> > > > + --with-gnu-ld
> > > > +
> > > > +LOWPAN_TOOLS_INSTALL_FILES-y =
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=gnl
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=izlisten
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=listen-packet
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test1
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test2
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test3
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test4
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test5
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test6
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test7
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_edscan.py
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_packets.py
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_recv.py
> > > > +LOWPAN_TOOLS_INSTALL_FILES-$(PTXCONF_LOWPAN_TOOLS_TESTS) +=test_trx.py
> > >
> > > You have a "ifdef PTXCONF_LOWPAN_TOOLS_TESTS" anyways below, so this list
> > > can be unconditionally
> > >
> >
> > Should I do only a ifdef for *.pyc file and then call foreach outside
> > the ifdef?
> > Or should I remove the complete list and call install_copy for each of
> > them?
> > In my opinion a list is easier to maintain.
>
> I meant, keep the foreach inside the ifdef and do this here:
>
> LOWPAN_TOOLS_INSTALL_FILES := \
> gnl izlisten listen-packet test1 test2 test3 test4 test5 \
> test6 ...
>
> Michael
>
> > > > +
> > > > +# ----------------------------------------------------------------------------
> > > > +# Target-Install
> > > > +# ----------------------------------------------------------------------------
> > > > +
> > > > +$(STATEDIR)/lowpan-tools.targetinstall:
> > > > + @$(call targetinfo)
> > > > +
> > > > + @$(call install_init, lowpan-tools)
> > > > + @$(call install_fixup, lowpan-tools,PRIORITY,optional)
> > > > + @$(call install_fixup, lowpan-tools,SECTION,base)
> > > > + @$(call install_fixup, lowpan-tools,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
> > > > + @$(call install_fixup, lowpan-tools,DESCRIPTION,missing)
> > > > +
> > > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/bin/izchat)
> > > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/iz)
> > > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/izattach)
> > > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, /usr/sbin/izcoordinator)
> > > > +
> > > > +ifdef PTXCONF_LOWPAN_TOOLS_TESTS
> > > > + @$(call install_copy, lowpan-tools, 0, 0, 0644, -, $(PYTHON_SITEPACKAGES)/test_DQ.pyc)
> > > > +
> > > > + @$(foreach tool,$(LOWPAN_TOOLS_INSTALL_FILES-y), \
> > > > + $(call install_copy, lowpan-tools, 0, 0, 0755, -, \
> > > /usr/libexec/lowpan-tools/$(tool));)
> > >
> > > break
> > >
> > > Michael
> > >
> > > > +endif
> > > > +
> > > > + @$(call install_finish, lowpan-tools)
> > > > +
> > > > + @$(call touch)
> > > > +
> > > > +# vim: syntax=make
> > > > --
> > > > 1.8.1.1
> > > >
> > > >
> > > > --
> > > > ptxdist mailing list
> > > > ptxdist@pengutronix.de
> > > >
> > >
> > > --
> > > Pengutronix e.K. | |
> > > Industrial Linux Solutions | http://www.pengutronix.de/ |
> > > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> > > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
> > >
> > > --
> > > ptxdist mailing list
> > > ptxdist@pengutronix.de
> >
> > --
> > ptxdist mailing list
> > ptxdist@pengutronix.de
> >
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH] lowpan-tools: new package
2013-01-30 21:00 ` Alexander Aring
@ 2013-01-31 7:54 ` Juergen Beisert
2013-02-05 15:03 ` Alexander Dahl
1 sibling, 0 replies; 9+ messages in thread
From: Juergen Beisert @ 2013-01-31 7:54 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
Alexander Aring wrote:
> > [...]
> > Hmmm, it worked for me (tm), but you need to make sure that
> > LOWPAN_TOOLS_CONF_ENV is defined with '=' not ':=', otherwise
> > CROSS_PYTHON is empty.
>
> Now I realize it. I found rules with ':=' and '='. Could you explain the
> different?
>
> Should I use '=' if I access variables(like CROSS_PYTHON) except
> CROSS_ENV?
Important for the make tool:
BLUB = $(BLA)
BLA = friesel
----> results into "BLUB = friesel"
But:
BLUB := $(BLA)
BLA = friesel
----> results into an empty "BLUB"
Regards,
Juergen
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | http://www.pengutronix.de/ |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH] lowpan-tools: new package
2013-01-30 21:00 ` Alexander Aring
2013-01-31 7:54 ` Juergen Beisert
@ 2013-02-05 15:03 ` Alexander Dahl
2013-02-05 15:08 ` Alexander Aring
1 sibling, 1 reply; 9+ messages in thread
From: Alexander Dahl @ 2013-02-05 15:03 UTC (permalink / raw)
To: ptxdist
Hei hei,
Am 2013-01-30 22:00, schrieb Alexander Aring:
> Now I realize it. I found rules with ':=' and '='. Could you explain the
> different?
This is syntax of Gnu Make, see
https://www.gnu.org/software/make/manual/ and especially
https://www.gnu.org/software/make/manual/html_node/Flavors.html#Flavors
HTH & Greets
Alex
--
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 ***
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH] lowpan-tools: new package
2013-02-05 15:03 ` Alexander Dahl
@ 2013-02-05 15:08 ` Alexander Aring
0 siblings, 0 replies; 9+ messages in thread
From: Alexander Aring @ 2013-02-05 15:08 UTC (permalink / raw)
To: ptxdist
Hi,
On Tue, Feb 05, 2013 at 04:03:28PM +0100, Alexander Dahl wrote:
> Hei hei,
>
> Am 2013-01-30 22:00, schrieb Alexander Aring:
> > Now I realize it. I found rules with ':=' and '='. Could you explain the
> > different?
>
> This is syntax of Gnu Make, see
> https://www.gnu.org/software/make/manual/ and especially
> https://www.gnu.org/software/make/manual/html_node/Flavors.html#Flavors
I see, thanks for the hint. :-)
Regards Alex
>
> HTH & Greets
> Alex
>
> --
> »With the first link, the chain is forged. The first speech censured,
> the first thought forbidden, the first freedom denied, chains us all
> irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
> *** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 ***
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-02-05 15:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-27 17:09 [ptxdist] [PATCH] lowpan-tools: new package Alexander Aring
2013-01-29 22:40 ` Michael Olbrich
2013-01-30 11:12 ` Alexander Aring
2013-01-30 20:28 ` Michael Olbrich
2013-01-30 20:44 ` Alexander Aring
2013-01-30 21:00 ` Alexander Aring
2013-01-31 7:54 ` Juergen Beisert
2013-02-05 15:03 ` Alexander Dahl
2013-02-05 15:08 ` Alexander Aring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox