aboutsummaryrefslogtreecommitdiffstats
path: root/include/package.mk
Commit message (Collapse)AuthorAgeFilesLines
* build: Remove STAGING_DIR_HOST references for InstallDev/UninstallDevJeffery To2020-03-011-3/+3
| | | | | | | | | | | | | Build/InstallDev no longer places a file list in $(STAGING_DIR_HOST)/packages; this change removes the creation of $(STAGING_DIR_HOST)/packages and the attempted removal of a STAGING_DIR_HOST file list during package clean. This also changes the host directory passed to Build/UninstallDev from $(STAGING_DIR_HOST) to $(STAGING_DIR)/host, to match the directory passed to Build/InstallDev. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* Revert faulty tree pushFelix Fietkau2019-08-121-1/+1
| | | | | | | | | | | | Revert "mac80211: add new minstrel_ht patches to improve probing on mt76x2" (9861050b85e5381c93d73ffdbc24c130400e0fb8) Revert "kernel: use bulk free in kfree_skb_list to improve performance" (98b654de2e7502507b31f0fb82befbb48f9c8542) Revert "ramips: add preliminary support for WIO ONE" (085141dc5ba5e763e1bf4c1a2fd6957160810ccc) Revert "ramips: add preliminary support for SGE AP-MTKH7-0006 developer board" (b1db6d0539511f60bf65fbde28b16afa31180e34) Revert "build: use config.site generated by autoconf-lean, drop hardcoded sitefiles" (363ce4329d4f6c00b4a7cb83dd1821fafc0d40ad) Revert "toolchain: add autoconf-lean" (fdb30eed03ae56cd87078b64d9b2fac00799e783) Revert "build: allow overriding the filename on the remote server when downloading" (6fa0e07758524eddf20c9b66dfcb55c490e1961e) Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: use config.site generated by autoconf-lean, drop hardcoded sitefilesFelix Fietkau2019-08-121-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: include BUILD_VARIANT in PKG_BUILD_DIRJeffery To2019-08-051-1/+1
| | | | | | | | | | | This changes the default PKG_BUILD_DIR to take BUILD_VARIANT into account (if set), so that packages do not need to manually override PKG_BUILD_DIR just to handle variants. This also updates most base packages with variants to use the updated default PKG_BUILD_DIR. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* include/package.mk: Add support for src-checkout/ folderJohn Crispin2019-07-101-1/+17
| | | | | | | | | This feature is similar to the SRC_TREE_OVERRIDE. However instead of having to manually create a symlink inside the package folder, the buildsystem will check if $(TOP_DIR)/src-checkout/$(PKG_NAME)/.git is present and use this instead. Signed-off-by: John Crispin <john@phrozen.org>
* metadata: handle ABI version rebuild tracking for transient dependenciesJo-Philipp Wich2019-06-211-9/+21
| | | | | | | | | | | | Extend the packageauxvars database to keep a list of possible package dependencies for each provider, then utilize this information in buildroot to resolve the ABI version dependencies of dependent packages up to five levels deep. This should properly trigger rebuilds for packages indirectly depending on other packages whose ABI_VERSION changed. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: fix STAGING_DIR cleaning for packagesJeffery To2019-01-301-3/+4
| | | | | | | | | | | | | | | | This fixes two issues with cleaning package files from STAGING_DIR: * CleanStaging currently can only remove files and not directories. This changes CleanStaging to use clean-package.sh, which does remove directories. * Because of the way directories are ordered in the staging files list, clean-package.sh currently tries (and fails) to remove parent directories before removing subdirectories. This changes clean-package.sh to process the staging files list in reverse, so that subdirectories are removed first. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* build: do not override CCACHE_DIR when ccache is disabledJo-Philipp Wich2018-07-241-1/+1
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: prevent spurious package rebuilds under CONFIG_AUTOREMOVEJo-Philipp Wich2018-05-221-1/+1
| | | | | | | | | | | | | | | | When CONFIG_AUTOREMOVE is enabled, the build system touches an additional ".autoremove" stamp file in the cleaned build directory. Since the autoremove stamp file is touched after the compile process completed, it ends up being the most recent file of the package build directory, causing the timestamp.pl check of depends.mk to erroneously declare the ".built" and ".prepared" stamp files as stale, triggering a forced clean-build submake process. Fix the problem by using the ".built" stamp file as modification time reference when touching the ".autoremove" stamp file. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: add support for git submodules with CONFIG_SRC_TREE_OVERRIDEFelix Fietkau2018-04-271-1/+6
| | | | | | | Also work around an issue where git would store the modified workdir in the submodule git config files Signed-off-by: Felix Fietkau <nbd@nbd.name>
* include/package.mk: remove old configured stamps before attempting configurationMatthias Schiffer2017-12-281-1/+1
| | | | | | | | | | Some packages, e.g. busybox, explicitly remove old .configured stamps before attempting configuration, rather than after the actual configuration step. This seems like a good idea, as there will be no stamp left if configuration fails. Change generic rules to work like this, so package- specific rules can be dropped. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* build: allow PKG_PREPARED_DEPENDS and PKG_CONFIG_DEPENDS to be changed after ↵Felix Fietkau2017-12-121-2/+5
| | | | | | | | | including package.mk Reverts commit a9c96ef0ac7ac99e4928f5312f3d0d1252c98328 and replaces it with a different approach Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: fix QUILT related overridesFelix Fietkau2017-05-251-10/+12
| | | | | | They need to be defined before including quilt.mk Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: remove package makefile overlay functionalityFelix Fietkau2017-04-121-7/+0
| | | | | | | | 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: fix STAMP_PREPARED with quiltFelix Fietkau2017-03-221-1/+1
| | | | | | | quilt.mk needs to be included first, to ensure that STAMP_PREPARED does not include the hash if quilt is used. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: improve performance by avoiding lazy-eval for make shell callsFelix Fietkau2017-03-161-2/+2
| | | | | | | Avoids lots of redundant calls to mkhash on things like package/kernel/linux Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: clean up redundant touching of the package install info fileFelix Fietkau2017-02-261-2/+2
| | | | | | | Instead of using a separate .clean stamp file, remove the install info file on compile, then append the install package list afterwards Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: get rid of host.mkFelix Fietkau2017-02-261-1/+0
| | | | | | Defined required host related variables in toplevel.mk instead Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: keep recursive dependency check stampfiles up to dateFelix Fietkau2017-02-011-0/+3
| | | | | | | | | Since the main stamp file depends on the _check stampfile, the _check stampfile needs to be created on the first run as well. Fixes spurious rebuilds with CONFIG_AUTOREBUILD=y Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: make the touch .autoremove call non-fatalFelix Fietkau2017-01-241-1/+1
| | | | | | | Fixes build issues when there is nothing to do on the compile step (e.g. with unselected packages). Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: do not auto-clean packages where the autoremove step has not runFelix Fietkau2017-01-231-2/+5
| | | | | | | This avoids repeatedly unpacking and rebuilding packages that are failing the build. Re-running the failing step should be much faster. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: fix CONFIG_AUTOREMOVE for packages with multiple variantsFelix Fietkau2017-01-221-2/+4
| | | | | | | | Calling the clean target removes all .ipk files and un-stages the package. Add a new target just for clearing the build dir and call that one instead of the full clean target Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: disable CONFIG_AUTOREMOVE for packages/tools where QUILT is usedFelix Fietkau2017-01-191-5/+7
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: include CONFIG_AUTOREMOVE in STAMP_PREPAREDFelix Fietkau2017-01-191-1/+1
| | | | | | Fixes build issues when changing the CONFIG_AUTOREMOVE setting Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: add support for automatically removing build dir contents during buildFelix Fietkau2017-01-181-0/+6
| | | | | | | | | This is used to save space on buildbot instances. If any part of a package needs to be rebuild, the whole package is rebuilt from scratch. Stamp files are preserved to allow dependency checks to work Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: introduce extra targets that contain only proper dependenciesFelix Fietkau2017-01-181-5/+6
| | | | | | This can be used to check if targets like prepare or compile are up to date Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: define common subdir targets in rules.mkFelix Fietkau2017-01-181-4/+1
| | | | | | Reduce build system clutter and enable further rework Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: move STAGING_DIR_HOSTPKG and BUILD_DIR_HOST back to a common ↵Matthias Schiffer2017-01-181-1/+1
| | | | | | | | | | | | | directory for all targets Using a single host package staging dir (and build dir) significantly speeds up builds when multiple targets are built in succession, especially for large host packages like NodeJS. $(STAGING_DIR)/host is kept in addition to $(STAGING_DIR_HOSTPKG) in most places; it is still used as destination for host files in Build/InstallDev. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* build: remove obsolete parallel build related optionsFelix Fietkau2017-01-101-7/+2
| | | | | | Always use the main make jobserver, which has been the default for ages Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: add defaults for PKG_SOURCE, PKG_SOURCE_SUBDIR, PKG_VERSIONFelix Fietkau2016-12-221-1/+2
| | | | | | | | This makes it easier to unify versioning of git based package downloads. PKG_SOURCE_DATE along with an 8-character abbreviation of the git hash is used as PKG_VERSION, PKG_RELEASE should be used like normal packages. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: implement make check and make package/X/checkFelix Fietkau2016-12-171-9/+13
| | | | | | | | | | | | | | | | 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>
* include/package.mk: sync default value for hash fallback with mirror hashFelix Fietkau2016-12-161-1/+0
| | | | | | Simplifies dealing with PKG_HASH vs PKG_MD5SUM Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: remove duplicate Download/default definition from include/host-build.mkFelix Fietkau2016-12-161-13/+0
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: replace MD5SUM variables with HASHFelix Fietkau2016-12-161-1/+3
| | | | | | | Since we've switched to preferring SHA256 over MD5, the old variable name is misleading. Packages using the old name remain compatible. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: fix cleaning configured stamp fileYousong Zhou2016-10-151-1/+1
| | | | | | | | | | | | | | We have packages with their own parts appended to standard STAMP_CONFIGURED (mostly with an underscore character). This will render the current STAMP_CONFIGURED_WILD setting invalid and the build system may miss a rebuild on config change 1. Build with config A 2. Build with config B, yet .configured_A_xx did not get cleaned 3. Return to config A, but rebuild will not happen because stamp file of config A still exists Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* build: don't add -j for parallel builds with Make 4.2+Matthias Schiffer2016-06-151-1/+1
| | | | | | | | | | | | | | | | | | Make usually passes -j and jobserver arguments as part of MAKEFLAGS. LEDE removes MAKEFLAGS to have better control of the build, and re-adds the jobserver arguments with -j to the Make commandline where desired. Make 4.2+ behave differently with these arguments passed on the commandline than in MAKEFLAGS: -j will override the jobserver argument and the job count will be unlimited. Moving the flags to MAKEFLAGS will need many packages to be changed and tested; therefore, we opt for a less invasive change for now and just remove -j for Make 4.2+, as the jobserver argument alone is enough to enable parallel builds for these Make versions. Signed-off-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* build: add support for specifying extra package dependencies for prepared, ↵Felix Fietkau2016-05-051-3/+3
| | | | | | configured and built Signed-off-by: Felix Fietkau <nbd@nbd.name>
* include: choose package output directory based on repository infoJo-Philipp Wich2016-04-061-1/+1
| | | | | | | | | | | Use the new repository metadata field to choose the output directory of the final package archives. Non-sharable packages will be placed in the per-target package directory while the rest will be placed in a per-repository sub directory within the $OUTPUT_DIR/packages/$CPU_TYPE/ prefix. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: use -iremap feature to replace __FILE__ absolute path names in ↵Felix Fietkau2016-01-251-0/+5
| | | | | | | | | | packages with ones relative to $(BUILD_DIR) improves reproducible builds Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48489
* build: use directory name instead of PKG_NAME for staging files and package ↵Felix Fietkau2016-01-041-14/+14
| | | | | | | | metadata Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48110
* buildroot: move hardening options into separate fileSteven Barth2015-06-201-46/+1
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 46070
* package.mk: replicate SSP and relro in both CFLAGS and LDFLAGSSteven Barth2015-06-181-0/+4
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 46035
* include: clean package staging dir files before configureJo-Philipp Wich2015-05-261-10/+14
| | | | | | | | | | | | | This is required to allow packages to ship libraries with a different API. Previously the linker would favor the old shared libraries in STAGING_DIR instead of the just compiled ones in PKG_BUILD_DIR. Avoid that problem by clearing the package staging files right after prepare. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 45759
* build: include variant name in STAMP_INSTALLEDFelix Fietkau2015-04-031-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45253
* include: remove trailing whitespacesLuka Perkov2015-03-291-2/+2
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 45127
* build: clean up sitefiles, make them per-archFelix Fietkau2015-03-281-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45090
* build: define STAMP_CONFIGURED recursivelyJohn Crispin2015-03-211-1/+1
| | | | | | | | | | | | | | | Defining STAMP_CONFIGURED statically caused it not to reflect changes to PKG_CONFIG_DEPENDS made after including package.mk, like the additional options added by feeds.mk for all packages. Furthermore, as STAMP_CONFIGURED_WILDCARD was already defined recursively, the patsubst in its definition would never match, and in consequence, the stamps were never removed. This caused packages not to be rebuilt when they should have been. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> SVN-Revision: 44927
* build: explicitly unexport CONFIG_SITEFelix Fietkau2015-01-181-1/+1
| | | | | | | | | | | | | | | On systems with CONFIG_SITE in the environment (e.g. OpenSUSE) make will export the CONFIG_SITE set in include/package.mk by default. This will cause host builds to get the target site configuration, leading to all kinds of weirdness (wrong pointer size, wrong endianess). Fix this by explicitly unexporting CONFIG_SITE. The explicit export for the target builds overrides the unexport, so the target builds will still correctly get the site config. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> SVN-Revision: 44019
* Support for building an hardened OpenWRTJohn Crispin2015-01-171-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce configuration options to build an "hardened" OpenWRT. Options to enable Stack-Smashing Protection, FORTIFY_SOURCE and RELRO have been introduced. uClibc makefile now automatically detects if SSP support is necessary. hostapd makefile has been fixed to use "^" as sed separator since using a comma was problematic when using "-Wl,-z,now" and the like in TARGET_CFLAGS. Currently enabling SSP on user space depends on enabling SSP kernel side, this is due to the fact that TARGET_CFLAGS are used to build kernel modules (at least). Suggestions on how to avoid this are welcome. Using "select" instead of "depends on" doesn't seem to work with choice entries. Tested with a lantiq (WBMR) router, GCC 4.8, uClibc and a subset of the available packages. Needs to be tested with GCC 4.9 and the remaining packages. PIE not currently included. Signed-off-by: Alessandro Di Federico <ale+owrt@clearmind.me> SVN-Revision: 44005
* build: clean up and optimize ipkg control generator codeFelix Fietkau2014-10-221-3/+0
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43017