Skip to content

Commit 8566330

Browse files
committed
Add recipe for explicitly specifying a file list
1 parent 8948ab0 commit 8566330

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tools/make/lib/examples/Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# This target runs a list of examples in sequential order. Note that we assume the examples can be run using Node.js.
77

88
examples: $(NODE_MODULES)
9-
$(QUIET) for file in $(EXAMPLES); do \
9+
$(QUIET) $(FIND_EXAMPLES_CMD) | grep '^\/' | while read -r file; do \
1010
echo ""; \
1111
echo "Running example: $$file"; \
1212
NODE_ENV=$(NODE_ENV_EXAMPLES) \
@@ -15,3 +15,19 @@ examples: $(NODE_MODULES)
1515
done
1616

1717
.PHONY: examples
18+
19+
20+
# Run examples.
21+
#
22+
# This target runs a specified list of examples in sequential order. Note that we assume the examples can be run using Node.js.
23+
24+
examples-files: $(NODE_MODULES)
25+
$(QUIET) for file in $(FILES); do \
26+
echo ""; \
27+
echo "Running example: $$file"; \
28+
NODE_ENV=$(NODE_ENV_EXAMPLES) \
29+
NODE_PATH=$(NODE_PATH_EXAMPLES) \
30+
$(NODE) $$file || exit 1; \
31+
done
32+
33+
.PHONY: examples-files

0 commit comments

Comments
 (0)