08-make 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Build script for make.
  2. #
  3. # Copyright (c) 2014-2017 Matias Fonzo, <selk@dragora.org>.
  4. # Copyright (c) 2020 Matias Fonzo, <selk@dragora.org>.
  5. #
  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
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  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.
  17. version=4.3
  18. cd -- "$TMPDIR"
  19. rm -rf make-${version}
  20. unpack "${worktree}/sources/make-${version}.tar.lz"
  21. # Build instructions
  22. cd make-${version}
  23. # Import and export toolchain variables
  24. . "${worktree}/stages/env.d/cross-staticenv"
  25. ./configure \
  26. AR="$AR" AS="$AS" LD="$LD" RANLIB="$RANLIB" READELF="$READELF" STRIP="$STRIP" \
  27. CC="$BTCC" CXX="$BTCXX" \
  28. CFLAGS="$BTCFLAGS" CXXFLAGS="$BTCXXFLAGS" LDFLAGS="$BTLDFLAGS" \
  29. --prefix=/tools \
  30. --build=$host \
  31. --host=$target \
  32. --disable-nls \
  33. --without-guile
  34. make -j${jobs}
  35. make -j${jobs} install
  36. # Unset some imported variables from file
  37. unset AR AS LD RANLIB READELF STRIP
  38. cleanup()
  39. {
  40. cd -- "$TMPDIR" && rm -rf make-${version}
  41. }