summaryrefslogtreecommitdiffstats
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* legal-info: add hash for our own license fileYann E. MORIN2017-07-051-2/+2
| | | | | | | | | | | | This silences the annoying warning that there is no hash file for our own COPYING file. Also change the message so that it is more obvious what we're doing. Reported-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/binArnout Vandecappelle2017-07-051-2/+2
| | | | | | | | | | | Since things are no longer installed in $(HOST_DIR)/usr, the callers should also not refer to it. This is a mechanical change with git grep -l '$(HOST_DIR)/usr/bin' | xargs sed -i 's%$(HOST_DIR)/usr/bin%$(HOST_DIR)/bin%g' Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Makefile: remove $(HOST_DIR)/usr from BR_PATHArnout Vandecappelle2017-07-051-1/+1
| | | | | | | | | Now $(HOST_DIR)/usr is a symlink to $(HOST_DIR), it makes no sense to still have it in BR_PATH. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Eliminate $(HOST_DIR)/usrArnout Vandecappelle2017-07-051-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use $(HOST_DIR)/usr as the prefix for host packages. That has a few disadvantages: - There are some things installed in $(HOST_DIR)/etc and $(HOST_DIR)/sbin, which is inconsistent. - To pack a buildroot-built toolchain into a tarball for use as an external toolchain, you have to pack output/host/usr instead of the more obvious output/host. - Because of the above, the internal toolchain wrapper breaks which forces us to work around it (call the actual toolchain executable directly). This is OK for us, but when used in another build system, that's a problem. - Paths are four characters longer. To allow us to gradually eliminate $(HOST_DIR)/usr while building packages, replace it with a symlink to . The symlinks from $(HOST_DIR)/usr/$(GNU_TARGET_NAME) and $(HOST_DIR)/usr/lib that were added previously are removed again. Note that the symlink creation will break when $(HOST_DIR)/usr already exists as a directory, i.e. when rebuilding in an existing output directory. This is necessary: if we don't break it now, the following commits (which remove the usr part from various variables) _will_ break it. At the same time as creating this symlink, we have to update the external toolchain wrapper and the external toolchain symlinks to go one directory less up. Indeed, $(HOST_DIR) is one level less up than it was before. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Move $(HOST_DIR)/usr/lib to $(HOST_DIR)/libArnout Vandecappelle2017-07-051-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a step towards eliminating $(HOST_DIR)/usr. It allows us to convert all packages installing things into $(HOST_DIR)/usr/lib without affecting the rest. To allow compatibility with packages that still use $(HOST_DIR)/usr as the prefix, create a symlink from usr/lib to ../lib. Note that the symlink creation will break when $(HOST_DIR)/usr/lib already exists as a directory, i.e. when rebuilding in an existing output directory. This is necessary: if we don't break it now, the following commits (which remove the usr part from various variables) _will_ break it. At the same time as creating this symlink, we also have to update the check-host-rpath script to accept both $(HOST_DIR)/usr/lib and $(HOST_DIR)/lib, because depending on how the package derives the path, it may be different. Since there are some dependency chains that involve $(STAGING_DIR), $(STAGING_DIR) may in fact be created before $(HOST_DIR). Since $(STAGING_DIR) is a subdirectory of $(HOST_DIR), it is possible that the newly added rule for $(HOST_DIR) never triggers. To make sure that the rule does trigger, add an order-only dependency from $(STAGING_DIR) to $(HOST_DIR). Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Move $(HOST_DIR)/usr/$(GNU_TARGET_NAME) one level up.Arnout Vandecappelle2017-07-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This is a step towards eliminating $(HOST_DIR)/usr. It allows us to convert all packages installing things into $(HOST_DIR)/usr/$(GNU_TARGET_NAME) (i.e., binutils and gcc) without affecting the rest. To allow compatibility with packages that still use $(HOST_DIR)/usr as the prefix, create a symlink from usr/$(GNU_TARGET_NAME) to ../$(GNU_TARGET_NAME). Note that the symlink creation will break when $(HOST_DIR)/usr/lib already exists as a directory, i.e. when rebuilding in an existing output directory. This is necessary: if we don't break it now, the following commits (which remove the usr part from various variables) _will_ break it. Effectively, the usr/ part is removed from $(STAGING_SUBDIR) (and therefore from $(STAGING_DIR)), so update the definition of that variable right away. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core/pkg-util: pass package directory and name when saving license filesYann E. MORIN2017-07-031-1/+1
| | | | | | | | | | | This will be useful when checking the hashes of the license files. [Peter: use '.' as buildroot directory so /buildroot.hash isn't checked] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Luca Ceresoli <luca@lucaceresoli.net> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Makefile: generate wrapper makefile when running make without a .configPeter Korsgaard2017-07-031-1/+1
| | | | | | | | | | | | | | | The recent change to error out instead of running menuconfig when no .config is available broke an existing use case: make O=output-foo; cd output-foo; br-init-conf (or similar to get a sensible .config); make As there is no wrapper makefile in output-foo. Fix it by ensuring the wrapper gets created if needed. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* .gitlab-ci.yml: run our runtime testsThomas Petazzoni2017-07-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | This commit improves our .gitlab-ci.yml logic to execute our runtime tests located in support/testing/. To do so, this commit: - Adds more Debian packages to be installed, namely the nose2 and pexpect packages needed by the runtime testing infrastructure, as well as the necessary Qemu emulators - The description of how to run the runtime tests. Each test is executed as a separate Gitlab CI job, so that the status of each test is easily visible in the Gitlab CI web interface. - The Makefile is improved to auto-generate .gitlab-ci.yml from .gitlab-ci.yml.in, like we're doing for defconfigs. Since the dependencies of .gitlab-ci.yml are no longer correct, we abandon them and instead make it a PHONY target. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [Arnout: simplify .gitlab-ci.in a little, removing redundant stuff; make .gitlab-ci.yml a PHONY target] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Makefile: don't run "menuconfig" automaticallyArnout Vandecappelle2017-07-011-3/+2
| | | | | | | | | | | | | | | | | | | | Since forever, we run 'menuconfig' automatically on an unconfigured tree. However, this does not help users that much: - If they read the documentation, they should already know to run make menuconfig first. - If they haven't read the documentation, dropping them in menuconfig isn't very helpful. - It's a likely that the user didn't intend to be in an unconfigured tree (e.g. wrong O= specified), so starting menuconfig (and polluting this wrong O= directory) is not very helpful. - It's possible that the user really doesn't want menuconfig, but instead needs xconfig, or some defconfig, or ... So, instead of trying to guess what the user needs, print an error and let the user decide what to do next. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Makefile: unconfigured "make toolchain" should run report errorArnout Vandecappelle2017-07-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by Alessandro Power on StackOverflow [1], the behaviour of "make toolchain" in an unconfigured tree is misleading. When .config doesn't exist, we don't read in the package .mk files, so "make <package>" doesn't work: $ make busybox make: *** No rule to make target 'busybox'. Stop. However, for "linux" and "toolchain", the corresponding file (or actually directory) already exists. So instead, we get: $ make linux make: Nothing to be done for 'linux'. This is confusing, because it looks as if the build succeeded. The obvious solution is to make linux and toolchain PHONY targets when .config doesn't exist. However, that actually does the reverse, because then a rule _does_ exist for them and since they don't have dependencies, make will consider them to be ready. Therefore, we also have to provide an explicit rule for them, and explicitly error out. Thise behaviour is still different from other packages, but at least it is much less confusing. [1] https://stackoverflow.com/questions/44521150 Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Luca Ceresoli <luca@lucaceresoli.net> Tested-by: Luca Ceresoli <luca@lucaceresoli.net> Acked-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* printvars: remove "Nothing to be done for 'printvars'."Arnout Vandecappelle2017-06-151-1/+1
| | | | | | | | | | | When calling 'make printvars' without -s, it ends with "Nothing to be done for 'printvars'." That's because the rule only contains $(info ...) calls and no actual shell commands to execute. To avoid this, make sure there is a shell command by adding :. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Makefile: add missing PHONY targetsArnout Vandecappelle2017-06-151-0/+9
| | | | | | | | | Quite a few targets in the top-level Makefile were missing the .PHONY marking. Now that the .PHONY declarations are next to the definition of the targets, they are much easier to find. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Makefile: declare targets PHONY where they are definedArnout Vandecappelle2017-06-151-4/+16
| | | | | | | | | | | | | | | | | | | | | | Currently, a lot of targets are declared PHONY together in the middle of the Makefile. This has two important shortcomings: - it is more difficult to see if a target is missing from PHONY; - it is currently inside the ifeq ($(BR2_HAVE_DOT_CONFIG),y) condition, but some of these targets are also defined when there is no .config; in that case, these targets are not declared as PHONY. Both issues can easily be solved by putting the PHONY declaration next to the definition of the target. The noconfig_targets are also all declared PHONY together; however, for these we anyway have to keep the noconfig_targets variable up-to-date, and that PHONY declaration is outside all conditions, so there is no benefit of splitting them. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Makefile: use pattern for manual-% in noconfig_targetsArnout Vandecappelle2017-06-151-2/+1
| | | | | | | This simplifies the variable a little Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Makefile: document noconfig_targets variableArnout Vandecappelle2017-06-151-0/+1
| | | | | Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Makefile: remove 'toolchain' from .PHONYArnout Vandecappelle2017-06-151-1/+1
| | | | | | | | toolchain is a package, so it is already defined as .PHONY in the inner-generic-package macro. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Kickoff 2017.08 cyclePeter Korsgaard2017-06-011-1/+1
| | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Update for 2017.052017.05Peter Korsgaard2017-05-311-2/+2
| | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Update for 2017.05-rc3Peter Korsgaard2017-05-301-2/+2
| | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Update for 2017.05-rc2Peter Korsgaard2017-05-171-2/+2
| | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Update for 2017.05-rc1Peter Korsgaard2017-05-081-2/+2
| | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* core: add rule to dump packages' build orderYann E. MORIN2017-04-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When debugging hidden dependencies, the build order is very important. Most notably, it is interesting to identify potential culprits. Add a new top-level rule, show-biuld-order, that dumps all the packages in the order they would get built. Note that there are a few differences with show-targets: - more packages are reported, becasue show-targets does not report host packages that have no prompt; - the output is line-based, because we're using $(info $(1)); getting a single output line like show-targets would require we use an actual command, like printf '%s ' $(1); but that takes a lot of time, while $(info $(1)) is almost instantaneous (the time to parse the Makefiles); - rootfs targets are not reported. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Peter Korsgaard <peter@korsgaard.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Makefile: use SPDX short identifier for Buildroot licenseRahul Bedarkar2017-04-011-1/+1
| | | | | Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core: enhance printvarsYann E. MORIN2017-03-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the output of printvars copntains the name of the variable, its expanded value and its un-expanded value. However, most of the time, we need the actual, expanded value, so it can be re-used from a (non-Buildroot) infrastructure script, like a post-build script, or a build-farm driver (e.g. a Jenkins job...) Add two options that a user may set to change the output of printvars: - QUOTED_VARS, if set, will quote the value - RAW_VARS, if set, will print the unexpanded value The new output by default only prints the expanded value now. So that it can be used as such: $ make -s printvars VARS=BUSYBOX_VERSION BUSYBOX_VERSION=1.26.2 $ make -s printvars VARS=BUSYBOX_RDEPENDENCIES QUOTED_VARS=YES BUSYBOX_RDEPENDENCIES='ncurses util-linux' $ make -s printvars VARS=BUSYBOX_FINAL_PATCH_DEPENDENCIES RAW_VARS=YES BUSYBOX_FINAL_PATCH_DEPENDENCIES=$(sort $(BUSYBOX_PATCH_DEPENDENCIES)) And it is even possible to directly evaluate it in a shell script: eval $(make -s printvars VARS=BUSYBOX_VERSION QUOTED_VARS=YES) Backward compatibility of the output is not maintained. It is believed that scripts that depended on the previous output were very fragile to begin with, because they had to filter the non-formatted output (splitting on spaces or braces was not really possible, because values could contain either). Document printvars and its options in the manual; list it in the output of 'make help'. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core: include arch-specific definitionsYann E. MORIN2017-03-261-0/+3
| | | | | | | | | | Allow architectures to define variables and helper macros. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Peter Korsgaard <jacmet@uclibc.org> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Add gitlab-CI supportArnout Vandecappelle2017-03-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The buildroot repository is now mirrored on https://gitlab.com/buildroot.org/buildroot so we can use Gitlab-CI to test Buildroot. Gitlab-CI is controlled by a .gitlab-ci.yml file that exists in the repository. For now, the only test is building all defconfigs (inspired on https://travis-ci.org/buildroot/buildroot-defconfig-testing/). Since all the defconfigs have to be specified in the .gitlab-ci.yml file, we generate the file based on .gitlab-ci.yml.in. The generated .gitlab-ci.yml file has to be committed into the repository, though, otherwise Gitlab-CI doesn't see it. So there is also a test to verify that .gitlab-ci.yml is up-to-date. Building all the defconfigs takes a long time. Gitlab-CI will do that every time it pulls from git.buildroot.org, which is once per hour. That is way too often. Therefore, the defconfigs are not built on pull, but only on explicit trigger through the API or when a tag is added. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> [Thomas: - fix typo not -> no - add LC_ALL=C when calling 'ls -1' to get a predictable order of the defconfigs - regenerate .gitlab-ci.yml.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Kickoff 2017.05 cyclePeter Korsgaard2017-03-011-1/+1
| | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Update for 2017.022017.02Peter Korsgaard2017-02-281-2/+2
| | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Update for 2017.02-rc3Peter Korsgaard2017-02-261-2/+2
| | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Update for 2017.02-rc2Peter Korsgaard2017-02-211-2/+2
| | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* package: add generic support for lz archivesBaruch Siach2017-02-151-0/+1
| | | | | | | | | | This commit teaches the generic package handling code how to extract .tar.lz archives. When lzip is not installed on the host, host-lzip gets built automatically. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/ccache: do not force colored diagnosticsYann E. MORIN2017-02-141-0/+1
| | | | | | | | | | | | | | | When GCC_COLORS is set, ccache passes '-fdiagnostics-color' to GCC but this flag requires GCC v4.9 or later. Older versions complain about the unrecognized command line option. Using GCC_COLORS in the context of Buildroot is seldom useful, so we just unexport GCC_COLORS altogether. Reported-by: Carlos Santos <casantos@datacom.ind.br> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Prepare for 2017.02-rc1Thomas Petazzoni2017-02-111-2/+2
| | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* reproducible: enable fakedateJérôme Pouiller2017-02-071-0/+1
| | | | | | | | | | Enable fakedate for whole build process. This work was sponsored by `BA Robotic Systems'. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Makefile, manual: Bump copyright yearPeter Korsgaard2017-01-271-1/+1
| | | | | | Happy 2017! Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* arch: add OpenRISC architecture supportWaldemar Brodkorb2017-01-251-0/+1
| | | | | | | | | | | | | | | | | | | Add support for OpenRISC. See here for more details about OpenRISC http://openrisc.io. All buildroot included upstream binutils versions are supported. Gcc support is not upstream, to be able to enable musl C library support later, we use the branch with musl support. At the moment it is possible to build a musl based toolchain, but bootup in Qemu fails. Gdb is only working to debug bare-metal code, there is no support for gdbserver/gdb on Linux, yet. [Peter: drop ?= for GCC_SOURCE] Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Tested-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Makefile: move SED definition into the main MakefileThomas Petazzoni2016-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit f71a621d91ec27f175fc84012962f88b1107305f, we are using the SED variable in the main Makefile. However, this variable is only defined in package/Makefile.in, which gets included only when a configuration is defined. This means that, if you do: $ make menuconfig savedefconfig without a configuration defined, it fails with: /bin/bash: /BR2_DEFCONFIG=/d: No such file or directory Makefile:898: recipe for target 'savedefconfig' failed make[1]: *** [savedefconfig] Error 127 This issue affects users of the "buildroot-submodule" project, which does menuconfig+savedefconfig automatically. They worked around this issue in commit https://github.com/Openwide-Ingenierie/buildroot-submodule/commit/d12676b608a58529c6b551aa176464166a200428, but really "make menuconfig savedefconfig" should work out of the box. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Merge branch 'next'Peter Korsgaard2016-12-011-11/+23
|\ | | | | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
| * Makefile: drop redundant shell call when deriving BASE_DIRDanomi Manchego2016-11-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 173135df5b69dfd5ae6fe6cf2de8833c6f74c143 ("core: re-enter make if $(CURDIR) or $(O) are not canonical paths") introduced the CANONICAL_O variable, defined as: CANONICAL_O := $(shell mkdir -p $(O) >/dev/null 2>&1)$(realpath $(O)) This duplicates the definition of BASE_DIR, by different means: BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd) So one of these shell calls is redundant. CANONICAL_O is defined first, so this commit replaces the BASE_DIR derivation with $(CANONICAL_O). Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
| * Makefile: fix ignored trace at target-finalizeGaël PORTAY2016-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make may throw an error (but ignored) trace when cleaning up the rootfs. The target-finalize rule intends to remove the folder `$(TARGET_DIR)/usr/share' but this directory may still contain items (such as the `udhcpc' helper script) and causes the rmdir to fail. The stderr output is redirected to /dev/null but it returns and error which is escaped by the leading `-'; but make reports an ignored-error. See the log below: $ make (...) rm -rf (...)/target/usr/share/gtk-doc rmdir (...)/target/usr/share rmdir: failed to remove '(...)/target/usr/share': Directory not empty make[1]: [Makefile:650: target-finalize] Error 1 (ignored) find /(...)/target -type f \( -perm /111 -o -name '*.so*' \) -not \( -name 'libpthread*.so*' -o -name 'ld-*.so*' -o -name '*.ko' \) -print0 | xargs -0 (...)/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-strip --remove-section=.comment --remove-section=.note 2>/dev/null || true This patch apply the same rule at the instruction immediately after: * redirecting stderr to /dev/null (already done) and * executing true if the `rmdir' instruction fails. Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
| * Makefile: make exported variable definitions consistentJérôme Pouiller2016-11-231-3/+3
| | | | | | | | | | | | | | | | Use a space before and after the equal sign when defining the TZ, LANG and LC_ALL variables, as suggested by the Buildroot coding style. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
| * Makefile: add '-n' to gzip invocations to improve reproducibilityJérôme Pouiller2016-11-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default invocation to gzip include timestamp in output file. This feature is incompatible with BR2_REPRODUCIBLE. It is possible to disable it with '-n'. The environment variable GZIP can hold a set of default options for gzip. So instead to find all gzip invocation in build process, we just export 'GZIP=-n'. Notice bzip2, lzma and xz are not impacted by this problem. On the other hand, lzop does include timestamp and does not provide any way to disable it. This work was sponsored by `BA Robotic Systems'. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
| * Makefile: generate SOURCE_DATE_EPOCH for reproducible buildsGilles Chanteperdrix2016-11-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reproducibility is requested, generate a global SOURCE_DATE_EPOCH environment variable which contains either the date of Buildroot last commit if running from a git repository, or the latest release date. This means that all packages embedding build dates will appear to have the same build date, so in case of new commit or release, all packages will appear to have been changed, even though some of them may not have changed in fact. The meaning of SOURCE_DATE_EPOCH is specified by the following specification: https://reproducible-builds.org/specs/source-date-epoch/ Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
| * Makefile: add missing targets to noconfig_targets and nobuild_targetsRahul Jain2016-11-151-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | currently some buildroot targets fails (list-defconfigs, graph-build, etc), if there is an issue with configuration. For example, enabling uboot package without providing custom version name results in failing of various targets. Signed-off-by: Rahul Jain <Rahul.Jain@imgtec.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> [Thomas: as suggested by Arnout, added printvars and savedefconfig to nobuild_targets.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
| * Makefile: delete default rulesArnout Vandecappelle2016-11-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | We don't use the default implicit rules that are added by make, so they just slow down the Makefile processing. The default implicit rules can be removed by defining an empty .SUFFIXES: target. This speeds up the start of the build on my machine from 5.6s to 4.9s. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* | Kickoff 2017.02 cyclePeter Korsgaard2016-12-011-1/+1
| | | | | | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* | Update for 2016.112016.11Peter Korsgaard2016-11-301-1/+1
| | | | | | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* | Update for 2016.11-rc3Peter Korsgaard2016-11-281-1/+1
| | | | | | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* | Makefile: fix distclean removal of $(O)Danomi Manchego2016-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | The distclean target no longer removes the "output" directory for in-tree builds, because $(O) is no longer just "output" in that case. Change the test to be against "$(CURDIR)/output", to match the O setting, and a similar test elsewhere in the same Makefile. Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
OpenPOWER on IntegriCloud