Rename suffixes_dafsa.c to suffixes_dafsa.h

It is a generated file that we #include, so it makes more sense to have
.h extension. Also Meson tries to compile that file if it has .c
extension.
This commit is contained in:
Xavier Claessens 2018-12-06 09:08:00 -05:00
parent 808dbaf1f1
commit 1653897a49
5 changed files with 10 additions and 10 deletions

2
.gitignore vendored
View File

@ -79,7 +79,7 @@ po/remove-potcdate.sed
po/stamp-po po/stamp-po
src/psl2c src/psl2c
src/suffixes.c src/suffixes.c
src/suffixes_dafsa.c src/suffixes_dafsa.h
stamp-h1 stamp-h1
test-driver test-driver
tests/*.log tests/*.log

View File

@ -24,8 +24,8 @@ $<
$< $<
<< <<
# Make sure we generate suffixes_dafsa.c before trying to compile psl.c # Make sure we generate suffixes_dafsa.h before trying to compile psl.c
$(CFG)\$(PLAT)\libpsl\psl.obj: $(CFG)\$(PLAT)\libpsl\suffixes_dafsa.c $(CFG)\$(PLAT)\libpsl\psl.obj: $(CFG)\$(PLAT)\libpsl\suffixes_dafsa.h
# Inference rules for building the test programs # Inference rules for building the test programs
# Used for programs with a single source file. # Used for programs with a single source file.
@ -104,7 +104,7 @@ clean:
@-del /f /q $(CFG)\$(PLAT)\*.ilk @-del /f /q $(CFG)\$(PLAT)\*.ilk
@-if exist $(CFG)\$(PLAT)\tests del /f /q $(CFG)\$(PLAT)\tests\*.obj @-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\*.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 ..\config.h
@-del /f /q vc$(PDBVER)0.pdb @-del /f /q vc$(PDBVER)0.pdb
@-rmdir /s /q $(CFG)\$(PLAT) @-rmdir /s /q $(CFG)\$(PLAT)

View File

@ -9,7 +9,7 @@ $(CFG)\$(PLAT)\psl \
$(CFG)\$(PLAT)\tests: $(CFG)\$(PLAT)\tests:
@-md $@ @-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 $@ @echo Generating $@
$(PYTHON) ..\src\psl-make-dafsa --output-format=cxx+ "$(PSL_FILE_INPUT)" $@ $(PYTHON) ..\src\psl-make-dafsa --output-format=cxx+ "$(PSL_FILE_INPUT)" $@

View File

@ -1,10 +1,10 @@
include libpsl-srcs.mk include libpsl-srcs.mk
# suffixes.c must be created before psl.c is compiled # 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 # suffixes.c is a built source that must be cleaned
CLEANFILES = suffixes_dafsa.c CLEANFILES = suffixes_dafsa.h
lib_LTLIBRARIES = libpsl.la lib_LTLIBRARIES = libpsl.la
@ -18,8 +18,8 @@ libpsl_la_LDFLAGS = -no-undefined -version-info $(LIBPSL_SO_VERSION)
# Build rule for suffix_dafsa.c # Build rule for suffix_dafsa.c
# PSL_FILE can be set by ./configure --with-psl-file=[PATH] # PSL_FILE can be set by ./configure --with-psl-file=[PATH]
suffixes_dafsa.c: $(PSL_FILE) $(srcdir)/psl-make-dafsa suffixes_dafsa.h: $(PSL_FILE) $(srcdir)/psl-make-dafsa
$(srcdir)/psl-make-dafsa --output-format=cxx+ "$(PSL_FILE)" suffixes_dafsa.c $(srcdir)/psl-make-dafsa --output-format=cxx+ "$(PSL_FILE)" suffixes_dafsa.h
EXTRA_DIST = psl-make-dafsa LICENSE.chromium EXTRA_DIST = psl-make-dafsa LICENSE.chromium

View File

@ -159,7 +159,7 @@ struct psl_ctx_st {
/* include the PSL data generated by psl-make-dafsa */ /* include the PSL data generated by psl-make-dafsa */
#if defined(BUILTIN_GENERATOR_LIBICU) || defined(BUILTIN_GENERATOR_LIBIDN2) || defined(BUILTIN_GENERATOR_LIBIDN) #if defined(BUILTIN_GENERATOR_LIBICU) || defined(BUILTIN_GENERATOR_LIBIDN2) || defined(BUILTIN_GENERATOR_LIBIDN)
#include "suffixes_dafsa.c" #include "suffixes_dafsa.h"
#else #else
static const unsigned char kDafsa[] = ""; static const unsigned char kDafsa[] = "";
static time_t _psl_file_time = 0; static time_t _psl_file_time = 0;