summaryrefslogtreecommitdiff
path: root/include/toplevel.mk
Commit message (Collapse)AuthorAgeFilesLines
* build: new fixes for symlinked .config handlingSergey Ryazanov2017-12-131-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> (cherry picked from commit e06d8f0f6f041c8ac1acba810eea96c32dc983e4)
* build: allow val.% targets to bypass the prepare stepsFelix Fietkau2017-12-131-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> (cherry picked from commit ddbb036bbb8a1030dd8f6fae0004d390b5f2b8a5)
* 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>
* 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: fix symlinked .config handlingSergey Ryazanov2017-05-021-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: 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
* include: toplevel: drop unused OPENWRTVERSION variableRafał Miłecki2015-09-141-2/+0
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 46906
* toplevel: fix release nameSteven Barth2015-09-131-1/+1
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 46899
* toplevel.mk: fix LD_LIBRARY_PATH for host binariesJo-Philipp Wich2015-07-171-2/+2
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 46394
* build: don't call prereq for any package/symlinks rulesFelix Fietkau2015-05-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the time, we want to make sure OpenWrt has been configured and setup before start running make. However, in case of package/symlinks, forcing prereq as a dependency creates multiple issues: *when executed on a clean workspace, it will prompt for user input and open a menuconfig window before executing the feeds command *the only way around that is to provide a .config. However, the "prereq" target would then run a "make defconfig", which will remove all the packages in the .config but from external feeds, as feeds have not been installed yet. The only way to currently work around this, is to generate a fake config by running "make defconfig", then "make package/symlinks", copy the real config (which at this point disregards the previously generated config), and run make defconfig again. Something like this: make defconfig make package/symlinks cp real.config .config make defconfig This change is removing the need for the first defconfig, making the process more logical for OpenWrt users using the package/symlinks target. Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com> SVN-Revision: 45657
* build: tell users to do non-paralle builds on errorsFelix Fietkau2015-04-161-1/+6
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45457
* include: remove trailing whitespacesLuka Perkov2015-03-291-1/+1
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 45127
* build: move tmp/.prereq-build to staging_dir/host to gracefully handle ↵Felix Fietkau2015-02-271-4/+4
| | | | | | | | staging_dir deletion Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 44551
* include: remove SDK specific target from toplevel.mkJo-Philipp Wich2015-02-081-1/+7
| | | | | | | | | Instead introduce a generic "make prepare" target which is executed if include/prepare.mk exists. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 44329
* include: let HOSTCC default to $(CC), not gccJo-Philipp Wich2015-02-051-1/+1
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 44277
* include: test build prereqs before preparing tempinfoJo-Philipp Wich2015-02-051-1/+1
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 44270
* sdk: track files with git and use it to implement proper clean targetsJo-Philipp Wich2015-01-101-1/+1
| | | | | | | | | | | | Initialize a Git repository in the SDK and use git reset / git clean to rollback any SDK changes with "make clean" or "make dirclean". This approach is more robust than nuking entire directory trees because some parts of them might have been shipped with the original archive. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 43904
* Fix build when TAR_OPTIONS env variable is setJohn Crispin2014-10-061-0/+2
| | | | | | | | | | | | | | | | | | The build system sets a make variable TAR_OPTIONS to the unpacking command, i.e. "-xf -". Now if an environment variable with the same name is set, the make variable is automatically exported to the environment. The make variable is added to the tar command in the makefile, and tar adds the environment variable. This results in a command like "tar -c /some/dir -xf - -xf -" which of course doesn't work. It is also difficult to spot as the second "-xf -" is not visible on the command line. I suggest this is fixed by unexporting TAR_OPTIONS as I see no use of the evironment variable, and it is changed from the original value anyway. Signed-off-by: Jan Kardell <jan.kardell@telliq.com> SVN-Revision: 42794
* build: introduce per feed repository supportJo-Philipp Wich2014-08-051-0/+2
| | | | | | | | | This changeset implements a new menuconfig option to generate separate repositories for each enabled package feed instead of one monolithic one. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 42002
* include/toplevel.mk: more chaos calmer renamingJohn Crispin2014-07-291-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 41871
* target/sdk: use .config instead of unconditionally enabling all build dirsFelix Fietkau2014-03-131-0/+11
| | | | | | | | Call make defconfig on every build to catch newly added packages Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39913
* build: fix build on Mac OS X 10.9Felix Fietkau2013-10-281-2/+9
| | | | | | | | Add a wrapper around the clang gcc emulation to fix -print-file-name=<lib> Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 38560
* build scripts: fix 'make defconfig' damageFlorian Fainelli2013-09-021-1/+2
| | | | | | | | | | | | | | | | | Looking at the target 'defconfig' in include/toplevel, it doesn't directly reference $(HOME)/.openwrt/defconfig nor does it reference any prerequisites using it as a target. Therefore, building "defconfig" as a target uses the defaults in the tree, but not the defaults that a user might have explicitly specified. This patch fixes this regression from r36361. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> [florian: apply with the proper patch level, wrap at 80 columns] Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 37883
* build: fix make defconfigFelix Fietkau2013-04-181-1/+1
| | | | SVN-Revision: 36362
* build: add new menuconfig code based on linux 3.9Felix Fietkau2013-04-181-3/+8
| | | | SVN-Revision: 36361
* build: make the color of the 'configuration out of sync' warning red to make ↵Felix Fietkau2013-03-171-2/+3
| | | | | | it harder for users to overlook SVN-Revision: 36082
* include/toplevel.mk: print warnings/errors to stderrJonas Gorski2013-02-211-1/+1
| | | | | | | | Makes warnings/errors visible when building with V=w/V=1. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 35716
* build: increase file descriptor count limit for the build, some systems ↵Felix Fietkau2012-10-311-1/+3
| | | | | | | | (e.g. Mac OS X default to 256, which is too little for some parallel builds) Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 34023
* it's time to break the barriersImre Kaloz2012-10-081-2/+2
| | | | SVN-Revision: 33666
* build: pass MAKE_JOBSERVER via environment to avoid leaking it to error messagesFelix Fietkau2012-09-231-1/+2
| | | | SVN-Revision: 33521
* build: move the -j flag to package.mk instead of grabbing it from makeflags, ↵Felix Fietkau2012-09-151-1/+1
| | | | | | otherwise it occasionally gets omitted on full builds SVN-Revision: 33422
* build: add a config option for passing the top-level make jobserver to ↵Felix Fietkau2012-09-151-1/+1
| | | | | | packages that have parallel build enabled, significantly improves parallelization and gets rid of CPU overcommit during intra-package parallel builds SVN-Revision: 33414
* scripts/config: build with gcc instead of clang on mac os xFelix Fietkau2012-07-161-2/+3
| | | | SVN-Revision: 32749
* toplevel.mk: unexport ARCH, it ends up in CONFIG_ARCH if defined and messes ↵Jo-Philipp Wich2012-07-111-1/+1
| | | | | | the buildroot up SVN-Revision: 32663