mirror of
https://github.com/ascii-boxes/boxes.git
synced 2024-12-04 22:11:07 +01:00
Allow override of LEX and YACC; merge changes from macos-ci branch
This commit is contained in:
parent
3551c4bd57
commit
069197052e
4
.github/workflows/boxes.yml
vendored
4
.github/workflows/boxes.yml
vendored
@ -46,14 +46,14 @@ jobs:
|
||||
file: out/lcov-total.info
|
||||
format: lcov
|
||||
|
||||
build-macos:
|
||||
build-mac:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: add-packages
|
||||
run: |
|
||||
brew install flex bison libunistring pcre2 ncurses diffutils lcov cmocka
|
||||
brew install git flex bison libunistring pcre2 ncurses diffutils lcov cmocka
|
||||
|
||||
- name: make cov
|
||||
run: make cov LEX=/usr/local/opt/flex/bin/flex YACC=/usr/local/opt/bison/bin/bison
|
||||
|
9
Makefile
9
Makefile
@ -23,6 +23,11 @@ DOC_FILES = doc/boxes.1 doc/boxes.el
|
||||
PKG_NAME = boxes-$(BVERSION)
|
||||
OUT_DIR = out
|
||||
|
||||
# Set some defaults for LEX and YACC but allow env
|
||||
# variables to override them.
|
||||
LEX ?= flex
|
||||
YACC ?= bison
|
||||
|
||||
PCRE2_VERSION = 10.40
|
||||
PCRE2_DIR = vendor/pcre2-$(PCRE2_VERSION)
|
||||
LIBUNISTRING_VERSION = 1.0
|
||||
@ -44,7 +49,7 @@ WIN_CMOCKA_DIR = vendor/cmocka-$(WIN_CMOCKA_VERSION)
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
build cov debug: infomsg replaceinfos
|
||||
$(MAKE) -C src BOXES_PLATFORM=unix LEX=flex YACC=bison $@
|
||||
$(MAKE) -C src BOXES_PLATFORM=unix LEX=$(LEX) YACC=$(YACC) $@
|
||||
|
||||
win32: infomsg replaceinfos
|
||||
$(MAKE) -C src BOXES_PLATFORM=win32 C_INCLUDE_PATH=../$(PCRE2_DIR)/src LDFLAGS=-L../$(PCRE2_DIR)/.libs \
|
||||
@ -124,7 +129,7 @@ $(LIBNCURSES_DIR)/lib/libncurses.a: vendor/libncurses-$(LIBNCURSES_VERSION).tar.
|
||||
cd $(LIBNCURSES_DIR) ; ./configure --enable-static ; $(MAKE)
|
||||
|
||||
static: infomsg replaceinfos $(LIBUNISTRING_DIR)/lib/.libs/libunistring.a $(PCRE2_DIR)/.libs/libpcre2-32.a $(LIBNCURSES_DIR)/lib/libncurses.a
|
||||
$(MAKE) -C src BOXES_PLATFORM=static LEX=flex YACC=bison LIBUNISTRING_DIR=$(LIBUNISTRING_DIR) \
|
||||
$(MAKE) -C src BOXES_PLATFORM=static LEX=$(LEX) YACC=$(YACC) LIBUNISTRING_DIR=$(LIBUNISTRING_DIR) \
|
||||
PCRE2_DIR=$(PCRE2_DIR) LIBNCURSES_DIR=$(LIBNCURSES_DIR) LIBNCURSES_WIN_INCLUDE=$(LIBNCURSES_WIN_INCLUDE) $@
|
||||
|
||||
|
||||
|
@ -102,7 +102,7 @@ flags_:
|
||||
exit 1
|
||||
|
||||
parser.c parser.h: parser.y lex.yy.h | check_dir
|
||||
$(YACC) --warnings=all --verbose --defines=parser.h --output=parser.c $<
|
||||
$(YACC) -Wall --verbose --header=parser.h -o parser.c $<
|
||||
|
||||
lex.yy.c lex.yy.h: lexer.l | check_dir
|
||||
$(LEX) --header-file=lex.yy.h $<
|
||||
|
Loading…
Reference in New Issue
Block a user