summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-12-21 13:01:07 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2009-12-21 13:01:07 +0100
commit2737423784ee8b84a7594232ec6aa2df0b400488 (patch)
tree3ea68a92bd187469847b3383f07be9a87d2c3a8b /mk
parent6b9416e4465c909141f4fcfd314e8d3cf0ea8477 (diff)
add a more realistic bulk target
thx to mirabilos
Diffstat (limited to 'mk')
-rw-r--r--mk/build.mk39
1 files changed, 27 insertions, 12 deletions
diff --git a/mk/build.mk b/mk/build.mk
index 145856d6d..98dc6592c 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -79,6 +79,9 @@ include ${TOPDIR}/mk/split-cfg.mk
all: world
+allcopy: all
+ $(CP) $(BIN_DIR) $(TOPDIR)/bulkdir/${d}/
+
.NOTPARALLEL:
.PHONY: all world clean cleantarget cleandir distclean image_clean
@@ -200,7 +203,7 @@ distclean:
@$(TRACE) distclean
@$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
rm -rf $(BUILD_DIR_PFX) $(BIN_DIR_PFX) $(TARGET_DIR_PFX) $(DISTDIR) \
- ${TOPDIR}/.cfg*
+ ${TOPDIR}/.cfg* $(TOPDIR)/bulkdir
rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_PARENT_PFX) $(TOOLS_BUILD_DIR)
rm -f .config* .defconfig .tmpconfig.h all.config \
${TOPDIR}/package/*/info.mk
@@ -224,7 +227,7 @@ $(CONFIG)/conf:
$(CONFIG)/mconf:
@$(MAKE) -C $(CONFIG)
-defconfig:
+defconfig: $(CONFIG)/conf
ifeq (${OStype},Linux)
@echo ADK_HOST_LINUX=y > $(TOPDIR)/.defconfig
endif
@@ -332,20 +335,32 @@ _mconfig: ${CONFIG}/conf _mconfig2 _config
_mconfig2: ${CONFIG}/conf modconfig
@${CONFIG}/conf -m ${RCONFIG} >/dev/null
-# build all targets and combinations
-bulk:
- mkdir $(TOPDIR)/bulk
- $(MAKE) TARGET=alix1c LIBC=uclibc FS=nfsroot PKG=ipkg allmodconfig
- $(MAKE) v
- $(CP) $(BIN_DIR) $(TOPDIR)/bulk
- $(MAKE) cleantarget
-
distclean:
@$(MAKE) -C $(CONFIG) clean
@rm -rf $(BUILD_DIR) $(TOOLS_BUILD_DIR) $(BIN_DIR) $(DISTDIR) \
- ${TOPDIR}/.cfg*
+ ${TOPDIR}/.cfg* $(TOPDIR)/bulkdir
@rm -rf $(TOOLCHAIN_BUILD_DIR) $(STAGING_PARENT) $(TARGET_DIR)
@rm -f .config* .defconfig all.config .tmpconfig.h \
${TOPDIR}/package/*/info.mk
-endif # ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
+endif # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
+
+# build all targets and combinations
+bulk:
+ while read target libc fs p; do \
+ mkdir -p $(TOPDIR)/bulkdir/$$target-$$libc-$$fs; \
+ ( \
+ echo === building $$target $$libc $$fs on $$(date); \
+ $(MAKE) prereq && \
+ $(MAKE) TARGET=$$target LIBC=$$libc FS=$$fs PKG=ipkg \
+ defconfig && \
+ if [ "x$$p" = xy ];then \
+ $(MAKE) TARGET=$$target LIBC=$$libc FS=$$fs PKG=ipkg \
+ allmodconfig; \
+ fi && \
+ $(MAKE) VERBOSE=1 -f mk/build.mk allcopy \
+ d=$$target-$$libc-$$fs && \
+ $(MAKE) cleantarget; \
+ rm .*config; \
+ ) 2>&1 | tee $(TOPDIR)/bulkdir/$$target-$$libc-$$fs/log; \
+ done <${TOPDIR}/target/bulk.lst