logo

utils-std

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

bootstrap-regen.sh (984B)


  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 clean
  13. (
  14. printf '#!/bin/sh
  15. # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  16. # SPDX-License-Identifier: MPL-2.0
  17. # Generated using ./bootstrap-regen.sh
  18. : ${CC:=cc}
  19. : ${YACC:=yacc}
  20. : ${CFLAGS:=-Os -Wall}
  21. set -ex
  22. '
  23. make -n CC='$$CC' CFLAGS='$$CFLAGS' LDFLAGS='$$LDFLAGS' LDSTATIC='$$LDSTATIC' YACC='$$YACC' $targets | grep -vF .c.gcov
  24. printf "
  25. ./cmd/printf '\\nDone, you should now be able to run PATH=cmd/:\$PATH ./configure && make clean && make\\n'
  26. "
  27. )> bootstrap.sh