Commit 07f4dd5
committed
Allow build-type Configure to work with Components
When components were introduced, cabal had support for
build-type: Configure, which allows to run a `configure`
script prior to building the package. Upon the introduction
of components, it became obvious that we can't just
configure each and every component, as this easily runs
into the situation where the `configure` script is run
potentially concurrently for all components.
However, build-type is a global option for cabal files, and
is usually used to produce a <pkg>.buildinfo file. This file
is then used to augment the Main Library only.
This change now tracks whether or not we are building a
component to the setup invocation, and if we do, ignores
a build-type: Configure built-type from the package
description. For end users who want to depend on
package configured values, they will need to set their
sub libraries, executables, ... and other components to
depend on the main library, and import any configured
values from there.
For lib:Cabal, which doesn't know about components
when configure is invoked, we will continue to execute
configure, even though cabal will never use that info.1 parent 40f56dd commit 07f4dd5
File tree
3 files changed
+18
-2
lines changed- cabal-install/src/Distribution/Client
3 files changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1833 | 1833 | | |
1834 | 1834 | | |
1835 | 1835 | | |
1836 | | - | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
1837 | 1840 | | |
1838 | 1841 | | |
1839 | 1842 | | |
| |||
4028 | 4031 | | |
4029 | 4032 | | |
4030 | 4033 | | |
| 4034 | + | |
| 4035 | + | |
| 4036 | + | |
4031 | 4037 | | |
4032 | 4038 | | |
4033 | 4039 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
317 | 323 | | |
318 | 324 | | |
319 | 325 | | |
| |||
338 | 344 | | |
339 | 345 | | |
340 | 346 | | |
| 347 | + | |
341 | 348 | | |
342 | 349 | | |
343 | 350 | | |
| |||
374 | 381 | | |
375 | 382 | | |
376 | 383 | | |
377 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
378 | 387 | | |
379 | 388 | | |
380 | 389 | | |
| |||
0 commit comments