<commit_before>all: bin/objcwrapper

../nitcc/src/nitcc:
	make -C ../nitcc

src/objc_parser.nit: ../nitcc/src/nitcc grammar/objc.sablecc
	../nitcc/src/nitcc grammar/objc.sablecc
	mv *.nit src/
	mv objc* gen/

bin/objcwrapper: $(shell ../../bin/nitls -M src/objcwrapper.nit) src/objc_parser.nit
	../../bin/nitc -o bin/objcwrapper src/objcwrapper.nit --semi-global

bin/objc_test_parser: $(shell ../../bin/nitls -M src/objc_test_parser.nit)
	../../bin/nitc -o bin/objc_test_parser src/objc_test_parser.nit --semi-global

check: bin/objc_test_parser bin/objcwrapper
	# Test the parser
	bin/objc_test_parser tests/MyClass.h

	# Test objcwrapper
	bin/objcwrapper tests/MyClass.h -o tests/MyClass.nit
	../../bin/nitpick tests/MyClass.nit

# Test on classes of libgnustep-base-dev
check-gnustep: bin/objcwrapper
	gcc -E /usr/include/GNUstep/Foundation/NSArray.h -I /usr/include/GNUstep/ -Wno-deprecated \
	| ../header_keeper/bin/header_keeper /usr/include/GNUstep/Foundation/NSArray.h \
	| bin/header_static > tests/NSArray.pre.h
	bin/objcwrapper tests/NSArray.pre.h -o tests/nsarray.nit
	../../bin/nitpick tests/nsarray.nit

# Test on classes of the Apple Foundation framework
check-apple: bin/objcwrapper
	gcc -E /System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h \
	| ../header_keeper/bin/header_keeper /System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h \
	| bin/header_static > tests/NSArray.pre.h
	bin/objcwrapper tests/NSArray.pre.h -o tests/nsarray.nit
	../../bin/nitpick tests/nsarray.nit

	gcc -E /System/Library/Frameworks/AppKit.framework/Headers/NSAlert.h \
	| ../header_keeper/bin/header_keeper NSAlert.h \
	| bin/header_static > tests/NSAlert.pre.h
	bin/objcwrapper tests/NSAlert.pre.h -o tests/nsalert.nit
	../../bin/nitpick tests/nsalert.nit

bin/header_static:
	../../bin/nitc --dir bin src/header_static.nit
<commit_msg>contrib/objcwrapper makefile: add dependency to the bin/header_static rule<commit_after>all: bin/objcwrapper bin/header_static

../nitcc/src/nitcc:
	make -C ../nitcc

src/objc_parser.nit: ../nitcc/src/nitcc grammar/objc.sablecc
	../nitcc/src/nitcc grammar/objc.sablecc
	mv *.nit src/
	mv objc* gen/

bin/objcwrapper: $(shell ../../bin/nitls -M src/objcwrapper.nit) src/objc_parser.nit
	../../bin/nitc -o bin/objcwrapper src/objcwrapper.nit --semi-global

bin/objc_test_parser: $(shell ../../bin/nitls -M src/objc_test_parser.nit)
	../../bin/nitc -o bin/objc_test_parser src/objc_test_parser.nit --semi-global

check: bin/objc_test_parser bin/objcwrapper
	# Test the parser
	bin/objc_test_parser tests/MyClass.h

	# Test objcwrapper
	bin/objcwrapper tests/MyClass.h -o tests/MyClass.nit
	../../bin/nitpick tests/MyClass.nit

# Test on classes of libgnustep-base-dev
check-gnustep: bin/objcwrapper bin/header_static
	gcc -E /usr/include/GNUstep/Foundation/NSArray.h -I /usr/include/GNUstep/ -Wno-deprecated \
	| ../header_keeper/bin/header_keeper /usr/include/GNUstep/Foundation/NSArray.h \
	| bin/header_static > tests/NSArray.pre.h
	bin/objcwrapper tests/NSArray.pre.h -o tests/nsarray.nit
	../../bin/nitpick tests/nsarray.nit

# Test on classes of the Apple Foundation framework
check-apple: bin/objcwrapper bin/header_static
	gcc -E /System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h \
	| ../header_keeper/bin/header_keeper /System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h \
	| bin/header_static > tests/NSArray.pre.h
	bin/objcwrapper tests/NSArray.pre.h -o tests/nsarray.nit
	../../bin/nitpick tests/nsarray.nit

	gcc -E /System/Library/Frameworks/AppKit.framework/Headers/NSAlert.h \
	| ../header_keeper/bin/header_keeper NSAlert.h \
	| bin/header_static > tests/NSAlert.pre.h
	bin/objcwrapper tests/NSAlert.pre.h -o tests/nsalert.nit
	../../bin/nitpick tests/nsalert.nit

bin/header_static: $(shell ../../bin/nitls -M src/header_static.nit)
	../../bin/nitc --dir bin src/header_static.nit

{'fraction_non_alphanumeric': 0.14932587127957261, 'fraction_numerical': 0.0, 'mean_word_length': 3.4681818181818183, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3074229', 'n_tokens_mistral': 1489, 'n_tokens_neox': 1453, 'n_words': 250}