commit 9dae250

shrub  ·  2026-04-08 22:44:07 +0000 UTC
parent b15e5de
tests target makefile
5 files changed,  +9, -6
+3, -0
1@@ -19,5 +19,8 @@ $(BIN): $(OBJS)
2 fmt:
3 	clang-format -i $(FMTSRCS)
4 
5+test: $(BIN)
6+	tests/shintest.sh
7+
8 clean:
9 	rm -f $(BIN) $(OBJS)
+3, -3
 1@@ -235,8 +235,8 @@ expandauto(const char *s, const struct Target *t, const char *stem)
 2 	out[len] = 0;
 3 	return out;
 4 }
 5-/* we apply target assignments from the graphstate (gs.tas) to those specific 
 6- * targets, for some target like 
 7+/* we apply target assignments from the graphstate (gs.tas) to those specific
 8+ * targets, for some target like
 9  *
10  * binary : LDFLAGS += -static
11  */
12@@ -298,7 +298,7 @@ addrule(struct GraphState *gs, const char *name, const struct RuleNode *rule)
13 		}
14 	}
15 }
16-/* if the target is a pattern rule, store it in the graphstate 
17+/* if the target is a pattern rule, store it in the graphstate
18  * instead of making a target immediately */
19 static void
20 addpattern(struct GraphState *gs, const struct RuleNode *rule)
+2, -3
 1@@ -44,9 +44,8 @@ parseerr(const struct PreLine *line, const char *msg, const char *detail)
 2 }
 3 
 4 static const char *const unsupported_kws[] = {
 5-	"define", "endef", "override", "export", "unexport",
 6-	"undefine", "vpath", "private", "load", 0
 7-};
 8+    "define", "endef", "override", "export", "unexport",
 9+    "undefine", "vpath", "private", "load", 0};
10 
11 static char *
12 trimdup(const char *s, size_t n)
+0, -0
+1, -0
1@@ -0,0 +1 @@
2+# ninja log v5