bootstrap-regen.sh (1098B)
- #!/bin/sh
- # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- # SPDX-License-Identifier: MPL-2.0
- # List of commands used by ./configure
- #
- # Can be checked with:
- # $ strace -o configure.strace -f -e execve ./configure
- # $ grep -F -e 'execve(' configure.strace | cut -f2 -d '"' | xargs -n1 basename | sort -u
- #commands="cat echo grep printf rm sed test tr"
- commands="cat echo printf rm test tr"
- targets="$(printf 'cmd/%s ' $commands)"
- : ${MAKE:=make}
- $MAKE clean
- (
- printf '#!/bin/sh
- # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- # SPDX-License-Identifier: MPL-2.0
- # Generated using ./bootstrap-regen.sh
- : ${CC:=cc}
- : ${AR:=ar}
- : ${YACC:=yacc}
- : ${CFLAGS:=-Os -Wall}
- set -ex
- : >config.h
- '
- $MAKE -n \
- CC='$$CC' CFLAGS='$$CFLAGS' \
- AR='$$AR' ARFLAGS='$$ARFLAGS' \
- LDFLAGS='$$LDFLAGS' LDSTATIC='$$LDSTATIC' \
- YACC='$$YACC' \
- $targets \
- | grep -vF -e .c.gcov -e 'make[1]:'
- printf "
- ./cmd/printf '\\nDone, you should now be able to run PATH=cmd/:\$PATH ./configure && make clean && make\\n'
- "
- )> bootstrap.sh