aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2019-09-30 16:04:52 -0400
committerDJ Delorie <dj@redhat.com>2019-10-18 15:46:04 -0400
commit2ac579f9c25388a7734948d77b03e4dd10f35334 (patch)
tree14cfb3f0d1139ed12fe8124769fe357e015aad60 /Makefile
parentUpdate sysvipc kernel-features.h files for Linux 5.1 (diff)
downloadglibc-2ac579f9c25388a7734948d77b03e4dd10f35334.tar.gz
glibc-2ac579f9c25388a7734948d77b03e4dd10f35334.tar.bz2
glibc-2ac579f9c25388a7734948d77b03e4dd10f35334.zip
Add run-one-test convenience target and makefile help text
Adds "make test" for re-running just one test. Also adds "make help" for help with our Makefile targets, and adds a mini-help when you just run "make". Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 20 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a736c3afcc..d7e4be9e10 100644
--- a/Makefile
+++ b/Makefile
@@ -26,8 +26,17 @@ include Makeconfig
# This is the default target; it makes everything except the tests.
-.PHONY: all
-all: lib others
+.PHONY: all help minihelp
+all: minihelp lib others
+
+help:
+ @sed '0,/^help-starts-here$$/d' Makefile.help
+
+minihelp:
+ @echo
+ @echo type \"make help\" for help with common glibc makefile targets
+ @echo
+
ifneq ($(AUTOCONF),no)
@@ -669,3 +678,12 @@ FORCE:
iconvdata/% localedata/% po/%: FORCE
$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
+
+# Convenience target to rerun one test, from the top of the build tree
+# Example: make test t=wcsmbs/test-wcsnlen
+.PHONY: test
+test :
+ @-rm -f $(objpfx)$t.out
+ $(MAKE) subdir=$(dir $t) -C $(dir $t) ..=../ $(objpfx)$t.out
+ @cat $(objpfx)$t.test-result
+ @cat $(objpfx)$t.out