summaryrefslogtreecommitdiffstats
path: root/include/depends.mk
Commit message (Collapse)AuthorAgeFilesLines
* build: make find_md5 reproducible with AUTOREMOVEChristian Marangi2022-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | While experimenting with the AUTOREMOVE option in search of a way to use prebuilt host tools in different buildroot, it was discovered that the md5 generated by find_md5 in depends.mk is not reproducible. Currently the hash is generated by the path of the file in addition to the file mod time. Out of confusion, probably, there was an idea that such command was used on the package build_dir. Reality is that this command is run on the package files. (Makefile, patches, src) This is problematic because the package Makefile (for example) change at each git clone and base the hash on the Makefile mtime doesn't really reflect if the Makefile actually changes across a buildroot or not. A better approach is to generate an hash of each file and then generate an hash on the sort hash list. This way we remove the problem of git clone setting a wrong mtime while keeping the integrity of checking if a file changed for the package as any change will result in a different hash. Introduce a new kind of find_md5 function, find_md5_reproducible that apply this new logic and limit it only with AUTOREMOVE option set to prevent any kind of slowdown due to additional hash generation. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* depends.mk: fix typo in rdep functionMichael Pratt2022-09-111-1/+1
| | | | | | | | | | | Just like later in the file, the precursor to <stampfile>_check <stampfile>_check.1 is supposed to be moved to <stampfile>_check before it is touched. This line would error if it was ever run. Signed-off-by: Michael Pratt <mcpratt@pm.me>
* build: introduce $(MKHASH)Leonardo Mörlein2021-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, it was assumed that mkhash is in the PATH. While this was fine for the normal build workflow, this led to some issues if make TOPDIR="$(pwd)" -C "$pkgdir" compile was called manually. In most of the cases, I just saw warnings like this: make: Entering directory '/home/.../package/gluon-status-page' bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found [...] While these were only warnings and the package still compiled sucessfully, I also observed that some package even fail to build because of this. After applying this commit, the variable $(MKHASH) is introduced. This variable points to $(STAGING_DIR_HOST)/bin/mkhash, which is always the correct path. Signed-off-by: Leonardo Mörlein <me@irrelefant.net>
* build: use SPDX license tagsPaul Spooren2021-02-051-5/+3
| | | | | | | | | 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: find_md5 list with mod time and sortedJohn Beckett2020-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | It was observed that the MD5 would not change after source files had been modified, looking deeper into the build process it was discovered that find_md5 build function makes a list of the files being built and then passes the list to a summing utility on stdin. The resultant MD5 is of the file list, not the contents of the files. The MD5 would change if the ordering of the list changed, or items were removed or deleted. The proposed fix is to add the modification time after the filename and then sort the list to prevent find returning files in a different order falsely re-triggering a rebuild. The MD5 will now change when a file is modified or files are added/removed from the list. Using 'T@' to show time in epoch for timezone independent behaviour. Signed-off-by: John Beckett <john.beckett@net2edge.com>
* build: add missing wildcard for ignoring .pkgdir in dependency checksFelix Fietkau2017-02-051-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: stage unstripped packages inside PKG_BUILD_DIRFelix Fietkau2017-01-181-1/+1
| | | | | | | | | This makes the build slightly more efficient by avoiding the need to re-stage packages on every full build run. It is also necessary for the upcoming CONFIG_AUTOREMOVE feature Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: introduce extra targets that contain only proper dependenciesFelix Fietkau2017-01-181-0/+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: use mkhash to replace various quirky md5sum/openssl callsFelix Fietkau2017-01-051-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: find_md5: ignore non-existent files or directoriesYousong Zhou2016-11-241-1/+1
| | | | | | | Targets like malta can have no patches/ directory available and this commit tries quash "no such file or directory" messages from `find` Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* include: remove trailing whitespacesLuka Perkov2015-03-291-1/+1
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 45127
* change the recursive dependency template to use more make evaluation - the ↵Felix Fietkau2010-11-241-21/+22
| | | | | | shell command got so long that it triggered "Argument list too long" on some systems (#8231) SVN-Revision: 24131
* ignore vim .swp files when scanning for updates (#7867)Jo-Philipp Wich2010-09-031-1/+1
| | | | SVN-Revision: 22880
* speed up the build system by including include/shell.sh on shell commands ↵Felix Fietkau2010-08-191-1/+1
| | | | | | only where necessary SVN-Revision: 22720
* fix timestamp checks for build system paths which have '.svn' in their ↵Felix Fietkau2010-04-141-1/+1
| | | | | | directory name SVN-Revision: 20856
* add autorebuild check for menuconfigFelix Fietkau2007-10-141-1/+1
| | | | SVN-Revision: 9301
* clean up recursive dependency handling, use timestamp.pl again, because it ↵Felix Fietkau2007-08-301-15/+31
| | | | | | saves memory and execution time SVN-Revision: 8558
* fix a rebuild bug related to quiltFelix Fietkau2007-07-301-3/+5
| | | | SVN-Revision: 8255
* ignore filenames that can cause problems for the recursive dependency handlingFelix Fietkau2007-07-261-2/+2
| | | | SVN-Revision: 8171
* fix recursive dependencies on build directories - should lead to fewer ↵Felix Fietkau2007-05-091-8/+9
| | | | | | spontaneous rebuilds SVN-Revision: 7151
* ignore errors in the find command for dep checksFelix Fietkau2007-04-181-1/+1
| | | | SVN-Revision: 6997
* clean up dependency handling for autorebuildsFelix Fietkau2007-04-151-0/+28
SVN-Revision: 6956