summaryrefslogtreecommitdiff
path: root/mk/build.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/build.mk')
-rw-r--r--mk/build.mk32
1 files changed, 16 insertions, 16 deletions
diff --git a/mk/build.mk b/mk/build.mk
index a7a464394..f155807e2 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
@@ -87,17 +88,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 +138,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}
@@ -185,11 +186,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)
@@ -429,7 +425,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
@@ -513,14 +509,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:
+ @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 ..."
- mksh $(TOPDIR)/package/pkgmaker
+ @$(TOPDIR)/bin/tools/pkgmaker
@:>.menu
dep:
@echo "Generating dependencies ..."
- mksh $(TOPDIR)/package/depmaker
+ $(TOPDIR)/bin/tools/depmaker > ${TOPDIR}/package/Depends.mk
.PHONY: menu dep