From 62390fddc753e04aa12655d073572f9c39af3874 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 28 Nov 2014 16:49:46 -0600 Subject: Add "make change" target to build the big toybox binary as a bunch of little ones (in the "change" subdirectory), and tweak scripts/make.sh to avoid redundant work when rebuilding. --- Makefile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ad3aaf92..20dfee41 100644 --- a/Makefile +++ b/Makefile @@ -4,14 +4,18 @@ all: toybox KCONFIG_CONFIG ?= .config -toybox toybox_unstripped: $(KCONFIG_CONFIG) *.[ch] lib/*.[ch] toys/*.h toys/*/*.c scripts/*.sh + +toybox_stuff: $(KCONFIG_CONFIG) *.[ch] lib/*.[ch] toys/*.h toys/*/*.c scripts/*.sh + +toybox toybox_unstripped: toybox_stuff scripts/make.sh .PHONY: clean distclean baseline bloatcheck install install_flat \ - uinstall uninstall_flat test tests help + uinstall uninstall_flat test tests help toybox_stuff include kconfig/Makefile +$(KCONFIG_CONFIG): $(KCONFIG_TOP) $(KCONFIG_TOP): generated/Config.in generated/Config.in: toys/*/*.c scripts/genconfig.sh scripts/genconfig.sh @@ -25,7 +29,8 @@ baseline: toybox_unstripped bloatcheck: toybox_old toybox_unstripped @scripts/bloatcheck toybox_old toybox_unstripped -generated/instlist: toybox +generated/instlist: toybox_stuff + NOBUILD=1 scripts/make.sh $(HOSTCC) -I . scripts/install.c -o generated/instlist install_flat: generated/instlist @@ -40,6 +45,14 @@ uninstall_flat: generated/instlist uninstall: scripts/install.sh --long --uninstall +change: generated/instlist + export PREFIX=$${PREFIX:-change/} && \ + mkdir -p "$$PREFIX" && \ + for i in $$(generated/instlist); \ + do echo make $$i && \ + scripts/single.sh $$i || touch $$PREFIX/$${i}.bad; \ + done + clean:: rm -rf toybox toybox_unstripped generated .singleconfig* -- cgit v1.2.3