-
-menuconfig: $(CONFIG)/mconf
- -touch .config
- -cp .config .config.test
- @$(CONFIG)/mconf $(CONFIG_CONFIG_IN)
-
-config: $(CONFIG)/conf
- -touch .config
- -cp .config .config.test
- @$(CONFIG)/conf $(CONFIG_CONFIG_IN)
-
-oldconfig: $(CONFIG)/conf
- -touch .config
- -cp .config .config.test
- @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
-
-randconfig: $(CONFIG)/conf
- -touch .config
- -cp .config .config.test
- @$(CONFIG)/conf -r $(CONFIG_CONFIG_IN)
-
-allyesconfig: $(CONFIG)/conf
- #@$(CONFIG)/conf -y $(CONFIG_CONFIG_IN)
- #sed -i -e "s/^CONFIG_DEBUG.*/# CONFIG_DEBUG is not set/" .config
- -touch .config
- -cp .config .config.test
- @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
-
-allnoconfig: $(CONFIG)/conf
- -touch .config
- -cp .config .config.test
- @$(CONFIG)/conf -n $(CONFIG_CONFIG_IN)
-
-defconfig: $(CONFIG)/conf
- -touch .config
- -cp .config .config.test
- @$(CONFIG)/conf -d $(CONFIG_CONFIG_IN)
-
-#############################################################
-#
-# Cleanup and misc junk
-#
-#############################################################
-clean:
- @$(MAKE) -C $(CONFIG) clean
-
-distclean: clean
-
-endif # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
-
-.PHONY: dummy subdirs release distclean clean config oldconfig \
- menuconfig tags check test depend
-
-targets:
- @echo $(TARGETS)
+ $< Config.in
+
+kernel_menuconfig: .config FORCE
+ -$(MAKE) target/linux-prepare
+ $(NO_TRACE_MAKE) -C target/linux menuconfig
+
+
+package/% target/%: tmp/.packageinfo
+toolchain/% package/% target/%: tmp/.targetinfo
+package/% target/% tools/% toolchain/%: FORCE
+ $(MAKE) -C $(patsubst %/$*,%,$@) $*
+
+
+tmp/.prereq-build: include/prereq-build.mk
+ mkdir -p tmp
+ rm -f tmp/.host.mk
+ $(NO_TRACE_MAKE) -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
+ echo "Prerequisite check failed. Use FORCE=1 to override."; \
+ false; \
+ }
+ touch $@
+
+tmp/.prereq-%: include/prereq.mk tmp/.%info .config
+ mkdir -p tmp
+ rm -f tmp/.host.mk
+ $(NO_TRACE_MAKE) -s -C $* prereq 2>/dev/null || { \
+ echo "Prerequisite check failed. Use FORCE=1 to override."; \
+ false; \
+ }
+ touch $@
+
+prereq: tmp/.prereq-build tmp/.prereq-package tmp/.prereq-target FORCE
+
+download: .config FORCE
+ $(MAKE) tools/download
+ $(MAKE) toolchain/download
+ $(MAKE) package/download
+ $(MAKE) target/download
+
+world: .config FORCE
+ $(MAKE) tools/install
+ $(MAKE) toolchain/install
+ $(MAKE) target/compile
+ $(MAKE) package/compile
+ $(MAKE) package/install
+ $(MAKE) target/install
+ $(MAKE) package/index
+
+clean: FORCE
+ rm -rf build_* bin tmp
+
+dirclean: clean
+ rm -rf staging_dir_* toolchain_build_* tool_build
+
+distclean: dirclean config-clean symlinkclean docclean
+ rm -rf dl
+
+help:
+ cat README
+
+doc:
+ $(MAKE) -C docs/ openwrt.pdf
+
+docclean:
+ $(MAKE) -C docs/ clean
+
+symlinkclean:
+ -find package -type l | xargs rm -f
+ rm -rf tmp
+
+.SILENT: clean dirclean distclean symlinkclean config-clean download world help tmp/.packageinfo tmp/.targetinfo tmpinfo-clean tmp/.config-package.in tmp/.config-target.in .config scripts/config/mconf scripts/config/conf menuconfig tmp/.prereq-build tmp/.prereq-package tmp/.prereq-target
+FORCE: ;
+.PHONY: FORCE help