Merge pull request #114 from xclaesse/prepare-for-meson

Prepare for meson
This commit is contained in:
Tim Rühsen
2018-12-06 16:05:03 +01:00
committed by GitHub
7 changed files with 18 additions and 13 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ po/remove-potcdate.sed
po/stamp-po
src/psl2c
src/suffixes.c
src/suffixes_dafsa.c
src/suffixes_dafsa.h
stamp-h1
test-driver
tests/*.log
+3 -3
View File
@@ -24,8 +24,8 @@ $<
$<
<<
# Make sure we generate suffixes_dafsa.c before trying to compile psl.c
$(CFG)\$(PLAT)\libpsl\psl.obj: $(CFG)\$(PLAT)\libpsl\suffixes_dafsa.c
# Make sure we generate suffixes_dafsa.h before trying to compile psl.c
$(CFG)\$(PLAT)\libpsl\psl.obj: $(CFG)\$(PLAT)\libpsl\suffixes_dafsa.h
# Inference rules for building the test programs
# Used for programs with a single source file.
@@ -104,7 +104,7 @@ clean:
@-del /f /q $(CFG)\$(PLAT)\*.ilk
@-if exist $(CFG)\$(PLAT)\tests del /f /q $(CFG)\$(PLAT)\tests\*.obj
@-del /f /q $(CFG)\$(PLAT)\libpsl\*.obj
@-del /f /q $(CFG)\$(PLAT)\libpsl\suffixes_dafsa.c
@-del /f /q $(CFG)\$(PLAT)\libpsl\suffixes_dafsa.h
@-del /f /q ..\config.h
@-del /f /q vc$(PDBVER)0.pdb
@-rmdir /s /q $(CFG)\$(PLAT)
+1 -1
View File
@@ -9,7 +9,7 @@ $(CFG)\$(PLAT)\psl \
$(CFG)\$(PLAT)\tests:
@-md $@
$(CFG)\$(PLAT)\libpsl\suffixes_dafsa.c: $(CFG)\$(PLAT)\libpsl $(PSL_FILE) ..\src\psl-make-dafsa
$(CFG)\$(PLAT)\libpsl\suffixes_dafsa.h: $(CFG)\$(PLAT)\libpsl $(PSL_FILE) ..\src\psl-make-dafsa
@echo Generating $@
$(PYTHON) ..\src\psl-make-dafsa --output-format=cxx+ "$(PSL_FILE_INPUT)" $@
+4 -4
View File
@@ -1,10 +1,10 @@
include libpsl-srcs.mk
# suffixes.c must be created before psl.c is compiled
BUILT_SOURCES = suffixes_dafsa.c
BUILT_SOURCES = suffixes_dafsa.h
# suffixes.c is a built source that must be cleaned
CLEANFILES = suffixes_dafsa.c
CLEANFILES = suffixes_dafsa.h
lib_LTLIBRARIES = libpsl.la
@@ -18,8 +18,8 @@ libpsl_la_LDFLAGS = -no-undefined -version-info $(LIBPSL_SO_VERSION)
# Build rule for suffix_dafsa.c
# PSL_FILE can be set by ./configure --with-psl-file=[PATH]
suffixes_dafsa.c: $(PSL_FILE) $(srcdir)/psl-make-dafsa
$(srcdir)/psl-make-dafsa --output-format=cxx+ "$(PSL_FILE)" suffixes_dafsa.c
suffixes_dafsa.h: $(PSL_FILE) $(srcdir)/psl-make-dafsa
$(srcdir)/psl-make-dafsa --output-format=cxx+ "$(PSL_FILE)" suffixes_dafsa.h
EXTRA_DIST = psl-make-dafsa LICENSE.chromium
+1 -1
View File
@@ -159,7 +159,7 @@ struct psl_ctx_st {
/* include the PSL data generated by psl-make-dafsa */
#if defined(BUILTIN_GENERATOR_LIBICU) || defined(BUILTIN_GENERATOR_LIBIDN2) || defined(BUILTIN_GENERATOR_LIBIDN)
#include "suffixes_dafsa.c"
#include "suffixes_dafsa.h"
#else
static const unsigned char kDafsa[] = "";
static time_t _psl_file_time = 0;
+6 -1
View File
@@ -1,4 +1,9 @@
DEFS = @DEFS@ -DSRCDIR=\"$(srcdir)\" -DPSL_FILE=\"$(PSL_FILE)\" -DPSL_TESTFILE=\"$(PSL_TESTFILE)\"
DEFS = @DEFS@ \
-DSRCDIR=\"$(srcdir)\" \
-DPSL_FILE=\"$(PSL_FILE)\" \
-DPSL_TESTFILE=\"$(PSL_TESTFILE)\" \
-DPSL_DAFSA=\"psl.dafsa\" \
-DPSL_ASCII_DAFSA=\"psl_ascii.dafsa\"
AM_CPPFLAGS = -I$(top_srcdir)/include
LDADD = ../src/libpsl.la
AM_LDFLAGS = -no-install
+2 -2
View File
@@ -146,12 +146,12 @@ static void test_psl(void)
psl2 = psl_builtin();
printf("builtin PSL has %d suffixes and %d exceptions\n", psl_suffix_count(psl2), psl_suffix_exception_count(psl2));
if (!(psl3 = psl_load_file("psl.dafsa"))) {
if (!(psl3 = psl_load_file(PSL_DAFSA))) {
fprintf(stderr, "Failed to load 'psl.dafsa'\n");
failed++;
}
if (!(psl4 = psl_load_file("psl_ascii.dafsa"))) {
if (!(psl4 = psl_load_file(PSL_ASCII_DAFSA))) {
fprintf(stderr, "Failed to load 'psl_ascii.dafsa'\n");
failed++;
}