aboutsummaryrefslogtreecommitdiff
path: root/data/Makefile.am
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-03-26 12:49:35 +0100
committerGitHub <noreply@github.com>2021-03-26 12:49:35 +0100
commit14ce3d9fa8700b4c0aa035c86a7e55af905dbf28 (patch)
treeddddb044f8eaaa9c7f0b49cb03f049c24a1a76f3 /data/Makefile.am
parent969ae0712c45b176c3097f5f7e3e5aeb4873c878 (diff)
downloadPROJ-14ce3d9fa8700b4c0aa035c86a7e55af905dbf28.tar.gz
PROJ-14ce3d9fa8700b4c0aa035c86a7e55af905dbf28.zip
Build: simplify proj.db generation (#2605)
- change foreign key check, so that it is enabled outside of the transaction where we insert things, and can make the sqlite3 process fail in case of violations, without the postcheck done in the autoconf build - autoconf and cmake builds: simplification related to the above (which also means that cmake builds now have the fkey check, which was omitted until now)
Diffstat (limited to 'data/Makefile.am')
-rw-r--r--data/Makefile.am19
1 files changed, 4 insertions, 15 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index b9073bfc..c1d0f8f8 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -127,7 +127,7 @@ EXTRA_DIST = proj.ini GL27 nad.lst nad27 nad83 \
tests/tinshift_crs_implicit.json \
tests/tinshift_simplified_kkj_etrs.json \
tests/tinshift_simplified_n60_n2000.json \
- generate_all_sql_in.cmake sql_filelist.cmake \
+ generate_proj_db.cmake sql_filelist.cmake \
$(SQL_ORDERED_LIST)
install-data-local:
@@ -142,7 +142,6 @@ install-data-local:
fi; \
done
-# head -c1 not handled on Solaris
proj.db: $(DATAPATH)/sql/*.sql
@echo "Make proj.db"
$(RM) proj.db
@@ -161,22 +160,12 @@ proj.db: $(DATAPATH)/sql/*.sql
echo "Build of proj.db failed"; \
$(RM) proj.db; \
exit 1; \
- fi; \
- echo "" | head -c1; \
- if [ $$? -eq 0 ] ; then \
- echo "Running foreign_key_check"; \
- if [ $$(echo "pragma foreign_key_check;" | sqlite3 proj.db | head -c1 | wc -c) -ne 0 ]; then \
- echo "Foreign key check failed"; \
- $(RM) proj.db; \
- exit 1; \
- else \
- if test "x$(PROJ_DB_CACHE_DIR)" != "x" -a -x "$$(command -v md5sum)" ; then \
+ fi; \
+ if test "x$(PROJ_DB_CACHE_DIR)" != "x" -a -x "$$(command -v md5sum)" ; then \
mkdir -p "$(PROJ_DB_CACHE_DIR)"; \
cat $${SQL_EXPANDED_LIST} | md5sum > "$(PROJ_DB_CACHE_DIR)/proj.db.sql.md5"; \
cp proj.db "$(PROJ_DB_CACHE_DIR)"; \
- fi \
- fi \
- fi
+ fi
# For out-of-tree builds, link all file of the source data dir to the generated data
# Also link select resource files in a for_tests subdirectory so that we are not