aboutsummaryrefslogtreecommitdiffstats
path: root/include/toplevel.mk
Commit message (Collapse)AuthorAgeFilesLines
* toplevel.mk: remove legacy packages feed from 'make distclean'Michael Pratt2021-02-201-1/+1
| | | | | | | | package/openwrt-packages is left over from what is now a legacy repository and has no other reference in the build tree Signed-off-by: Michael Pratt <mcpratt@pm.me>
* build: IS_TTY is now set according to GNU Make's MAKE_TERMOUTR. Diez2021-02-151-1/+1
| | | | | | | | | | | | | | | The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. Fixes: FS#2086 The logic for IS_TTY was broken, because it was testing stdin instead of stdout. MAKE_TERMOUT was introduced in GNU Make version 4.1 (05 Oct 2014), so it should be available everywhere nowadays. Signed-off-by: R. Diez <rdiezmail-openwrt@yahoo.com>
* build: use SPDX license tagsPaul Spooren2021-02-051-6/+2
| | | | | | | | | The license folder is a core part of OpenWrt and all GPL-2.0 licensed. Use SPDX license tags to allow machines to check licenses. Signed-off-by: Paul Spooren <mail@aparcar.org> [rebase, keep some Copyright lines, sharpen commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* build: use ccache -C for cleaning the cacheSven Wegener2021-01-061-2/+2
| | | | | | | | | | This keeps the configuration, like the size of the cache, and the statistics intact. Move the removal of the cache directory to the distclean target, but only delete the .ccache directory inside of our build tree, as we should not mess with a user-configured external ccache directory this destructively. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
* build: drop clang wrapperKevin Darbyshire-Bryant2021-01-051-9/+1
| | | | | | | clang's gcc emulation does the right thing with -print-file-name now, drop the wrapper Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* build: detect broken make version on macOSFelix Fietkau2020-11-141-0/+6
| | | | | | | | | Apple ships a broken make version with the Xcode command line tools. Homebrew installs make as gmake by default in order to not collide with Apple's version. Exit with an error if the broken one is used accidentally Signed-off-by: Felix Fietkau <nbd@nbd.name>
* Revert "build: process variable exports from toplevel.mk only once"Adrian Schmutzler2020-10-161-2/+50
| | | | | | | | | | | This reverts commit ef7c34c1d1beac6bca4a683a3a161dd12a81f7e8. The commit seems to break all buildbots with messages like: /builder/shared-workdir/build/include/toplevel.mk:15: /builder/shared-workdir/build/include/toplevel-vars.mk: No such file or directory Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* build: process variable exports from toplevel.mk only onceFelix Fietkau2020-10-161-50/+2
| | | | | | | These run a lot of expensive shell calls, so redundant calls should be avoided Signed-off-by: Felix Fietkau <nbd@nbd.name>
* Revert "build: create tmp/userids file"Jo-Philipp Wich2020-09-141-1/+0
| | | | | | | | | | This reverts commit 34cc2c9a99f6542f009aa660790061f169aa96b3. The reverted shell code is a very poor reimplementation of the existing package-metadata.pl usergroup subcommand and the resulting file is not used anymore, so drop this code. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: dump effective user/group id mapping to fileJo-Philipp Wich2020-09-141-0/+1
| | | | | | | This file can be subsequently used to resolve symbolic user or group names to their numeric IDs when packing ipk archives. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: create tmp/userids filePaul Spooren2020-09-141-0/+1
| | | | | | | | | | | | | | | | | | | Multiple packages contain a USERID variable defining required user and group for the package to run. With the recent addition of "PKG_FILE_MODES" it is possible to define user and group of specific files, replacing (possibly insecure) post-inst scripts. These modes are set during build time and put directly into the packages. To allow user and group names rather than the numeric values, a mapping like `/etc/passwd` is required by the `ipkg-build` script, mapping names defined in "PKG_FILE_MODES" to a numeric value, as the build system does not create any users during build. This commit adds a single line to the `prepare-tmpinfo` target, so that everytime the feeds are updated the *passwd like* content of `./tmp/userids` is updated. Signed-off-by: Paul Spooren <mail@aparcar.org>
* build: fix README.md reference after renameAdrian Schmutzler2020-08-121-1/+1
| | | | | | | | | | | | The README file is displayed on "make help", but updating the command has been overlooked during the README -> README.md rename. Fix it. Fixes: d0113711a31f ("README: port to 21st century") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* build: improve ccache supportRoman Yeryomin2020-07-111-1/+1
| | | | | | | | | | | | | | | | | | Set CCACHE_DIR to $(TOPDIR)/.ccache and CCACHE_BASEDIR to $(TOPDIR). This allows to do clean and dirclean. Cache hit rate for test build after dirclean is ~65%. If CCACHE is enabled stats are printed out at the end of building process. CCACHE_DIR config variable allows to override default, which could be useful when sharing cache with many builds. cacheclean make target allows to clean the cache. Changes from v1: - remove ccache directory using CCACHE_DIR variable - remove ccache leftovers from sdk and toolchain make files - introduce CONFIG_CCACHE_DIR variable - introduce cacheclean make target Signed-off-by: Roman Yeryomin <roman@advem.lv>
* build: add 'make kernel_xconfig' commandSergio E. Nemirowski2020-07-081-0/+4
| | | | | | This adds the kernel_xconfig make target. Signed-off-by: Sergio E. Nemirowski <sergio@outerface.net>
* build: add nconfigSergio E. Nemirowski2020-07-071-0/+7
| | | | | | | | Add support for make target nconfig (ncurses) Reviewed-by: Eneas U de Queiroz <cotequeiroz@gmail.com> Signed-off-by: Sergio E. Nemirowski <sergio@outerface.net> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* build: add option to treat recursive deps as errorEneas U de Queiroz2020-05-201-5/+8
| | | | | | | | Running make with RECURSIVE_DEP_IS_ERROR=1 will cause a hard failure when a recursive dependency is detected. This is useful to apply stricter Ci tests, for example. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* build: show make output in scripts/config when V=sEneas U de Queiroz2020-05-201-1/+2
| | | | | | This should make debugging build errors in scripts/config a bit easier. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* Revert "build: add option to warn on recursive dependency"Jo-Philipp Wich2020-04-121-1/+1
| | | | | | | | | | This reverts commit 3204430e38f1a2ba7fda9471720a2a1042adf5e0. Reverting this commit in preparation for reverting dcf3e63a35 ("build: scripts/config - update to kconfig-v5.6") which introduces various unaddressed build breakages. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: add option to warn on recursive dependencyEneas U de Queiroz2020-04-091-1/+1
| | | | | | | | | | | This addes the option to treat recursive dependencies as warnings instead of errors, by running make with WARN_RECURSIVE_DEP=1. Note that the script/config targets will not get rebuilt when you add or remove WARN_RECURSIVE_DEP while running make. One must run 'make config-clean' before building config with a different setting. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* build: simplify building *config targetsEneas U de Queiroz2020-04-091-11/+4
| | | | | | | | | | | | Instead of passing pkg-config location through a variable when building qconf (make xconfig), prepend its parent directory to the PATH, as it is being done for other conf targets. Use a Makefile pattern rule to group all 'scripts/config/%onf' (currently conf, mconf, qconf) targets in a single rule. Add -O2 to CFLAGS when building them as well. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* build: fix host menu config targets using ncursesPetr Štetiar2019-09-251-1/+10
| | | | | | | | | | | | | | | | | | | | | On a recent Gentoo Linux installation, invoking `make menuconfig`, `make kernel_menuconfig` or `make kernel_nconfig` in the build system fails, whereas for example `make menuconfig` in the kernel tree alone works as expected. This is happening because STAGING_PREFIX is not defined when kernel's {menu,n}config target calls pkg-config from the toolchain/host and thus pkg-config returns an empty value, and the fallback values in the kernel config script are applied but those are off and the linking fails. Solution is to use system's pkg-config for all ncurses based menu config targets in order to provide proper compiler/linker flags. Ref: FS#2423 Cc: Thomas Albers <thomas.gameiro@gmail.com> Tested-by: Stijn Tintel <stijn@linux-ipv6.be> Tested-by: Eneas U de Queiroz <cotequeiroz@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* build: fix kernel_*config targets on 4.19Petr Štetiar2019-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | Recent kernel versions need toolchain in order to properly configure kernel, for example to set CC_HAS_ASM_GOTO config symbol, so missing toolchain leads to the following error while running `make kernel_oldconfig` on ath79 target with 4.19 kernel in the clean tree: init/Kconfig:17: syntax error init/Kconfig:16: invalid option ./scripts/clang-version.sh: line 15: mips-openwrt-linux-musl-gcc: command not found ./scripts/gcc-plugin.sh: line 11: mips-openwrt-linux-musl-gcc: command not found net/sched/Kconfig:44: warning: menuconfig statement without prompt make[4]: *** [scripts/kconfig/Makefile:69: oldconfig] Error 1 So in order to support this new kernel versions, this patch adds toolchain as a hard dependency to the kernel_*config targets. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* build: rename .packagesubdirs to .packageauxvarsJo-Philipp Wich2019-01-191-2/+2
| | | | | | | | Subsequent commits will put more auxiliary information into this file, such as the per-package ABI version, so rename the metadata script subcommand and file names accordingly. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: fix target metadata scan dependenciesFelix Fietkau2018-07-021-2/+2
| | | | | | | Move SCAN_DEPS to scan.mk to eliminate redundancy with scripts/feeds Add image/*.mk to SCAN_DEPS for targets to pick up newly added devices Signed-off-by: Felix Fietkau <nbd@nbd.name>
* include/toplevel.mk: Add xconfig targetAlif M. Ahmad2017-11-021-0/+9
| | | | | | | | | | Add xconfig target to include/toplevel.mk, so that ``make xconfig`` can be invoked from $TOPDIR to use Qt based configuration tool to prepare .config file. The qconf related sources are taken from linux 4.9.13 archive. Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
* include/toplevel: set env GIT_ASKPASS=/bin/trueAlexander Couzens2017-06-081-0/+1
| | | | | | | | When git-https request a service (e.g. github) which ask for credentials git will pass this request to the user resulting download.pl to wait for user input. Set GIT_ASKPASS to stop asking. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* build: ensure that flock is available for make downloadFelix Fietkau2017-06-081-1/+1
| | | | | | | It ensures that make download can parallelize downloads, even when some packages download the same files (e.g. gcc/initial, gcc/final) Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: new fixes for symlinked .config handlingSergey Ryazanov2017-05-111-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When running "make {config|defconfig|oldconfig}" with symlinked .config (e.g. to env/.config) it renames symlink to .config.old, creates new .config file, and writes the updated configuration into it. This breaks the desired workflow when changes in the configuration can be checked using "scripts/env diff" and commited using "scripts/env save". Since the env/.config file is not updated. The things become even worse when working with feeds, since feeds script quite often silently invokes "make {oldconfig|defconfig}" and breaks the symlink. Fix this issue by exporting KCONFIG_OVERWRITECONFIG=1, which forces mconf to overwrite the .config content, instead of renaming it and creating a new file. This variable is set only if .config is a symlink, otherwise the variable is not exported and the old behaviour is preserved. This change uses the same behaviour as "make menucofig", which has already been fixed in commit 5bf98b1acc3b6b178f8954c5075a58e1e6a99d6a. Also make a tiny cosmetic update to the "make menuconfig" target code layout to make it look like other config handling targets. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* build: allow val.% targets to bypass the prepare stepsFelix Fietkau2017-05-051-0/+3
| | | | | | | Significantly reduces time spent processing those targets and should also silence some log clutter which could confuse buildbot Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: fix symlinked .config handlingSergey Ryazanov2017-04-261-1/+1
| | | | | | | | | | | | | | | | | | When running "make menuconfig" with symlinked .config (e.g. to env/.config) it renames symlink to .config.old, creates new .config file and writes updated configuration here. This breaks the desired workflow when changes in the configuration could be checked using "scripts/env diff" and commited with "scripts/env save". Since the env/.config file is not updated. Fix this issue by exporting KCONFIG_OVERWRITECONFIG=1, which forces mconf to overwrite the .config content, instead of renaming it and creating a new file. This variable is set only if .config is a symlink, otherwise the variable is not exported and the old behaviour is preserved. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* build: remove package makefile overlay functionalityFelix Fietkau2017-04-121-1/+1
| | | | | | | | Recent attempts to use it have shown that it does not work properly except for a few undocumented cases. It's better to remove this now to avoid having more people fall into the same trap Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: get rid of host.mkFelix Fietkau2017-02-261-1/+3
| | | | | | Defined required host related variables in toplevel.mk instead Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: fix dependency of kernel_menuconfig targetBaptiste Jonglez2017-02-121-1/+1
| | | | | | | | | | | | When running "make kernel_menuconfig" in a clean tree, it fails with: make[1]: *** No rule to make target 'tools/quilt/install'. Stop. Replacing the dependency with 'tools/quilt/compile' fixes the issue (quilt and all its prerequisites will be built, and quilt will be installed in staging_dir). Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
* build: ensure that prereq-build is run before metadata scan from feeds (FS#367)Felix Fietkau2017-01-051-1/+1
| | | | | | Fixes ./scripts/feeds update Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: implement make check and make package/X/checkFelix Fietkau2016-12-171-0/+3
| | | | | | | | | | | | | | | | This is intended to be used for a wide array of package sanity checks. The first check that is implemented is for the hash of downloaded files. It checks: - Missing hash - Use of SHA256 instead of MD5 - dl/<file> hash not matching hash in makefile - deprecated MD5SUM variable The deprecated MD5SUM variable check is skipped for feeds/ until OpenWrt is updated as well Signed-off-by: Felix Fietkau <nbd@nbd.name>
* docs: remove all refrences in Makefiles/scriptsMathias Kresin2016-11-301-6/+0
| | | | | | | | | | The SDK Makefile still trys to copy the docs folder which was removed with 882f4d2d63272abce8c1966983aa10178e2e971f. This causes an SDK build error. All other removals are just cleanup. Signed-off-by: Mathias Kresin <dev@kresin.me>
* sdk: predefine SOURCE_DATE_EPOCHJo-Philipp Wich2016-10-211-1/+2
| | | | | | | | | When building packages within the SDK, there is no Git revision history available so prepopulate SOURCE_DATE_EPOCH in version.mk, similar to how we handle REVISION already. Acked-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* include/toplevel.mk: fix defconfig when ~/.openwrt/defconfig exists - take 2John Crispin2016-07-061-1/+1
| | | | | | | commit 5b728074160b ("include/toplevel.mk: fix defconfig when ~/.openwrt/defconfig exists") was missing a ! Signed-off-by: John Crispin <john@phrozen.org>
* include/toplevel.mk: fix defconfig when ~/.openwrt/defconfig existsJohn Crispin2016-07-061-1/+1
| | | | | | | ./scripts/feeds update will reset the .config file if ~/.openwrt/defconfig exists, thus resetting the target to ar71xx. Signed-off-by: John Crispin <john@phrozen.org>
* build: split scripts/metadata.pl into target-metadata.pl and package-metadata.plFelix Fietkau2016-06-071-3/+3
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* Centralize setting of all version info to include/version.mkHannu Nyman2016-05-241-2/+0
| | | | | | | | | Centralize setting all version information in include/version.mk * Set RELEASE env variable in include/version.mk instead of toplevel.mk. Stop exporting the variable. * Remove hardcoded release name from /etc/banner Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* build: fix make download in the SDKFelix Fietkau2016-05-161-4/+7
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* toplevel.mk: rescan target metadata if the image makefile changesFelix Fietkau2016-05-111-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: introduce SOURCE_DATE_EPOCH variableFelix Fietkau2016-01-311-0/+1
| | | | | | | | | | | SOURCE_DATE_EPOCH is the date of the last modified file using git/svn as date source. See https://reproducible-builds.org/specs/source-date-epoch/ Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48584
* include: group kmod ipk files into a "kernel" subdirectoryJo-Philipp Wich2016-01-241-2/+2
| | | | | | | | | | This is useful to just use the kmods from an official build while supplying base packages from a custom feed or the other way around; for just overriding the kmods with a local repo while using official repos for the rest. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 48475
* build: ignore the linux package in the sdk only for generating package data, ↵Felix Fietkau2016-01-101-1/+7
| | | | | | | | not for dependencies Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48171
* build: prevent host default LDFLAGS from leaking into packagesFelix Fietkau2016-01-081-0/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48158
* build: filter out relative directory entries from $PATHFelix Fietkau2016-01-031-0/+7
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48107
* toplevel.mk: fix distcleanFelix Fietkau2015-11-061-1/+1
| | | | | | | | | - remove logs like "make dirclean" does - remove key-build* Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de> SVN-Revision: 47397
* toplevel.mk: drop LD_LIBRARY_PATH overridesJo-Philipp Wich2015-10-031-2/+0
| | | | | | | | | | | | | Overriding LD_LIBRARY_PATH for host utilities frequently leads to problems with host executables loading shared libraries from the staging_dir, leading to crashes due to incompatible ABIs. Since most host utilties either embed a proper rpath or are reworked to link statically we do not need the workaround anymore. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47103