[OpenBIOS] [commit] r1101 - trunk/openbios-devel
repository service
svn at openbios.org
Sun Mar 3 10:02:29 CET 2013
Author: blueswirl
Date: Sun Mar 3 10:02:29 2013
New Revision: 1101
URL: http://tracker.coreboot.org/trac/openbios/changeset/1101
Log:
build: improve subdir rules
Use subdirectory build rules from QEMU. They allow a parallel build of
all available subdirectory targets.
Signed-off-by: Blue Swirl <blauwirbel at gmail.com>
Modified:
trunk/openbios-devel/Makefile
Modified: trunk/openbios-devel/Makefile
==============================================================================
--- trunk/openbios-devel/Makefile Thu Feb 28 00:06:10 2013 (r1100)
+++ trunk/openbios-devel/Makefile Sun Mar 3 10:02:29 2013 (r1101)
@@ -15,18 +15,24 @@
$(MAKE) -C $$dir clean; \
done
-build:
- @printf "Building..."
+build: start-build
@for dir in $(ODIRS); do \
$(MAKE) -C $$dir > $$dir/build.log 2>&1 && echo "ok." || \
( echo "error:"; tail -15 $$dir/build.log; exit 1 ) \
done
-build-verbose:
+SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGETS))
+SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
+
+quiet-command = $(if $(V),$1,$(if $(2), at echo $2 && $1, @$1))
+
+build-verbose: start-build $(SUBDIR_RULES)
+
+subdir-%:
+ $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C obj-$* V="$(V)" all,)
+
+start-build:
@echo "Building..."
- @for dir in $(ODIRS); do \
- $(MAKE) -C $$dir || exit 1; \
- done
run:
@echo "Running..."
More information about the OpenBIOS
mailing list