do not edit — generated by btf.
git.druid.rocksindexdruid520portsports/build-tools/flex/add.sh

ports/build-tools/flex/add.sh


set -e
 
# a release tarball, not a git checkout: flex's own parse.c/scan.c need
# bison/flex (respectively) to regenerate from their .y/.l sources - a
# genuine circular dependency with gnu-bison (which itself needs flex),
# that a git checkout of either project hits head-on. release tarballs
# ship the pre-generated .c files (and a pre-generated ./configure) for
# exactly this reason - the same way every real distro's own flex
# package is built, not from a git checkout.
curl -fLO https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz
tar xzf flex-2.6.4.tar.gz
cd flex-2.6.4
# CC_FOR_BUILD/CFLAGS_FOR_BUILD/CPPFLAGS_FOR_BUILD: flex's own configure
# does a SEPARATE "build compiler" check (its own cross-compilation
# support, for a code-generator tool meant to run on the build machine
# specifically) using bare gcc with none of the -I flags CC/CFLAGS above
# already carry - same class of gap as gcc's own CFLAGS_FOR_BUILD for
# its build-machine libiberty copy. left unset, it can't even find
# <stdio.h>, and autoconf reports that as "cannot run C compiled
# programs" (a cross-compilation failure) rather than a missing header.
./configure CC="${CC:-cc}" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
	CC_FOR_BUILD="${CC:-cc}" CFLAGS_FOR_BUILD="$CFLAGS" CPPFLAGS_FOR_BUILD="$CPPFLAGS" \
	--prefix=$MP_PREFIX
make
make install
make clean || true
powered by btf.