logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

bootstrap-helper.sh (2714B)


  1. #!/bin/sh
  2. # SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
  3. # SPDX-FileCopyrightText: 2010-2019, 2021 Bootstrap Authors
  4. # SPDX-FileCopyrightText: 2010-2019, 2021-2022 Free Software Foundation, Inc.
  5. #
  6. # SPDX-License-Identifier: GPL-2.0-or-later
  7. EXIT_FALURE=1
  8. #######################################
  9. # Extracted from the output of: #
  10. # ./bootstrap --verbose --force #
  11. #######################################
  12. MAKE='make'
  13. SED='/usr/bin/sed'
  14. build_aux='build-aux'
  15. ltdl_dir='libltdl'
  16. macro_dir='m4'
  17. package_name='GNU Libtool'
  18. package='libtool'
  19. package_bugreport='bug-libtool@gnu.org'
  20. package_url='http://www.gnu.org/s/libtool/'
  21. package_version='2.4.7'
  22. #############################
  23. # Inspired by "bootstrap" #
  24. #############################
  25. func_show_eval ()
  26. {
  27. eval "$1"
  28. _G_status=$?
  29. if test 0 -ne "$_G_status"; then
  30. exit $_G_status
  31. fi
  32. }
  33. ##################################
  34. # Copied from "bootstrap.conf" #
  35. ##################################
  36. # libtool_build_prerequisites
  37. # ---------------------------
  38. # Libtool generates some files that are required before any autotools
  39. # can be run successfully.
  40. libtool_build_prerequisites ()
  41. {
  42. $debug_cmd
  43. $require_build_aux
  44. $require_ltdl_dir
  45. $require_macro_dir
  46. $require_package
  47. $require_package_bugreport
  48. $require_package_name
  49. $require_package_url
  50. $require_package_version
  51. # Whip up a dirty Makefile:
  52. makes='Makefile.am libltdl/ltdl.mk'
  53. rm -f Makefile
  54. {
  55. echo "aux_dir = $build_aux"
  56. echo "ltdl_dir = $ltdl_dir"
  57. echo "macro_dir = $macro_dir"
  58. # The following allow us to tie bootstrap-deps output verbosity
  59. # into the bootstrap --verbose option:
  60. echo 'AM_V_GEN = $(am__v_GEN_$(V))'
  61. echo 'am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))'
  62. echo 'am__v_GEN_0 = @echo " GEN " $@;'
  63. echo 'AM_V_at = $(am__v_at_$(V))'
  64. echo 'am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))'
  65. echo 'am__v_at_0 = @'
  66. $SED '/^if /,/^endif$/d;/^else$/,/^endif$/d;/^include /d' $makes
  67. } > Makefile
  68. # Building distributed files from configure is bad for automake, so we
  69. # generate them here, and have Makefile rules to keep them up to date.
  70. func_show_eval "$MAKE V=1 bootstrap-deps \
  71. AM_DEFAULT_VERBOSITY=0 `$opt_verbose && echo V=1` \
  72. PACKAGE='$package' PACKAGE_BUGREPORT='$package_bugreport' \
  73. PACKAGE_NAME='$package_name' PACKAGE_URL='$package_url' \
  74. SED='$SED' srcdir=. VERSION='$package_version'"
  75. status=$?
  76. rm -f Makefile
  77. test 0 -eq "$status" ||exit $EXIT_FAILURE
  78. }
  79. ###################
  80. # Run functions #
  81. ###################
  82. libtool_build_prerequisites