Commit Graph

17 Commits

Author SHA1 Message Date
Thomas Petazzoni
371327f7b6 Revert "packages infra: add function to get a Kconfig option"
This reverts commit c28a28eed1. The
whole host-lzop optional dependency logic cannot work, since the
configuration file will only be known after the kernel sources are
extracted, if an internal kernel defconfig is used, which is quite
common.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-03-04 19:16:46 +01:00
Yann E. MORIN
c28a28eed1 packages infra: add function to get a Kconfig option
We so far have no mean to get the value from a Kconfig option from the
.config file of a package (eg. linux, busybox...).

Add a new function that returns the unmangled value of an option.
It expect two arguments:
  - the Kconfig option name (complete, with leading CONFIG if necessary)
  - the .config file to get it from

Note that, if the Kconfig option is a string, the returned value will
contain the leading and trailing double-quotes.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-03-03 22:21:56 +01:00
Thomas De Schampheleire
582af5884f infra: remove unused helper function pkgparentdir
Thanks to the previous patches, no-one is using pkgparentdir anymore, so
remove it.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-05 12:10:44 +01:00
Thomas De Schampheleire
3880a6ab3c infra: remove redundant $(call) on pkgdir, pkgname, pkgparentdir
When calling make 'functions', the $(call) keyword is only needed if the
function takes arguments. For pkgdir, pkgname and pkgparentdir this is not
the case, so we can remove the call to make things more readable.

Suggested-by: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-05 12:09:35 +01:00
Thomas De Schampheleire
7f809ca1d2 legal info: cleanup utility functions
The legal-info utility functions where defined using two ways
util-foo = command-foo
and
define util-bar # parameter description
	command-bar
endef

This commit changes these functions to use the second form for clarity and
additionally adds parameter descriptions on all functions.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-17 09:15:12 +01:00
Thomas De Schampheleire
366f17f747 legal info: split license texts for host and target
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-17 09:15:04 +01:00
Thomas De Schampheleire
cc4f34ddd4 legal info: split manifest for host and target
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-17 09:14:51 +01:00
Thierry Bultel
6fb546ca41 Generation of locales: made call to tr more robust and added LOWERCASE macro
When calling 'tr' without quoting braces, bash can make really weird things
if there are existing 'single-letter-named' directories
eg:
thierry@thierry-desktop:~$ echo AAA | tr [A-Z] [a-z]
aaa
thierry@thierry-desktop:~$ mkdir m
thierry@thierry-desktop:~$ echo AAA | tr [A-Z] [a-z]
AAA

The (quick) analysis is that the callee (tr) argvs then
contain 'm' thus the translation does not work

Using quotes works around it:
thierry@thierry-desktop:~$ echo AAA | tr '[A-Z]' '[a-z]'
aaa

Signed-off-by: Thierry Bultel <thierry.bultel@wanadoo.fr>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-10 23:41:28 +01:00
Thomas De Schampheleire
f8d89f0510 infra: introduce suitable-extractor helper function
In order to simplify determining the right extractor tool for a given
file type, this patch introduces a make function 'suitable-extractor'.
Its usage is $(call suitable-extractor,filename), and it returns the
path to the suitable extractor.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-06 23:30:27 +02:00
Alexandre Belloni
8dfd59d114 Normalize separator size to 80
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-06 22:30:24 +02:00
Peter Korsgaard
31aa4264d8 pkg-utils.mk: legal-license-file: handle multiple license files with same name
Some packages (kmod, e2fsprogs, ..) contain multiple (different) license
files with the same file name, but in different directories.

These are currently all copied to the same filename in
output/legal-info/licenses/<pkg>, overwriting everything but the last file.

Fix it by recreating the same directory structure under legal-info.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-05 10:58:40 +02:00
Arnout Vandecappelle
f876cb598b legal-info: quote csv file contents, so commas can be used
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-11-14 22:43:45 +01:00
Samuel Martin
736ce2f3da pkg-utils.mk: fix/clean indentation
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-22 19:21:47 +02:00
Luca Ceresoli
7e76f904d2 legal-info: infrastructure to collect legally-relevant material
This allows to automatically collect material that may be needed to comply with
the license of packages that Buildroot prepares for the target device.

The core of the implementation is made by the following parts:
 - in package/pkg-utils.mk some helper functions are defined for common actions
   such as generating a warning, producing info about a package etc;
 - in package/pkg-gentargets.mk, within the GENTARGETS framework, a new
   <PKG>-legal-info target produces all the info for a given package;
 - Makefile implements the top-level targets:
   - legal-info-prepare creates the output directory and produces legal info
     about Buildroot itself and the toolchain, which mostly means just warning
     the user that this is not implemented;
   - legal-info, the only target that is supposed to be used directly, depends
     on all of the above and finishes things by producing the README files from
     the various pieces.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-17 19:05:49 +02:00
Thomas De Schampheleire
75f18de67e pkg-utils.mk: add utility functions find*clauses and notfirstword
This patch adds a few utility functions to pkg-utils.mk.

Functions finddirclauses and findfileclauses help in building a find command
that skips a set of directories and performs operations on a set of files.
This pattern can for example be used to keep certain files or directories from
being stripped, or to remove certain files from a package installation.

The notfirstword function is the inverse of the 'firstword' function in make:
it returns all but the first word.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-06-23 23:14:56 +02:00
Thomas Petazzoni
c0e6b52482 pkg-*.mk: add some comments, update some existing comments
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-04-19 16:08:09 +02:00
Thomas Petazzoni
6e6b99a571 Split Makefile.package.in in pkg-download.mk, pkg-utils.mk and pkg-gentargets.mk
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-04-19 16:07:15 +02:00