All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 02/83 v2] package/angularjs: simplify modules selection
Date: Mon, 04 Jul 2016 15:19:18 +0200	[thread overview]
Message-ID: <877fd1h76x.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <1578b9ca612a91a04bc42601d0fc77a545413868.1467624132.git.yann.morin.1998@free.fr> (Yann E. MORIN's message of "Mon, 4 Jul 2016 11:24:13 +0200")

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Remove the superfluous config option, and make all modules default to
 > 'y', which provides exactly the same functionality.

 > simplify (and slightly beautify) the handling of modules in the .mk:
 > since the modules' symbols are always meaningful now, we can get rid of
 > the else-clause, and always build the list of modules using the Kconfig
 > options.

 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Cc: Arnout Vandecappelle <arnout@mind.be>
 > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

 > ---
 > Changes v1 -> v2:
 >   - remove spurious comment leftover from RFC  (Thomas)

 > Changes RFC -> v1:
 >   - treat the 'angular' module on its own, as was done previosuly
 >     (Arnout)
 >   - drop useless comments in Config.in  (Arnout)
 >   - don't re-order list, it was already alphabetically sorted
 > ---
 >  package/angularjs/Config.in    | 19 +++++++++----------
 >  package/angularjs/angularjs.mk | 21 ++++++++++++++-------
 >  2 files changed, 23 insertions(+), 17 deletions(-)

 > diff --git a/package/angularjs/Config.in b/package/angularjs/Config.in
 > index 206b3d8..2a0b48c 100644
 > --- a/package/angularjs/Config.in
 > +++ b/package/angularjs/Config.in
 > @@ -7,16 +7,9 @@ menuconfig BR2_PACKAGE_ANGULARJS
 
 >  if BR2_PACKAGE_ANGULARJS
 
 > -config BR2_ANGULARJS_MODULES
 > -	bool "angularjs modules"
 > -	help
 > -	  Select which modules to install. If disabled, all modules
 > -	  will be installed.
 > -
 > -if BR2_ANGULARJS_MODULES
 > -
 >  config BR2_ANGULARJS_MODULE_ANIMATE
 >  	bool "animate"
 > +	default y
 >  	help
 >  	  The ngAnimate module provides support for CSS-based animations
 >  	  (keyframes and transitions) as well as JavaScript-based animations
 > @@ -26,6 +19,7 @@ config BR2_ANGULARJS_MODULE_ANIMATE
 
 >  config BR2_ANGULARJS_MODULE_ARIA
 >  	bool "aria"
 > +	default y
 >  	help
 >  	  The ngAria module provides support for common ARIA attributes that
 >  	  convey state or semantic information about the application for users
 > @@ -33,18 +27,21 @@ config BR2_ANGULARJS_MODULE_ARIA
 
 >  config BR2_ANGULARJS_MODULE_COOKIES
 >  	bool "cookies"
 > +	default y
 >  	help
 >  	  The ngCookies module provides a convenient wrapper for reading and
 >  	  writing browser cookies.
 
 >  config BR2_ANGULARJS_MODULE_MESSAGE_FORMAT
 >  	bool "message-format"
 > +	default y
 >  	help
 >  	  The ngMessageFormat module is used recognize MessageFormat extensions
 >  	  in interpolation expressions.
 
 >  config BR2_ANGULARJS_MODULE_MESSAGES
 >  	bool "messages"
 > +	default y
 >  	help
 >  	  The ngMessages module provides enhanced support for displaying
 >  	  messages within templates (typically within forms or when rendering
 > @@ -52,28 +49,30 @@ config BR2_ANGULARJS_MODULE_MESSAGES
 
 >  config BR2_ANGULARJS_MODULE_RESOURCE
 >  	bool "resource"
 > +	default y
 >  	help
 >  	  The ngResource module provides interaction support with RESTful
 >  	  services via the $resource service.
 
 >  config BR2_ANGULARJS_MODULE_ROUTE
 >  	bool "route"
 > +	default y
 >  	help
 >  	  The ngRoute module provides routing and deeplinking services and
 >  	  directives for angular apps.
 
 >  config BR2_ANGULARJS_MODULE_SANITIZE
 >  	bool "sanitize"
 > +	default y
 >  	help
 >  	  The ngSanitize module provides functionality to sanitize HTML.
 
 >  config BR2_ANGULARJS_MODULE_TOUCH
 >  	bool "touch"
 > +	default y
 >  	help
 >  	  The ngTouch module provides touch events and other helpers for
 >  	  touch-enabled devices. The implementation is based on jQuery Mobile
 >  	  touch event handling (jquerymobile.com).
 
 >  endif
 > -
 > -endif
 > diff --git a/package/angularjs/angularjs.mk b/package/angularjs/angularjs.mk
 > index 60dbdb6..1f9a8fa 100644
 > --- a/package/angularjs/angularjs.mk
 > +++ b/package/angularjs/angularjs.mk
 > @@ -17,18 +17,25 @@ define ANGULARJS_EXTRACT_CMDS
 >  	rmdir $(@D)/angular-$(ANGULARJS_VERSION)
 >  endef
 
 > +# This list mirrors the list of available modules from Config.in.
 > +# Keep this list in sync and in the same (alphabetical) order as the
 > +# one in Config.in.
 > +ANGULARJS_MODULES = \
 > +	animate \
 > +	aria \
 > +	cookies \
 > +	messages \
 > +	message-format \
 > +	resource \
 > +	route \
 > +	sanitize \
 > +	touch

I like the Config.in change, but how about using something like we do in
E.G. mtd-utils for the options - E.G.:

ANGULAR_MODULES_y = angular
ANGULAR_MODULES_$(BR2_ANGULARJS_MODULE_ANIMATE) += angular-animate
ANGULAR_MODULES_$(BR2_ANGULARJS_MODULE_ARIA) += angular-aria
...

define ANGULARJS_INSTALL_TARGET_CMDS
	$(foreach f,$(ANGULARJS_MODULES_y),\
		$(INSTALL) -m 0644 -D $(@D)/$(f).min.js \
			$(TARGET_DIR)/var/www/$(f).js$(sep))
endef

That seems more robust than this list.

While we're at it, it is quite unfortunate that these options aren't
prefixed by BR2_PACKAGE_ :/

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2016-07-04 13:19 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04  9:25 [Buildroot] [PATCH 00/83 v2] packages: use menuconfig to group sub-options (branch yem/menuconfig) Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 01/83 v2] boot/at91bootstrap: choices must have a type Yann E. MORIN
2016-07-04 13:13   ` Peter Korsgaard
2016-07-04  9:24 ` [Buildroot] [PATCH 02/83 v2] package/angularjs: simplify modules selection Yann E. MORIN
2016-07-04 13:19   ` Peter Korsgaard [this message]
2016-07-04 14:07   ` Peter Korsgaard
2016-07-04  9:24 ` [Buildroot] [PATCH 03/83 v2] package/collectd: use 'menuconfig' instead of 'config'+'menu' Yann E. MORIN
2016-07-04 15:14   ` Peter Korsgaard
2016-07-04 15:18     ` Yann E. MORIN
2016-07-04 15:28       ` Peter Korsgaard
2016-07-04  9:24 ` [Buildroot] [PATCH 04/83 v2] package/gd: " Yann E. MORIN
2016-07-04 15:10   ` Peter Korsgaard
2016-07-04  9:24 ` [Buildroot] [PATCH 05/83 v2] package/gpsd: " Yann E. MORIN
2016-07-04 15:18   ` Peter Korsgaard
2016-07-04  9:24 ` [Buildroot] [PATCH 06/83 v2] package/jquery: include external plugins from jquery's Config.in Yann E. MORIN
2016-07-04 20:41   ` Thomas Petazzoni
2016-07-04  9:24 ` [Buildroot] [PATCH 07/83 v2] package/libdrm: move tests programs to the bottom Yann E. MORIN
2016-07-04 20:42   ` Thomas Petazzoni
2016-07-04  9:24 ` [Buildroot] [PATCH 08/83 v2] package/libdrm: use 'menuconfig' instead of 'config'+'menu' Yann E. MORIN
2016-07-04 21:35   ` Thomas Petazzoni
2016-07-04  9:24 ` [Buildroot] [PATCH 09/83 v2] package/mono: " Yann E. MORIN
2016-07-04 21:38   ` Thomas Petazzoni
2016-07-04  9:24 ` [Buildroot] [PATCH 10/83 v2] package/ncftp: " Yann E. MORIN
2016-07-04 21:39   ` Thomas Petazzoni
2016-07-04  9:24 ` [Buildroot] [PATCH 11/83 v2] package/nfs-utils: " Yann E. MORIN
2016-07-04 21:40   ` Thomas Petazzoni
2016-07-04  9:24 ` [Buildroot] [PATCH 12/83 v2] package/nodejs: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 13/83 v2] package/ola: " Yann E. MORIN
2016-07-04 21:38   ` Thomas Petazzoni
2016-07-04  9:24 ` [Buildroot] [PATCH 14/83 v2] package/perl: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 15/83 v2] package/php: move list of extensions after interface selection Yann E. MORIN
2016-07-04 21:37   ` Thomas Petazzoni
2016-07-04  9:24 ` [Buildroot] [PATCH 16/83 v2] package/php: use 'menuconfig' instead of 'config'+'menu' Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 17/83 v2] package/python: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 18/83 v2] package/python3: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 19/83 v2] package/python{, 3}: move inclusion of external python modules Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 20/83 v2] package/sdl_image: use 'menuconfig' instead of 'config'+'menu' Yann E. MORIN
2016-07-04 21:37   ` Thomas Petazzoni
2016-07-04  9:24 ` [Buildroot] [PATCH 21/83 v2] package/tcl: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 22/83 v2] package/tiff: " Yann E. MORIN
2016-07-04 21:38   ` Thomas Petazzoni
2016-07-04  9:24 ` [Buildroot] [PATCH 23/83 v2] package/udpcast: " Yann E. MORIN
2016-07-04 21:38   ` Thomas Petazzoni
2016-07-04  9:24 ` [Buildroot] [PATCH 24/83 v2] package/gstreamer: include plugins from gstreamer's real Config.in Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 25/83 v2] package/gstreamer1: include plugins from gstreamer1's " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 26/83 v2] docs/manual: add example about sub-options Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 27/83 v2] docs/manual: use 'menuconfig' when there are more than 5 sub-options Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 28/83 v2] package/boost: use 'menuconfig' Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 29/83 v2] package/cairo: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 30/83 v2] package/connman: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 31/83 v2] package/dejavu: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 32/83 v2] package/directfb: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 33/83 v2] package/dnsmasq: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 34/83 v2] package/dovecot: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 35/83 v2] package/dropbear: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 36/83 v2] package/e2fsprogs: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 37/83 v2] package/efl: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 38/83 v2] package/erlang: include Erlang libraries from erlang's Config.in Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 39/83 v2] package/flot: use 'menuconfig' Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 40/83 v2] package/gnuradio: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 41/83 v2] package/gnuradio: split long omment Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 42/83 v2] package/google-material-design-icons: use 'menuconfig' Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 43/83 v2] package/gr-osmosdr: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 44/83 v2] package/gstreamer: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 45/83 v2] package/gstreamer1: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 46/83 v2] package/igh-ethercat: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 47/83 v2] package/imlib2: " Yann E. MORIN
2016-07-04  9:24 ` [Buildroot] [PATCH 48/83 v2] package/ipsec-tools: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 49/83 v2] package/lftp: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 50/83 v2] package/libgtk3: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 51/83 v2] package/libiio: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 52/83 v2] package/lighttpd: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 53/83 v2] package/linux-firmware: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 54/83 v2] package/lldpd: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 55/83 v2] package/lm-sensors: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 56/83 v2] package/lua{, jit}: move inclusion of external libraries/modules Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 57/83 v2] package/mtd: use 'menuconfig' Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 58/83 v2] package/ncurses: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 59/83 v2] package/ndisc6: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 60/83 v2] package/netsnmp: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 61/83 v2] package/ntp: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 62/83 v2] package/nvidia-driver: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 63/83 v2] package/openobex: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 64/83 v2] package/openocd: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 65/83 v2] package/poco: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 66/83 v2] package/qemu: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 67/83 v2] package/quagga: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 68/83 v2] package/sdl: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 69/83 v2] package/sdl: include SDL external libraries from sdl's Config.in Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 70/83 v2] package/sdl_*: remove redundant dependency Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 71/83 v2] package/squashfs: use 'menuconfig' Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 72/83 v2] package/sqlite: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 73/83 v2] package/transmission: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 74/83 v2] package/valgrind: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 75/83 v2] package/weston: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 76/83 v2] package/wpa-supplicant: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 77/83 v2] package/xenomai: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 78/83 v2] boot/at91bootstrap3: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 79/83 v2] boot/barebox: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 80/83 v2] boot/grub: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 81/83 v2] boot/mxs-bootlets: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 82/83 v2] boot/syslinux: " Yann E. MORIN
2016-07-04  9:25 ` [Buildroot] [PATCH 83/83 v2] boot/uboot: " Yann E. MORIN

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=877fd1h76x.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.