<commit_before>TMPDIR = /tmp/capstone_test

DIFF = diff -u -w

TEST = $(TMPDIR)/test
TEST_ARM = $(TMPDIR)/test_arm
TEST_ARM64 = $(TMPDIR)/test_arm64
TEST_MIPS = $(TMPDIR)/test_mips
TEST_X86 = $(TMPDIR)/test_x86

.PHONY: all expected python java ocaml

all:
	make -C python gen_const
	make -C java gen_const

tests: expected python java #oclma ruby

expected:
	$(MAKE) -C ../tests
	mkdir -p $(TMPDIR)
	../tests/test > $(TEST)_e
	../tests/test_arm > $(TEST_ARM)_e
	../tests/test_arm64 > $(TEST_ARM64)_e
	../tests/test_mips > $(TEST_MIPS)_e
	../tests/test_x86 > $(TEST_X86)_e

python: FORCE
	$(MAKE) -C python
	python python/test.py > $(TEST)_o
	python python/test_arm.py > $(TEST_ARM)_o
	python python/test_arm64.py > $(TEST_ARM64)_o
	python python/test_mips.py > $(TEST_MIPS)_o
	python python/test_x86.py > $(TEST_X86)_o
	$(MAKE) test_diff

java: FORCE
	$(MAKE) -C java
	cd java; ./run.sh > $(TEST)_o
	cd java; ./run.sh arm > $(TEST_ARM)_o
	cd java; ./run.sh arm64 > $(TEST_ARM64)_o<commit_msg>Update Makefile to be able to test each binding individually<commit_after>TMPDIR = /tmp/capstone_test

DIFF = diff -u -w

TEST = $(TMPDIR)/test
TEST_ARM = $(TMPDIR)/test_arm
TEST_ARM64 = $(TMPDIR)/test_arm64
TEST_MIPS = $(TMPDIR)/test_mips
TEST_X86 = $(TMPDIR)/test_x86

.PHONY: all expected python java ocaml

all:
	make -C python gen_const
	make -C java gen_const

tests: expected python java #oclma ruby

test_java: expected java
test_python: expected python

expected:
	$(MAKE) -C ../tests
	mkdir -p $(TMPDIR)
	../tests/test > $(TEST)_e
	../tests/test_arm > $(TEST_ARM)_e
	../tests/test_arm64 > $(TEST_ARM64)_e
	../tests/test_mips > $(TEST_MIPS)_e
	../tests/test_x86 > $(TEST_X86)_e

python: FORCE
	$(MAKE) -C python
	python python/test.py > $(TEST)_o
	python python/test_arm.py > $(TEST_ARM)_o
	python python/test_arm64.py > $(TEST_ARM64)_o
	python python/test_mips.py > $(TEST_MIPS)_o
	python python/test_x86.py > $(TEST_X86)_o
	$(MAKE) test_diff

java: FORCE
	$(MAKE) -C java
	cd java; ./run.sh > $(TEST)_o
	cd java; ./run.sh arm > $(TEST_ARM)_o
	cd java; ./run.sh arm64 > $(TEST_ARM64)_o
{'fraction_non_alphanumeric': 0.15421455938697318, 'fraction_numerical': 0.02681992337164751, 'mean_word_length': 4.009592326139089, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, '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': '869290', 'n_tokens_mistral': 890, 'n_tokens_neox': 859, 'n_words': 204}