diff options
author | Rob Landley <rob@landley.net> | 2014-11-28 16:49:46 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-11-28 16:49:46 -0600 |
commit | 62390fddc753e04aa12655d073572f9c39af3874 (patch) | |
tree | a405934c70ce1d1b268723bab3e083a04f2134ba /Makefile | |
parent | e7835d79c5b6c2c586bf13a28c6457b012145a36 (diff) | |
download | toybox-62390fddc753e04aa12655d073572f9c39af3874.tar.gz |
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.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -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* |