From 05d0076d97ed69a531df1aa5cde3a1e6ed17f922 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 14 Sep 2010 19:04:46 +0200 Subject: replace mksh scripts with faster C programs depmaker and pkgmaker is replaced by C programs. scan-pkgs.sh will be replaced by another mechanism. scan-pkgs.sh is needed to recognize package flavour changes, so that a package is rebuild. Generation of meta-data is a lot faster now. Fix or add new PKG variables to fulfill the needs of the new programs. Documentation will follow as soon as it is stable. --- mk/build.mk | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'mk/build.mk') diff --git a/mk/build.mk b/mk/build.mk index f71808b3f..c3ab05dcd 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -87,17 +87,17 @@ endif ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y) include $(TOPDIR)/rules.mk -include ${TOPDIR}/mk/split-cfg.mk all: world ${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/Makefile) - mksh ${TOPDIR}/package/depmaker + $(TOPDIR)/bin/tools/depmaker > ${TOPDIR}/package/Depends.mk + .NOTPARALLEL: .PHONY: all world clean cleantarget cleandir distclean image_clean -world: $(DISTDIR) $(BUILD_DIR) $(TARGET_DIR) $(PACKAGE_DIR) ${TOPDIR}/.ADK_HAVE_DOT_CONFIG +world: $(DISTDIR) $(BUILD_DIR) $(TARGET_DIR) $(PACKAGE_DIR) ${BASH} ${TOPDIR}/scripts/scan-pkgs.sh ifeq ($(ADK_NATIVE),y) $(MAKE) -f mk/build.mk toolchain/kernel-headers-prepare tools/install target/config-prepare target/compile package/compile root_clean package/install package_index target/install @@ -137,10 +137,10 @@ ifeq ($(ADK_TARGET_PACKAGE_IPKG),y) echo "option offline_root ${TARGET_DIR}" >>$(STAGING_DIR)/etc/ipkg.conf endif -package/%: ${TOPDIR}/.ADK_HAVE_DOT_CONFIG ${STAGING_DIR}/etc/ipkg.conf ${TOPDIR}/package/Depends.mk +package/%: ${STAGING_DIR}/etc/ipkg.conf ${TOPDIR}/package/Depends.mk $(MAKE) -C package $(patsubst package/%,%,$@) -target/%: ${TOPDIR}/.ADK_HAVE_DOT_CONFIG +target/%: $(MAKE) -C target $(patsubst target/%,%,$@) toolchain/%: ${STAGING_DIR} @@ -179,11 +179,6 @@ newpackage: @echo "Edit package/$(PKG)/Makefile to complete" @echo "choose PKG_SECTION to add it to an existent submenu" -############################################################# -# -# Cleanup and misc junk -# -############################################################# root_clean: @$(TRACE) root_clean rm -rf $(TARGET_DIR) @@ -411,7 +406,7 @@ ifneq (,$(filter wrap%,${TARGET})) @echo ADK_LINUX_ALIX=y >> $(TOPDIR)/all.config endif -menuconfig: $(CONFIG)/mconf defconfig .menu +menuconfig: $(CONFIG)/mconf defconfig .menu package/Config.in.auto @if [ ! -f .config ];then \ $(CONFIG)/conf -D .defconfig $(CONFIG_CONFIG_IN); \ fi @@ -495,14 +490,18 @@ bulkallmod: ) 2>&1 | tee $(TOPDIR)/bin/$${target}_$$libc/$$target-$$libc-$$fs.log; \ done <${TOPDIR}/target/bulk.lst -menu .menu: $(wildcard ${TOPDIR}/package/*/Makefile) +${TOPDIR}/bin/tools/pkgmaker: + @$(HOSTCC) -g -o $@ tools/adk/pkgmaker.c tools/adk/sortfile.c tools/adk/strmap.c + +package/Config.in.auto menu .menu: $(wildcard ${TOPDIR}/package/*/Makefile) ${TOPDIR}/bin/tools/pkgmaker @echo "Generating menu structure ..." - mksh $(TOPDIR)/package/pkgmaker + @mkdir -p $(TOPDIR)/bin/tools + @$(TOPDIR)/bin/tools/pkgmaker @:>.menu dep: @echo "Generating dependencies ..." - mksh $(TOPDIR)/package/depmaker + $(TOPDIR)/bin/tools/depmaker > ${TOPDIR}/package/Depends.mk .PHONY: menu dep -- cgit v1.2.3 From 94a617136b6b5dea165b55bc011e96e460b3f1f9 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 14 Sep 2010 19:15:16 +0200 Subject: silent config dir compile, create pkgmaker target dir earlier --- mk/build.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mk/build.mk') diff --git a/mk/build.mk b/mk/build.mk index c3ab05dcd..150d3de25 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -491,11 +491,11 @@ bulkallmod: done <${TOPDIR}/target/bulk.lst ${TOPDIR}/bin/tools/pkgmaker: + @mkdir -p $(TOPDIR)/bin/tools @$(HOSTCC) -g -o $@ tools/adk/pkgmaker.c tools/adk/sortfile.c tools/adk/strmap.c package/Config.in.auto menu .menu: $(wildcard ${TOPDIR}/package/*/Makefile) ${TOPDIR}/bin/tools/pkgmaker @echo "Generating menu structure ..." - @mkdir -p $(TOPDIR)/bin/tools @$(TOPDIR)/bin/tools/pkgmaker @:>.menu -- cgit v1.2.3 From 4422cda575db22275b067e07ad4b585572d91756 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 15 Sep 2010 20:54:15 +0200 Subject: rebuild packages on flavour or choices change add new target rebuild. make cpio and pacch quiet. Use bin/tools for cpio and mkcrypt. --- mk/build.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mk/build.mk') diff --git a/mk/build.mk b/mk/build.mk index 150d3de25..a2e05ca1a 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -64,8 +64,9 @@ noconfig_targets:= menuconfig \ defconfig \ tags -POSTCONFIG= -@ \ +POSTCONFIG= -@\ if [ -f .config.old ];then \ + $(TOPDIR)/bin/tools/pkgrebuild;\ rebuild=0; \ if [ "$$(grep ^BUSYBOX .config|md5sum)" != "$$(grep ^BUSYBOX .config.old|md5sum)" ];then \ touch .rebuild.busybox;\ @@ -76,7 +77,7 @@ POSTCONFIG= -@ \ rebuild=1;\ fi; \ if [ $$rebuild -eq 1 ];then \ - cp .config .config.old; \ + cp .config .config.old;\ fi; \ fi -- cgit v1.2.3