Browse Source

add a more realistic bulk target

thx to mirabilos
Waldemar Brodkorb 14 years ago
parent
commit
2737423784
5 changed files with 35 additions and 12 deletions
  1. 1 0
      .gitignore
  2. 3 0
      Makefile
  3. 27 12
      mk/build.mk
  4. 1 0
      package/linux-atm/Makefile
  5. 3 0
      target/bulk.lst

+ 1 - 0
.gitignore

@@ -27,3 +27,4 @@ dl/
 package/*/info.mk
 tools_build/
 extra/
+bulkdir/

+ 3 - 0
Makefile

@@ -121,6 +121,9 @@ image_clean imageclean cleanimage: .prereq_done
 menuconfig: .prereq_done
 	@${GMAKE_INV} menuconfig
 
+defconfig: .prereq_done
+	@${GMAKE_INV} defconfig
+
 allnoconfig: .prereq_done
 	@${GMAKE_INV} _config W=-n
 

+ 27 - 12
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

+ 1 - 0
package/linux-atm/Makefile

@@ -11,6 +11,7 @@ PKG_DESCR:=		ATM library and tools for Linux
 PKG_SECTION:=		libs
 PKG_URL:=		http://linux-atm.sourceforge.net
 PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=linux-atm/}
+PKG_NOPARALLEL:=	1
 
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tgz
 

+ 3 - 0
target/bulk.lst

@@ -0,0 +1,3 @@
+alix1c		uclibc		nfsroot		y
+alix1c		eglibc		nfsroot		y
+alix1c		glibc		nfsroot		y