aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-08-22 14:34:45 -0500
committerRob Landley <rob@landley.net>2019-08-22 14:34:45 -0500
commit0b3e75699ef2c8a2586d7980cdc736530362475f (patch)
treea3c818158599215b737902dc29b90f35e57910d7 /Makefile
parenta5977aa2e8f2bbbe73d317d4211105f44f7c873e (diff)
downloadtoybox-0b3e75699ef2c8a2586d7980cdc736530362475f.tar.gz
Add scripts/mkroot.sh and makefile changes for "make root".
Not in help text yet. Needs sh and route enabled in pending to do much. todo: work through the scripts/install.sh $PENDING list and add native toolchain support.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 354c9bf9..111f32ed 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ toybox generated/unstripped/toybox: toybox_stuff
.PHONY: clean distclean baseline bloatcheck install install_flat \
uinstall uninstall_flat tests help toybox_stuff change \
- list list_working list_pending
+ list list_working list_pending root run_root
include kconfig/Makefile
-include .singlemake
@@ -60,17 +60,27 @@ uninstall:
change:
scripts/change.sh
-clean::
- @echo cleaning
+noroot_clean:
@rm -rf toybox generated change .singleconfig*
+clean:: noroot_clean
+ @rm -rf root
+ @echo cleaned
+
# If singlemake was in generated/ "make clean; make test_ls" wouldn't work.
distclean: clean
- @echo removing .config
@rm -f toybox_old .config* .singlemake
+ @echo removed .config
tests:
scripts/test.sh
+root:
+ scripts/mkroot.sh $(MAKEFLAGS)
+
+run_root:
+ C=$$(basename "$$CROSS_COMPILE" | sed 's/-.*//'); \
+ cd root/"$${C:-host}" && ./qemu-*.sh || exit 1
+
help::
@cat scripts/help.txt