@@ -74,6 +74,12 @@ project-level configuration file (`stack.yaml`, by default).
74
74
` stack build ` takes a list of one or more optional * targets* to be built. The
75
75
supported syntaxes for targets are as follows:
76
76
77
+ * no targets specified
78
+ * * package*
79
+ * * package identifier*
80
+ * project package * component*
81
+ * * local directory*
82
+
77
83
### No targets specified
78
84
79
85
Example: ` stack build `
@@ -149,6 +155,7 @@ unknown.
149
155
### Target: project package * component*
150
156
151
157
Examples:
158
+
152
159
* ` stack build my-package:lib `
153
160
* ` stack build my-package:exe:my-executable `
154
161
* ` stack build my-package:test:my-test-suite `
@@ -186,6 +193,7 @@ For further information about available targets, see the
186
193
### Target: * local directory*
187
194
188
195
Examples:
196
+
189
197
* ` stack build foo/bar `
190
198
* ` stack build ./foo `
191
199
* ` stack build . `
@@ -194,17 +202,15 @@ Stack will find all project packages that exist in the given directory hierarchy
194
202
and then follow the same procedure as passing in package names as mentioned
195
203
above.
196
204
205
+ ` stack build . ` will target project packages in the current working directory or
206
+ its subdirectories.
207
+
197
208
!!! note
198
209
199
- If the directory name is parsed as one of the above target types, it will
210
+ If the directory name is parsed as one of the other target types, it will
200
211
be treated as that. Explicitly starting the target with `./` can avoid that.
201
212
For example, `stack build ./foo`.
202
213
203
- !!! note
204
-
205
- `stack build .` will target project packages in the current working
206
- directory or its subdirectories.
207
-
208
214
## Controlling what gets built
209
215
210
216
Stack will automatically build the necessary dependencies. See the introductory
0 commit comments