-
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathautotools.yaml
More file actions
130 lines (117 loc) · 5.34 KB
/
autotools.yaml
File metadata and controls
130 lines (117 loc) · 5.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0
actions:
# We default to using CONFIG_SHELL==SHELL=/usr/bin/dash because our tests show that it is around
# +20% faster than bash on startup, which matters on large configure runs with hundreds of tests.
#
# To use bash instead of dash, use the bash-specific *_with_bash version of the relevant macro action.
- autogen:
description: Run autogen.sh script with dash, attempting to only run ./configure once
command: |
NOCONFIGURE="noconfigure"; export NOCONFIGURE
# Often defaults to /bin/sh
CONFIG_SHELL=/usr/bin/dash; export CONFIG_SHELL
SHELL=/usr/bin/dash; export SHELL
/usr/bin/dash ./autogen.sh
echo "Configured to use '$(head -n1 ./configure)' to execute ./configure"
%configure
dependencies:
- binary(autoconf)
- binary(automake)
- binary(autopoint)
- autogen_with_bash:
description: Run autogen.sh script with GNU Bash, attempting to only run ./configure once
command: |
NOCONFIGURE="noconfigure"; export NOCONFIGURE
CONFIG_SHELL=/usr/bin/bash; export CONFIG_SHELL
SHELL=/usr/bin/bash; export SHELL
/usr/bin/bash ./autogen.sh
echo "Configured to use '$(head -n1 ./configure)' to execute ./configure"
%configure_with_bash
dependencies:
- binary(autoconf)
- binary(automake)
- binary(autopoint)
- configure:
description: |
Perform ./configure with the default options using the dash shell.
In our testing, dash has been shown to be +20% faster to start up than bash on average.
command: |
test -x ./configure || ( echo "%%configure: The ./configure script could not be found" ; exit 1 )
# Rewrite any '#!*/bin/sh' shebang to '#!/usr/bin/dash' instead
# '-E' means "Use Extended Regular Expressions" (easier to write and read)
CONFIG_SHELL=/usr/bin/dash; export CONFIG_SHELL
SHELL=/usr/bin/dash; export SHELL
echo "Explicitly using dash to execute ./configure"
/usr/bin/dash ./configure %(options_configure)
dependencies:
- binary(autoconf)
- binary(automake)
- configure_with_bash:
description: Perform ./configure with default options using the GNU Bash shell.
command: |
test -x ./configure || ( echo "%%configure: The ./configure script could not be found" ; exit 1 )
CONFIG_SHELL=/usr/bin/bash; export CONFIG_SHELL
SHELL=/usr/bin/bash; export SHELL
echo "Explicitly using GNU Bash to execute ./configure"
/usr/bin/bash ./configure %(options_configure)
dependencies:
- binary(autoconf)
- binary(automake)
- make:
description: |
Perform a `make` to build the current Makefile.
Tip: Add V=1 VERBOSE=1 after `%%make` in the recipe if you need a more verbose build.
command: |
make -j "%(jobs)"
dependencies:
- binary(make)
- make_install:
description: Use make to install the results of a build to the destination directory
Tip: If a make install operation falls over with parallel builds, try `%%make_install -j1` instead.
command: |
%make install DESTDIR="%(installroot)"
dependencies:
- binary(make)
- reconfigure:
description: Re autotools-configure a project without an autogen.sh script using dash
command: |
# The autoreconf perl script defaults to /bin/sh if SHELL is not set
CONFIG_SHELL=/usr/bin/dash; export CONFIG_SHELL
SHELL=/usr/bin/dash; export SHELL
autoreconf -vfi || ( echo "%%reconfigure: Failed to run autoreconf" ; exit 1 )
echo "Configured to use '$(head -n1 ./configure)' to execute ./configure"
%configure
dependencies:
- binary(autoconf)
- binary(automake)
- binary(autopoint)
- reconfigure_with_bash:
description: Re autotools-configure a project without an autogen.sh script using GNU Bash
command: |
# The autoreconf perl script defaults to /bin/sh if SHELL is not set
CONFIG_SHELL=/usr/bin/bash; export CONFIG_SHELL
SHELL=/usr/bin/bash; export SHELL
autoreconf -vfi || ( echo "%%reconfigure: Failed to run autoreconf" ; exit 1 )
echo "Configured to use '$(head -n1 ./configure)' to execute ./configure"
%configure_with_bash
dependencies:
- binary(autoconf)
- binary(automake)
- binary(autopoint)
definitions:
# Default configuration options as passed to configure
- options_configure: |
--prefix="%(prefix)" \
--bindir="%(bindir)" \
--sbindir="%(sbindir)" \
--build="%(build_platform)" \
--host="%(host_platform)" \
--libdir="%(libdir)" \
--mandir="%(mandir)" \
--infodir="%(infodir)" \
--datadir="%(datadir)" \
--sysconfdir="%(sysconfdir)" \
--localstatedir="%(localstatedir)" \
--sharedstatedir="%(sharedstatedir)" \
--libexecdir="%(libexecdir)"