[build] Defining LIBPOSTAL_DATA_DIR at compile time, not configure

This commit is contained in:
Al
2016-01-30 02:18:04 -05:00
parent 45607e659e
commit 9b3296914a
3 changed files with 4 additions and 8 deletions

View File

@@ -59,8 +59,4 @@ AC_CHECK_PROG([FOUND_SHUF], [shuf], [yes])
AS_IF([test "x$FOUND_SHUF" = xyes], [AC_DEFINE([HAVE_SHUF], [1], [shuf available])])
LIBPOSTAL_DATA_DIR=$datadir/libpostal
AC_DEFINE_UNQUOTED([LIBPOSTAL_DATA_DIR], ["$LIBPOSTAL_DATA_DIR"], [Data directory for libpostsal])
AC_SUBST(LIBPOSTAL_DATA_DIR)
AC_OUTPUT

View File

@@ -1,6 +1,6 @@
SUBDIRS = sparkey
CFLAGS_BASE = -Wfloat-equal -Wpointer-arith
CFLAGS_BASE = -Wfloat-equal -Wpointer-arith -DLIBPOSTAL_DATA_DIR='"$(datadir)/libpostal"'
CFLAGS_O0 = $(CFLAGS_BASE) -O0
CFLAGS_O1 = $(CFLAGS_BASE) -O1
CFLAGS_O2 = $(CFLAGS_BASE) -O2
@@ -60,9 +60,9 @@ language_classifier_test_CFLAGS = $(CFLAGS_O3)
pkginclude_HEADERS = libpostal.h
all-local:
./libpostal_data download all @LIBPOSTAL_DATA_DIR@
./libpostal_data download all $(datadir)/libpostal
lexer: scanner.re
re2c -F -s -b -8 -o scanner.c scanner.re
.PHONY: lexer download_geodb
.PHONY: lexer

View File

@@ -1,4 +1,4 @@
CFLAGS_BASE = -Wfloat-equal -Wpointer-arith -std=gnu99
CFLAGS_BASE = -Wfloat-equal -Wpointer-arith -std=gnu99 -DLIBPOSTAL_DATA_DIR='"$(datadir)/libpostal"'
CFLAGS_O0 = $(CFLAGS_BASE) -O0
CFLAGS_O1 = $(CFLAGS_BASE) -O1
CFLAGS_O2 = $(CFLAGS_BASE) -O2