kiss-mfavila-large/ports/official/core/flex/build

20 lines
609 B
Bash
Executable File

#!/bin/sh -e
./configure \
--prefix=/usr \
ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_realloc_0_nonnull=yes
make
# We need to work around flex's makefile not working with static directives.
obj=flex-"buf.o flex-ccl.o flex-dfa.o flex-ecs.o flex-filter.o flex-gen.o flex-main.o flex-misc.o flex-nfa.o flex-options.o flex-parse.o flex-regex.o flex-scanflags.o flex-scanopt.o flex-skel.o flex-sym.o flex-tables.o flex-tables_shared.o flex-tblcmp.o flex-yylex.o flex-stage1scan.o"
cd src/
$CC $CFLAGS $LDFLAGS -o flex $obj -lintl -lm
cd ..
make DESTDIR="$1" install
ln -s flex "$1/usr/bin/lex"