<commit_before># Makefile

WEAVE = noweave
TANGLE = notangle
PDFLATEX = pdflatex

TARG_SRC = rbuffer.h rbuffer.c
TARG_PDF = rbuffer.pdf

FILTER = common/better-code.sh

SRC = rbuffer.nw

all: $(TARG_PDF) $(TARG_SRC)

%.h: %.nw
	$(TANGLE) -R$@ $< > $@

%.c: %.nw
	$(TANGLE) -R$@ $< > $@

%.tex: %.nw
	$(WEAVE) -delay -autodefs c -index $< > $@

%.pdf: %.tex common/prelude.tex
	$(PDFLATEX) $<
	$(PDFLATEX) $<
	$(PDFLATEX) $<

clean:
	rm -Rfv *.tex *.aux *.log *.out *.toc
	rm -Rfv $(TARG_SRC) $(TARG_PDF)<commit_msg>A better and more complete Makefile<commit_after># Makefile

WEAVE = noweave
TANGLE = notangle
PDFLATEX = pdflatex

TARG_SRC = standard.h rbuffer.h rbuffer.c
TARG_PDF = rbuffer.pdf

TEX_DEPS = noweb.sty common/prelude.tex

FILTER = common/better-code.sh

SRC = rbuffer.nw

all: pdf code

code: $(TARG_SRC)

pdf: $(TARG_PDF)

# this method does not send this message :
# make: Circular rbuffer.nw.c <- rbuffer.nw dependency dropped.
$(filter %.h,$(TARG_SRC)): %.h: rbuffer.nw
	$(TANGLE) -R$@ $< > $@

$(filter %.c,$(TARG_SRC)): %.c: rbuffer.nw
	$(TANGLE) -R$@ $< > $@

%.tex: %.nw
	$(WEAVE) -delay -autodefs c -index $< > $@

%.pdf: %.tex  $(TEX_DEPS)
	$(PDFLATEX) $<
	$(PDFLATEX) $<
	$(PDFLATEX) $<

clean:
	rm -Rfv *.tex *.aux *.log *.out *.toc
	rm -Rfv $(TARG_SRC) $(TARG_PDF)

.PHONY: all clean pdf code
{'fraction_non_alphanumeric': 0.20136260408781226, 'fraction_numerical': 0.0, 'mean_word_length': 3.5273972602739727, 'pattern_counts': {'":': 0, '<': 16, '<?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': '3602181', 'n_tokens_mistral': 642, 'n_tokens_neox': 589, 'n_words': 140}