<commit_before>art_LOCAL_PATH := $(call whereami)

art_SPRITES := $(wildcard $(art_LOCAL_PATH)/*.png)
art_SPR_DATA := $(patsubst %.png,%.cspr,$(art_SPRITES))

SRCS_C += $(art_LOCAL_PATH)/sprites.c
INCLUDE += $(art_LOCAL_PATH)
BUILT_SRCS += $(art_LOCAL_PATH)/sprites.h

CLEAN_SPEC += $(art_SPR_DATA) $(art_LOCAL_PATH)/sprites.c $(art_LOCAL_PATH)/sprites.h

%.cspr: %.png
	@echo "Converting : $<"
	@ConvertImg --format n2dlib $< > $@

$(art_LOCAL_PATH)/sprites.c: $(art_SPR_DATA)
	@echo "Catting sprites into sprites.c"
	@rm -f sprites.c
	@cat $^ | sed "s/^static uint16_t/unsigned short/" >> $(art_LOCAL_PATH)/sprites.c

$(art_LOCAL_PATH)/sprites.h: $(art_LOCAL_PATH)/sprites.c
	@echo "Making header sprites.h"
	@cat $(art_LOCAL_PATH)/sprites.c | grep "=" | sed -e "s/ =.*/;/" -e "s/^/extern /" > $(art_LOCAL_PATH)/sprites.h<commit_msg>Art: use make's automatic variables in recipes<commit_after>art_LOCAL_PATH := $(call whereami)

art_SPRITES := $(wildcard $(art_LOCAL_PATH)/*.png)
art_SPR_DATA := $(patsubst %.png,%.cspr,$(art_SPRITES))

SRCS_C += $(art_LOCAL_PATH)/sprites.c
INCLUDE += $(art_LOCAL_PATH)
BUILT_SRCS += $(art_LOCAL_PATH)/sprites.h

CLEAN_SPEC += $(art_SPR_DATA) $(art_LOCAL_PATH)/sprites.c $(art_LOCAL_PATH)/sprites.h

%.cspr: %.png
	@echo "Converting : $<"
	@ConvertImg --format n2dlib $< > $@

$(art_LOCAL_PATH)/sprites.c: $(art_SPR_DATA)
	@echo "Catting sprites into sprites.c"
	@rm -f $@
	@cat $^ | sed "s/^static uint16_t/unsigned short/" >> $@

$(art_LOCAL_PATH)/sprites.h: $(art_LOCAL_PATH)/sprites.c
	@echo "Making header sprites.h"
	@cat $< | grep "=" | sed -e "s/ =.*/;/" -e "s/^/extern /" > $@
{'fraction_non_alphanumeric': 0.20357803824799506, 'fraction_numerical': 0.003701418877236274, 'mean_word_length': 5.052238805970149, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 11, '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': '6456550', 'n_tokens_mistral': 724, 'n_tokens_neox': 681, 'n_words': 115}