<commit_before>
DOCS = README.pgq
DATA_built = pgq.sql
DATA = structure/uninstall_pgq.sql

SRCS = $(wildcard structure/*.sql) \
       $(wildcard functions/*.sql) \
       $(wildcard triggers/*.sql)

REGRESS = pgq_init logutriga sqltriga
REGRESS_OPTS = --load-language=plpythonu --load-language=plpgsql

PGXS = $(shell pg_config --pgxs)
include $(PGXS)

NDOC = NaturalDocs
NDOCARGS = -r -o html docs/html -p docs -i docs/sql
CATSQL = ../../scripts/catsql.py

pgq.sql: $(SRCS)
	$(CATSQL) structure/install.sql > $@

dox: cleandox
	mkdir -p docs/html
	mkdir -p docs/sql
	$(CATSQL) --ndoc structure/tables.sql structure/types.sql > docs/sql/schema.sql
	$(CATSQL) --ndoc structure/func_public.sql > docs/sql/external.sql
	$(CATSQL) --ndoc structure/func_internal.sql > docs/sql/internal.sql
	$(CATSQL) --ndoc structure/triggers.sql > docs/sql/triggers.sql
	$(NDOC) $(NDOCARGS)

cleandox:
	rm -rf docs/html docs/Data docs/sql

clean: cleandox

test:
	#-dropdb pgq
	#createdb pgq
	#psql -f structure/pgq.sql pgq
	make installcheck || { less regression.diffs; exit 1; }

upload: dox
	rsync -az docs/html structure functions data1:public_html/pgq/
	make cleandox
	rsync -az catsql.py Makefile docs data1:public_html/pgq/
	make dox

<commit_msg>build upgrade skript<commit_after>
DOCS = README.pgq
DATA_built = pgq.sql pgq.upgrade.sql
DATA = structure/uninstall_pgq.sql

SRCS = $(wildcard structure/*.sql) \
       $(wildcard functions/*.sql) \
       $(wildcard triggers/*.sql)

REGRESS = pgq_init logutriga sqltriga
REGRESS_OPTS = --load-language=plpythonu --load-language=plpgsql

PGXS = $(shell pg_config --pgxs)
include $(PGXS)

NDOC = NaturalDocs
NDOCARGS = -r -o html docs/html -p docs -i docs/sql
CATSQL = ../../scripts/catsql.py

pgq.sql: $(SRCS)
	$(CATSQL) structure/install.sql > $@

pgq.upgrade.sql: $(SRCS)
	$(CATSQL) structure/func_internal.sql structure/func_public.sql > $@

dox: cleandox
	mkdir -p docs/html
	mkdir -p docs/sql
	$(CATSQL) --ndoc structure/tables.sql structure/types.sql > docs/sql/schema.sql
	$(CATSQL) --ndoc structure/func_public.sql > docs/sql/external.sql
	$(CATSQL) --ndoc structure/func_internal.sql > docs/sql/internal.sql
	$(CATSQL) --ndoc structure/triggers.sql > docs/sql/triggers.sql
	$(NDOC) $(NDOCARGS)

cleandox:
	rm -rf docs/html docs/Data docs/sql

clean: cleandox

test:
	#-dropdb pgq
	#createdb pgq
	#psql -f structure/pgq.sql pgq
	make installcheck || { less regression.diffs; exit 1; }

upload: dox
	rsync -az docs/html structure functions data1:public_html/pgq/
	make cleandox
	rsync -az catsql.py Makefile docs data1:public_html/pgq/
	make dox


{'fraction_non_alphanumeric': 0.13739868776534156, 'fraction_numerical': 0.0023157082207641835, 'mean_word_length': 3.7385740402193783, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5584250', 'n_tokens_mistral': 1067, 'n_tokens_neox': 991, 'n_words': 232}