aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--make.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/make.c b/make.c
index 5e0e0ff..981ffed 100644
--- a/make.c
+++ b/make.c
@@ -61,7 +61,10 @@ main(int argc, char **argv)
while ((opt = getopt(argc, argv, "fj:r")) != -1) {
switch (opt) {
case '?':
- fprintf(stderr, "Usage: %s [-j procs] [-fr]\n", *argv);
+ fprintf(stderr,
+ "Usage: %s [-j procs] [-fr]\n"
+ " %s clean | gen | test\n",
+ *argv, *argv);
exit(EXIT_FAILURE);
case 'j':
procs = atoi(optarg);
@@ -83,7 +86,9 @@ main(int argc, char **argv)
cmdadd(&c, "find", "gen", "-mindepth", "2", "-type", "f",
"-executable", "-not", "(", "-name", "scale", "-or", "-name",
"bool-props.py", ")", "-exec", "{}", ";");
- } else
+ } else if (streq(*argv, "test"))
+ cmdadd(&c, "./test/run-tests");
+ else
diex("invalid subcommand ā€” ā€˜%sā€™", *argv);
cmdput(c);
CMDRC(c);