aboutsummaryrefslogtreecommitdiffstats
path: root/include/package.mk
Commit message (Collapse)AuthorAgeFilesLines
* Revert "build: use config.site generated by autoconf-lean, drop hardcoded ↵Daniel Golle2021-03-021-1/+1
| | | | | | | | sitefiles" This reverts commit f439e291304a93b982e912dc91b80ca950a594f3. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* build: use config.site generated by autoconf-lean, drop hardcoded sitefilesFelix Fietkau2021-02-281-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: filter out own packages on package version checkFelix Fietkau2021-02-151-2/+2
| | | | | | | This was accidentally dropped in 27a4a71c2408 ("metadata: handle ABI version rebuild tracking for transient dependencies") Signed-off-by: Felix Fietkau <nbd@nbd.name>
* Mostly revert "build: add support for fixing up library soname"Felix Fietkau2021-02-151-2/+0
| | | | | | | | | This reverts commit b12288fa69b171f7c9405518c9bed3581a06f7ce. The patchelf approach is too fragile, and the only users of this have been converted to make patching unnecessary Leave the abi_version_str variable in place in rules.mk Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: add support for fixing up library sonameFelix Fietkau2021-02-141-0/+2
| | | | | | | | | | This makes it possible to declare a package ABI_VERSION independent from the upstream soname by setting PKG_ABI_VERSION in the package makefile. The library filename is fixed up for files installed to packages and to the staging dir. References to the original from executables within the same package are also fixed up Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: fix ABI version rebuild dependencyFelix Fietkau2021-02-141-1/+1
| | | | | | | A stray comma was being appended to the last package version dependency, causing it to be missed for ABI version checks Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: use SPDX license tagsPaul Spooren2021-02-051-5/+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: drop ccache variables from specific targetsSven Wegener2021-01-011-3/+0
| | | | | | | With commit 2ca084cc ("build: improve ccache support") these variables are being set globally and we don't need them for specific targets. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
* download: handle possibly invalid local tarballsPetr Štetiar2020-11-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it's assumed, that already downloaded tarballs are always fine, so no checksum checking is performed and the tarball is used even if it might be corrupted. From now on, we're going to always check the downloaded tarballs before considering them valid. Steps to reproduce: 1. Remove cached tarball rm dl/libubox-2020-08-06-9e52171d.tar.xz 2. Download valid tarball again make package/libubox/download 3. Invalidate the tarball sed -i 's/PKG_MIRROR_HASH:=../PKG_MIRROR_HASH:=ff/' package/libs/libubox/Makefile 4. Now compile with corrupt tarball source make package/libubox/{clean,compile} Signed-off-by: Petr Štetiar <ynezz@true.cz>
* build: fix extreme build system slowdown caused by SOURCE_DATE_EPOCH changesFelix Fietkau2020-09-051-0/+2
| | | | | | | | Adding inline shell invocations in per-target variables causes them to be executed over and over again, which causes a significant slowdown. Fix this by evaluating it only once per package directory Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: improve ccache supportRoman Yeryomin2020-07-111-1/+3
| | | | | | | | | | | | | | | | | | 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: 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