diff options
Diffstat (limited to 'mk/build.mk')
-rw-r--r-- | mk/build.mk | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/mk/build.mk b/mk/build.mk index 87271f863..2fb5bb3bf 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -80,6 +80,9 @@ include ${TOPDIR}/mk/split-cfg.mk all: world +allcopy: all + $(CP) $(BIN_DIR) $(TOPDIR)/bulkdir/${d}/ + ${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config mksh ${TOPDIR}/package/depmaker @@ -200,14 +203,14 @@ cleantarget: @$(TRACE) cleantarget @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE) rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) ${TOPDIR}/.cfg - rm -rf $(TOOLCHAIN_BUILD_DIR) $(STAGING_PARENT) + rm -rf $(TOOLCHAIN_BUILD_DIR) $(STAGING_PARENT) all.config .defconfig rm -f .tmpconfig.h ${TOPDIR}/package/*/info.mk distclean: @$(TRACE) distclean @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE) @rm -rf $(BUILD_DIR_PFX) $(BIN_DIR_PFX) $(TARGET_DIR_PFX) $(DISTDIR) \ - ${TOPDIR}/.cfg* ${TOPDIR}/package/pkglist.d + ${TOPDIR}/.cfg* ${TOPDIR}/package/pkglist.d $(TOPDIR)/bulkdir @rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_PARENT_PFX) $(TOOLS_BUILD_DIR) @rm -f .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \ .menu ${TOPDIR}/package/*/info.mk ${TOPDIR}/package/Depends.mk @@ -236,7 +239,7 @@ $(CONFIG)/conf: $(CONFIG)/mconf: @$(MAKE) -C $(CONFIG) -defconfig: .menu +defconfig: .menu $(CONFIG)/conf ifeq (${OStype},Linux) @echo ADK_HOST_LINUX=y > $(TOPDIR)/.defconfig endif @@ -252,6 +255,9 @@ endif ifeq (${OStype},NetBSD) @echo ADK_HOST_NETBSD=y > $(TOPDIR)/.defconfig endif +ifneq (,$(filter CYGWIN%,${OStype})) + @echo ADK_HOST_CYGWIN=y > $(TOPDIR)/.defconfig +endif @if [ ! -z "$(TARGET)" ];then \ grep "^config" target/Config.in \ |grep -i "$(TARGET)" \ @@ -261,10 +267,10 @@ endif echo $$symbol >> $(TOPDIR)/.defconfig; \ done; \ fi -ifneq (,$(filter %_qemu,${TARGET})) +ifneq (,$(filter qemu%,${TARGET})) @echo ADK_LINUX_QEMU=y >> $(TOPDIR)/.defconfig endif -ifneq (,$(filter %_rescue,${TARGET})) +ifneq (,$(filter rescue%,${TARGET})) @echo ADK_LINUX_RESCUE=y >> $(TOPDIR)/.defconfig endif ifneq (,$(filter rb%,${TARGET})) @@ -344,14 +350,6 @@ _mconfig: ${CONFIG}/conf _mconfig2 _config _mconfig2: ${CONFIG}/conf modconfig .menu @${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) \ @@ -360,7 +358,28 @@ distclean: @rm -f .config* .defconfig all.config .tmpconfig.h ${TOPDIR}/prereq.mk \ .menu ${TOPDIR}/package/*/info.mk ${TOPDIR}/package/Depends.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 && \ + if [ "x$$p" = xy ];then \ + $(MAKE) TARGET=$$target LIBC=$$libc FS=$$fs PKG=ipkg \ + allmodconfig; \ + else \ + $(MAKE) TARGET=$$target LIBC=$$libc FS=$$fs PKG=ipkg \ + defconfig; \ + 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 .menu menu: mksh $(TOPDIR)/package/pkgmaker |