Skip to content

Commit 5c5c43a

Browse files
committed
Format shell commands
1 parent 3aafdae commit 5c5c43a

1 file changed

Lines changed: 45 additions & 10 deletions

File tree

Makefile

Lines changed: 45 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,52 @@ EXAMPLES_FILTER ?= .*/.*
101101
# On Mac OSX, in order to use `|` and other regular expression operators, we need to use enhanced regular expression syntax (-E); see https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man7/re_format.7.html#//apple_ref/doc/man/7/re_format.
102102

103103
ifeq ($(KERNEL), Darwin)
104-
SOURCES ?= $(shell find -E $(SOURCE_DIR) -name '*.js' -regex "$(SOURCES_FILTER)" -not -name 'test*.js' -not -path './node_modules/*' -not -path "**/$(EXAMPLES_DIR)/*" -not -path "$(REPORTS_DIR)/*")
105-
106-
TESTS ?= $(shell find -E $(SOURCE_DIR) -name 'test*.js' -regex "$(TESTS_FILTER)" -not -path "$(NODE_MODULES)/*")
107-
108-
EXAMPLES ?= $(shell find -E $(SOURCE_DIR) -name '*.js' -path "$(SOURCE_DIR)/**/$(EXAMPLES_DIR)/**" -regex "$(EXAMPLES_FILTER)" -not -path "$(NODE_MODULES)/*")
104+
SOURCES ?= $(shell find -E $(SOURCE_DIR) \
105+
-name '*.js' \
106+
-regex "$(SOURCES_FILTER)" \
107+
-not -name 'test*.js' \
108+
-not -path './node_modules/*' \
109+
-not -path "**/$(EXAMPLES_DIR)/*" \
110+
-not -path "$(REPORTS_DIR)/*" \
111+
)
112+
113+
TESTS ?= $(shell find -E $(SOURCE_DIR) \
114+
-name 'test*.js' \
115+
-regex "$(TESTS_FILTER)" \
116+
-not -path "$(NODE_MODULES)/*" \
117+
)
118+
119+
EXAMPLES ?= $(shell find -E $(SOURCE_DIR) \
120+
-name '*.js' \
121+
-path "$(SOURCE_DIR)/**/$(EXAMPLES_DIR)/**" \
122+
-regex "$(EXAMPLES_FILTER)" \
123+
-not -path "$(NODE_MODULES)/*" \
124+
)
109125
else
110-
SOURCES ?= $(shell find $(SOURCE_DIR) -name '*.js' -regextype posix-extended -regex "$(SOURCES_FILTER)" -not -name 'test*.js' -not -path './node_modules/*' -not -path "**/$(EXAMPLES_DIR)/*" -not -path "$(REPORTS_DIR)/*")
111-
112-
TESTS ?= $(shell find $(SOURCE_DIR) -name 'test*.js' -regextype posix-extended -regex "$(TESTS_FILTER)" -not -path "$(NODE_MODULES)/*")
113-
114-
EXAMPLES ?= $(shell find $(SOURCE_DIR) -name '*.js' -path "$(SOURCE_DIR)/**/$(EXAMPLES_DIR)/**" -regextype posix-extended -regex "$(EXAMPLES_FILTER)" -not -path "$(NODE_MODULES)/*")
126+
SOURCES ?= $(shell find $(SOURCE_DIR) \
127+
-name '*.js' \
128+
-regextype posix-extended \
129+
-regex "$(SOURCES_FILTER)" \
130+
-not -name 'test*.js' \
131+
-not -path './node_modules/*' \
132+
-not -path "**/$(EXAMPLES_DIR)/*" \
133+
-not -path "$(REPORTS_DIR)/*" \
134+
)
135+
136+
TESTS ?= $(shell find $(SOURCE_DIR) \
137+
-name 'test*.js' \
138+
-regextype posix-extended \
139+
-regex "$(TESTS_FILTER)" \
140+
-not -path "$(NODE_MODULES)/*" \
141+
)
142+
143+
EXAMPLES ?= $(shell find $(SOURCE_DIR) \
144+
-name '*.js' \
145+
-path "$(SOURCE_DIR)/**/$(EXAMPLES_DIR)/**" \
146+
-regextype posix-extended \
147+
-regex "$(EXAMPLES_FILTER)" \
148+
-not -path "$(NODE_MODULES)/*" \
149+
)
115150
endif
116151

117152

0 commit comments

Comments
 (0)