<commit_before>
# the perl below is because ocaml INT_MAX is smaller than PHP_INT_MAX
# and this causes the json parsing of the file to fail.
update:
	cd ~/local/fbcode/; git pull
	~/pfff/pfff_test -generate_php_stdlib ~/local/fbcode/hphp/system/idl idl/
	~/pfff/pfff_test -generate_php_stdlib ~/local/fbcode/hphp/facebook/extensions facebook/
	cp -rf ~/local/fbcode/hphp/system/php/* .
	cp -rf ~/local/fbcode/hphp/facebook/system/php/* facebook/
	cp -f ~/local/fbcode/hphp/system/idl/constants.idl.json /tmp/
	perl -p -i -e 's/9223372036854775807/0/g;' /tmp/constants.idl.json
	~/pfff/pfff_test -builtins_of_idl /tmp/constants.idl.json > builtins_constants.idl.php
	make check

check:
	~/pfff/codegraph -lang php -build .
	cat pfff.log<commit_msg>* data/php_stdlib/Makefile: remove old files<commit_after>
# the perl below is because ocaml INT_MAX is smaller than PHP_INT_MAX
# and this causes the json parsing of the file to fail.
update:
	cd ~/local/fbcode/; git pull
	mkdir -p idl facebook
	rm -f idl/* facebook/*
	~/pfff/pfff_test -generate_php_stdlib ~/local/fbcode/hphp/system/idl idl/
	~/pfff/pfff_test -generate_php_stdlib ~/local/fbcode/hphp/facebook/extensions facebook/
	cp -rf ~/local/fbcode/hphp/system/php/* .
	cp -rf ~/local/fbcode/hphp/facebook/system/php/* facebook/
	cp -f ~/local/fbcode/hphp/system/idl/constants.idl.json /tmp/
	perl -p -i -e 's/9223372036854775807/0/g;' /tmp/constants.idl.json
	~/pfff/pfff_test -builtins_of_idl /tmp/constants.idl.json > builtins_constants.idl.php
	make check

check:
	~/pfff/codegraph -lang php -build .
	cat pfff.log
{'fraction_non_alphanumeric': 0.13214739517153748, 'fraction_numerical': 0.025412960609911054, 'mean_word_length': 3.701492537313433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4763676', 'n_tokens_mistral': 673, 'n_tokens_neox': 634, 'n_words': 143}