qi: Bump to release 2.12
[dragora.git] / stages / 1 / 08-make
blobdb91d5687df07b968a67ef93a4c6d8852af02335
1 # Build script for make.
3 # Copyright (c) 2014-2017 Matias Fonzo, <selk@dragora.org>.
4 # Copyright (c) 2020, 2022-2023 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 #    http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 version=4.4.1
20 cd -- "$TMPDIR"
21 rm -rf make-${version}
22 unpack "${worktree}/sources/make-${version}.tar.lz"
24 # Build instructions
25 cd make-${version}
27 # Import and export toolchain variables
28 . "${worktree}/stages/env.d/cross-staticenv"
30 ./configure \
31 AR="$AR" AS="$AS" LD="$LD" RANLIB="$RANLIB" READELF="$READELF" STRIP="$STRIP" \
32 CC="$BTCC" CXX="$BTCXX" \
33 CFLAGS="$BTCFLAGS" CXXFLAGS="$BTCXXFLAGS" LDFLAGS="$BTLDFLAGS" \
34  --prefix=/tools \
35  --build=$host \
36  --host=$target \
37  --disable-nls \
38  --without-guile
40 make -j${jobs}
41 make -j${jobs} install
43 # Unset some imported variables from file
44 unset AR AS LD RANLIB READELF STRIP
46 cleanup()
48     cd -- "$TMPDIR" && rm -rf make-${version}