Jo-Philipp Wich
b4454ca4fa
build: remove GNU time dependency
...
Replace the GNU time program invocation with a simple Perl script reporting
the timing values. Since we require Perl anyway for the build system, we can
as well use that instead of requiring a random GNU utility rarely installed
by default.
Fixes: ff6e62b288
("build: log time taken by each packages/steps")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from d3ddf6631e
)
2018-12-18 11:01:54 +01:00
Andy Boyett
25eb240f63
build: add busybox support to time
prereq-check
...
Busybox time supports the GNU time '-f' syntax used by the build time
logging implemented in ff6e62b288
, however the prerequisite check added
only works with GNU time installed as `time` or `gtime`.
As busybox is a multicall binary, the name of the symlink setup by
SetupHostCommand also must be changed from `gtime` to `time` to fix the
value of argv[0]. This causes a number of shells (including bash) to use
their builtin impelementation of time, so the sole invocation has been
changed to use `env time` to use the value found on the $PATH.
Signed-off-by: Andy Boyett <agb@agb.io>
(cherry picked from commit 591780615b
)
2018-06-18 21:31:49 +02:00
Etienne Champetier
ff6e62b288
build: log time taken by each packages/steps
...
The idea is to easily get the list of packages taking the most time to build,
and see if we can improve them
v1: Use SetupHostCommand as recommended by John
v2: add space after 'time:', remove useless /usr/bin/time from SetupHostCommand
Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
2018-05-07 10:31:35 +02:00
Felix Fietkau
e313a33024
build: allow building an individual subdir without dependencies using NO_DEPS=1
...
QUILT=1 had the same effect, but it is sometimes useful to be able to do
this without quilt
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-21 13:03:20 +01:00
Felix Fietkau
d826af2cbb
build: make <subdir>/install opt-in, use it for target/ only
...
Fixes buildbot errors on running make target/install or
toolchain/install
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-09 13:51:35 +01:00
Felix Fietkau
0e22d63775
build: fix CONFIG_AUTOREMOVE for packages with multiple variants
...
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>
2017-01-22 17:40:31 +01:00
Felix Fietkau
7a523569f7
build: add support for automatically removing build dir contents during build
...
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>
2017-01-18 23:57:08 +01:00
Felix Fietkau
6cf067d084
build: define common subdir targets in rules.mk
...
Reduce build system clutter and enable further rework
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-18 23:57:07 +01:00
Felix Fietkau
7a315b0b5d
build: implement make check and make package/X/check
...
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>
2016-12-17 10:36:25 +01:00
Felix Fietkau
f08623516f
build: add logging for package host builds
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48417
2016-01-20 21:31:56 +00:00
Felix Fietkau
8977571d7f
build: split BUILD_LOG logs per variant
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48415
2016-01-20 21:31:43 +00:00
Felix Fietkau
c7308bc9f1
build: use a separate variable checking the subdir path (for host packages)
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48410
2016-01-20 20:13:40 +00:00
Felix Fietkau
36502c5a6f
build: move host build directories of package/* to build_dir/target-*/host/
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48400
2016-01-20 19:12:06 +00:00
Luka Perkov
7002f6326e
include: remove trailing whitespaces
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
SVN-Revision: 45127
2015-03-29 07:29:18 +00:00
Felix Fietkau
364fb4dacb
build: do not process built-in rules for make subdirs
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 43016
2014-10-22 08:57:11 +00:00
Felix Fietkau
b544fd922a
tools: fix stampfile dependency handling when the list of build dirs changes ( #15186 )
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 39845
2014-03-08 17:15:45 +00:00
John Crispin
b065867cfb
log failed package builds
...
SVN-Revision: 32050
2012-06-04 18:29:29 +00:00
Felix Fietkau
b68404f278
remove legacy package/foo-compile wrapper targets, people should be used to the correct target names by now
...
SVN-Revision: 27023
2011-05-28 16:27:21 +00:00
Felix Fietkau
d637ae2fc8
make the build system a bit more silent without V=99
...
SVN-Revision: 26460
2011-04-04 00:54:37 +00:00
Felix Fietkau
61485f6491
build: reduce the amount of generated make code for the initial prereq scan - makes it about 20% faster
...
SVN-Revision: 26436
2011-04-03 03:40:09 +00:00
Felix Fietkau
314ce66b86
build: use a conditional @ sign before silenced targets instead of .SILENT - makes prereq checks more than twice as fast
...
SVN-Revision: 26435
2011-04-03 03:40:04 +00:00
Ralph Hempel
a1973192c6
add configure as package target
...
SVN-Revision: 23262
2010-10-05 20:20:13 +00:00
Felix Fietkau
7f80e26661
fix build dependencies on packages with multiple variants but no selected virtual packages
...
SVN-Revision: 23102
2010-09-20 20:17:28 +00:00
Felix Fietkau
00d1e599d7
add a command for printing a cleaned up make target database - will be used to analyze package dependencies at some point
...
SVN-Revision: 22871
2010-09-01 17:51:36 +00:00
Felix Fietkau
579d54038b
build system: introduce a new feature called build variants. it allows building a package multiple times in one pass with different build dirs, based on the same build settings. replaces templating hacks like the one used in the hostapd package
...
SVN-Revision: 18357
2009-11-10 22:00:54 +00:00
Felix Fietkau
7dc435ea29
move the toolchain_install stampfile to the right place to fix spurious missing toolchain errors after cleaning stuff
...
SVN-Revision: 16776
2009-07-11 12:48:59 +00:00
Ralph Hempel
6f29703625
add dist and distcheck target (to create new source balls)
...
SVN-Revision: 16230
2009-05-31 12:01:05 +00:00
Ralph Hempel
c4d7af7094
added BUILD_LOG_DIR variable, make clean will delete the ./logs dir
...
SVN-Revision: 16148
2009-05-28 16:30:04 +00:00
Florian Fainelli
d334c1e956
stop build when an error occurs and when BUILDLOG is set ( #5160 )
...
SVN-Revision: 16079
2009-05-26 14:18:05 +00:00
Felix Fietkau
97845201e4
add missing $(if) check for build logging
...
SVN-Revision: 15366
2009-04-24 01:20:23 +00:00
Felix Fietkau
5e1e868230
add BUILD_LOG option to let the build system log all subdir make command output to individual files (useful for debugging parallel builds)
...
SVN-Revision: 15362
2009-04-24 01:04:50 +00:00
Felix Fietkau
167846e488
add support for config options checking in top-level directory stampfiles
...
SVN-Revision: 15112
2009-04-06 09:56:16 +00:00
Felix Fietkau
227399122b
add makefile target alias package/<name>/host/<target> for host builds
...
SVN-Revision: 14944
2009-03-18 21:53:35 +00:00
Felix Fietkau
ddcfaeb1e5
move host build in packages into a separate namespace: package/<name>/host/<target> this allows dependencies between host and target packages, and saves unnecessary host builds for packages that contain both variants
...
SVN-Revision: 14905
2009-03-17 02:20:34 +00:00
Felix Fietkau
bdb9c7351c
some more build system cleanup
...
SVN-Revision: 12329
2008-08-17 11:14:13 +00:00
Felix Fietkau
a3a37d0bb1
rework parallel building to get rid of some warnings and add back support for parallelizing the kernel build fixes #3882
...
SVN-Revision: 12322
2008-08-16 16:59:47 +00:00
Felix Fietkau
311c9403d9
fix make variable overriding for package makefiles on the command line
...
SVN-Revision: 12204
2008-08-06 11:33:26 +00:00
Felix Fietkau
4c665e6ca4
large improvement for parallel builds. works without V=99 now and without warnings. tested with -j on an 2x dual core opteron machine
...
SVN-Revision: 11414
2008-06-09 15:38:45 +00:00
Felix Fietkau
31a3a503cc
add a flag "IGNORE_ERRORS", which can be used to ignore build errors in packages
...
SVN-Revision: 11059
2008-05-07 16:45:00 +00:00
Felix Fietkau
ac40a80f35
make aliases for package targets if the package directories are in further subdirectories example: if there is a package/libs/foo/compile, then package/foo/compile will be an alias for it
...
SVN-Revision: 9384
2007-10-21 07:18:10 +00:00
Felix Fietkau
a9d683ca91
major target cleanup. it is now possible to have subtargets that can override many target settings, including arch - merge adm5120, adm5120eb. target profiles still need to be adapted for subtargets
...
SVN-Revision: 8694
2007-09-08 19:55:42 +00:00
Felix Fietkau
761dc0a0ae
fix a dependency bug
...
SVN-Revision: 8561
2007-08-30 22:43:25 +00:00
Felix Fietkau
d475d94aab
avoid rdep in the top level make process (subdir.mk) - it leaks too much memory and increases the startup time for regular make commands. timestamp.pl is more lightweight here
...
SVN-Revision: 8533
2007-08-29 03:51:49 +00:00
Nicolas Thill
ba05b57573
rename 'stampfiles' directory to 'stamp'
...
SVN-Revision: 8455
2007-08-21 18:07:55 +00:00
Felix Fietkau
c6bc77ea36
build system cleanup/restructuring as described in http://lists.openwrt.org/pipermail/openwrt-devel/2007-August/001159.html
...
SVN-Revision: 8362
2007-08-07 00:04:25 +00:00
Felix Fietkau
88163e91e8
ignore dependencies when using QUILT
...
SVN-Revision: 8244
2007-07-30 21:30:18 +00:00
Felix Fietkau
d7f2cb1642
next round of cleanup, convert target/ - make -j works now ;)
...
SVN-Revision: 8242
2007-07-30 21:14:08 +00:00
Felix Fietkau
a7b635f075
more cleanup
...
SVN-Revision: 8238
2007-07-30 18:39:20 +00:00
Felix Fietkau
49e628f765
next round of build system cleanup - convert package/ to new structure
...
SVN-Revision: 8236
2007-07-30 18:22:01 +00:00
Felix Fietkau
f1ac6cf7ec
fix compile errors with make 3.80
...
SVN-Revision: 8230
2007-07-30 15:00:27 +00:00