Skip to content

Commit ffc297f

Browse files
wtarreaupaulmckrcu
authored andcommitted
selftests/nolibc: add a "help" target
It presents the supported targets, and becomes the default target to save the user from having to read the makefile. The "all" target was placed after it and now points to "run" to do everything since it's no longer the default one. Signed-off-by: Willy Tarreau <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent b25c528 commit ffc297f

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

tools/testing/selftests/nolibc/Makefile

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,32 @@ endif
6565
CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables
6666
LDFLAGS := -s
6767

68-
all: nolibc-test
68+
help:
69+
@echo "Supported targets under selftests/nolibc:"
70+
@echo " all call the \"run\" target below"
71+
@echo " help this help"
72+
@echo " sysroot create the nolibc sysroot here (uses \$$ARCH)"
73+
@echo " nolibc-test build the executable (uses \$$CC and \$$CROSS_COMPILE)"
74+
@echo " initramfs prepare the initramfs with nolibc-test"
75+
@echo " defconfig create a fresh new default config (uses \$$ARCH)"
76+
@echo " kernel (re)build the kernel with the initramfs (uses \$$ARCH)"
77+
@echo " run runs the kernel in QEMU after building it (uses \$$ARCH, \$$TEST)"
78+
@echo " rerun runs a previously prebuilt kernel in QEMU (uses \$$ARCH, \$$TEST)"
79+
@echo " clean clean the sysroot, initramfs, build and output files"
80+
@echo ""
81+
@echo "The output file is \"run.out\". Test ranges may be passed using \$$TEST."
82+
@echo ""
83+
@echo "Currently using the following variables:"
84+
@echo " ARCH = $(ARCH)"
85+
@echo " CROSS_COMPILE = $(CROSS_COMPILE)"
86+
@echo " CC = $(CC)"
87+
@echo " OUTPUT = $(OUTPUT)"
88+
@echo " TEST = $(TEST)"
89+
@echo " QEMU_ARCH = $(if $(QEMU_ARCH),$(QEMU_ARCH),UNKNOWN_ARCH) [determined from \$$ARCH]"
90+
@echo " IMAGE_NAME = $(if $(IMAGE_NAME),$(IMAGE_NAME),UNKNOWN_ARCH) [determined from \$$ARCH]"
91+
@echo ""
92+
93+
all: run
6994

7095
sysroot: sysroot/$(ARCH)/include
7196

0 commit comments

Comments
 (0)