logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/

bootstrap-regen.sh (1098B)


  1. #!/bin/sh
  2. # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. # SPDX-License-Identifier: MPL-2.0
  4. # List of commands used by ./configure
  5. #
  6. # Can be checked with:
  7. # $ strace -o configure.strace -f -e execve ./configure
  8. # $ grep -F -e 'execve(' configure.strace | cut -f2 -d '"' | xargs -n1 basename | sort -u
  9. #commands="cat echo grep printf rm sed test tr"
  10. commands="cat echo printf rm test tr"
  11. targets="$(printf 'cmd/%s ' $commands)"
  12. : ${MAKE:=make}
  13. $MAKE clean
  14. (
  15. printf '#!/bin/sh
  16. # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  17. # SPDX-License-Identifier: MPL-2.0
  18. # Generated using ./bootstrap-regen.sh
  19. : ${CC:=cc}
  20. : ${AR:=ar}
  21. : ${YACC:=yacc}
  22. : ${CFLAGS:=-Os -Wall}
  23. set -ex
  24. : >config.h
  25. '
  26. $MAKE -n \
  27. CC='$$CC' CFLAGS='$$CFLAGS' \
  28. AR='$$AR' ARFLAGS='$$ARFLAGS' \
  29. LDFLAGS='$$LDFLAGS' LDSTATIC='$$LDSTATIC' \
  30. YACC='$$YACC' \
  31. $targets \
  32. | grep -vF -e .c.gcov -e 'make[1]:'
  33. printf "
  34. ./cmd/printf '\\nDone, you should now be able to run PATH=cmd/:\$PATH ./configure && make clean && make\\n'
  35. "
  36. )> bootstrap.sh