<commit_before># Awesome tutorial: https://makefiletutorial.com/#variables-pt-2
lib = $(shell git diff master... --name-only | head -1 | sed 's/recipes\///' | sed 's/\/.*//')
version = $(shell yq eval "(.versions | keys)[0]" ${lib}/config.yml)
folder = $(shell yq eval "(.versions[\"${version}\"]) | .folder" ${lib}/config.yml)
#extra = -b missing
os = $(shell uname -s)

default: create
	say ${lib}

create:
	conan create ${lib}/${folder} ${lib}/${version}@ --profile ${os}.txt -b ${lib}

install:
	echo ${lib}/${version}
	rm -rf build
	conan install ${lib}/${folder} ${lib}/${version} --install-folder build --profile ${os}.txt ${extra}

export:
	conan export ${lib}/${folder} ${lib}/${version}@

test: export
	conan test ${lib}/${folder}/test_package ${lib}/${version} -b ${lib} --profile ${os}.txt -pr:b ${os}.txt

testv1: export
	conan test ${lib}/${folder}/test_v1_package ${lib}/${version} -b ${lib} --profile ${os}.txt -pr:b ${os}.txt

show:
	@echo ${lib}/${version}

copy:
	@echo ${lib}/${version} | pbcopy

info:
	conan info ${lib}/${version}@ --graph kw.html

vi:
	vi ${lib}/${folder}/conanfile.py

push: test
	git push
	lcv

upload:
	conan install sentry-native/0.4.12@ -s os.version=10.13 -if build

c:
	c ${lib}/${folder}

lint:
	PYTHONPATH=.. pylint --rcfile=../linter/pylintrc_recipe --output-format=colorized ${lib}/${folder}/conanfile.py<commit_msg>Improve conan Makefile<commit_after># Awesome tutorial: https://makefiletutorial.com/#variables-pt-2
lib = $(shell git diff master... --name-only | head -1 | sed 's/recipes\///' | sed 's/\/.*//')
version = $(shell yq eval "(.versions | keys)[0]" ${lib}/config.yml)
folder = ${lib}/$(shell yq eval "(.versions[\"${version}\"]) | .folder" ${lib}/config.yml)
#extra = --build missing
os = $(shell uname -s)

default: test
	say ${lib}

install:
	echo ${lib}/${version}
	rm -rf build
	conan install ${folder} ${lib}/${version} \
		--install-folder build \
		--profile ${os}.txt ${extra}

export:
	rm -rf \
		${folder}/test_*/build \
		${folder}/test_*/conan.lock \
		${folder}/test_*/conanbuildinfo.txt \
		${folder}/test_*/conaninfo.txt \
		${folder}/test_*/graph_info.json
	conan export ${folder} ${lib}/${version}@

test: export
	conan test ${folder}/test_package ${lib}/${version} \
		--build ${lib} \
		--profile ${os}.txt \
		--profile:build ${os}.txt

testv1: export
	conan test ${folder}/test_v1_package ${lib}/${version} \
		--build ${lib} \
		--profile ${os}.txt \
		--profile:build ${os}.txt

show:
	@echo ${lib}/${version}

copy:
	@echo ${lib}/${version} | pbcopy

info:
	conan info ${lib}/${version}@ --graph kw.html

vi:
	vi ${folder}/conanfile.py

push: default
	git push
	lcv

c:
	c ${folder}

lint:
	PYTHONPATH=.. pylint \
			   --rcfile=../linter/pylintrc_recipe \
			   --output-format=colorized \
			   ${folder}/conanfile.py
{'fraction_non_alphanumeric': 0.22835767723548273, 'fraction_numerical': 0.00641254007837549, 'mean_word_length': 3.5436893203883497, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5165821', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1056, 'n_words': 255}