Skip to content

Commit 321652e

Browse files
authored
feat: pipelines: autoconf: Add targets input for make and make-install (chainguard-dev#2573)
Allow overriding the `Makefile` target used for build and/or install. This supports multiple space-separated options. You can of course just call the pipeline multiple times instead, but giving `make` multiple targets at once allows more parallelism. Signed-off-by: dann frazier <[email protected]>
1 parent 7fb1d6a commit 321652e

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

pkg/build/pipelines/autoconf/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Run autoconf make install
2929
| ---- | -------- | ----------- | ------- |
3030
| dir | false | The directory containing the Makefile. | . |
3131
| opts | false | Options to pass to the make command. | |
32+
| targets | false | Makefile install targets, space-separated. | install |
3233

3334
## autoconf/make
3435

@@ -40,6 +41,7 @@ Run autoconf make
4041
| ---- | -------- | ----------- | ------- |
4142
| dir | false | The directory containing the Makefile. | . |
4243
| opts | false | Options to pass to the make command. | |
44+
| targets | false | Makefile targets to build, space-separated. | |
4345

4446

4547
<!-- end:pipeline-reference-gen -->

pkg/build/pipelines/autoconf/make-install.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@ inputs:
1111
Options to pass to the make command.
1212
default: ''
1313

14+
targets:
15+
description: |
16+
Makefile install targets, space-separated.
17+
default: "install"
18+
1419
needs:
1520
packages:
1621
- make
1722

1823
pipeline:
1924
- runs: |
20-
make -C "${{inputs.dir}}" install DESTDIR="${{targets.contextdir}}" V=1 ${{inputs.opts}}
25+
make -C "${{inputs.dir}}" ${{inputs.targets}} DESTDIR="${{targets.contextdir}}" V=1 ${{inputs.opts}}
2126
2227
# Delete all GNU libtool metadata files. These things are the bane of a
2328
# packager's existence: they contain useless metadata, cause overlinking and

pkg/build/pipelines/autoconf/make.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@ inputs:
1111
Options to pass to the make command.
1212
default: ''
1313

14+
targets:
15+
description: |
16+
Makefile targets to build, space-separated.
17+
default: ''
18+
1419
needs:
1520
packages:
1621
- make
1722

1823
pipeline:
1924
- runs: |
20-
make -C "${{inputs.dir}}" -j$(nproc) V=1 ${{inputs.opts}}
25+
make -C "${{inputs.dir}}" -j$(nproc) V=1 ${{inputs.opts}} ${{inputs.targets}}

0 commit comments

Comments
 (0)