<commit_before>CURR_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SRC_DIR := $(realpath $(CURR_DIR)/../../src/bezier)
QUADPACK_DIR := $(realpath $(SRC_DIR)/quadpack)

FC = gfortran
F77 = .f
F90 = .f90
OBJ = .o
FCFLAGS = -fPIC -fprofile-arcs -ftest-coverage

# NOTE: **Must** specify the order for source files.
F77_SOURCES := \
	$(QUADPACK_DIR)/d1mach$(F77) \
	$(QUADPACK_DIR)/dqelg$(F77) \
	$(QUADPACK_DIR)/dqpsrt$(F77) \
	$(QUADPACK_DIR)/dqk21$(F77) \
	$(QUADPACK_DIR)/dqagse$(F77)
F90_SOURCES := \
	$(SRC_DIR)/types$(F90) \
	$(SRC_DIR)/helpers$(F90) \
	$(SRC_DIR)/curve$(F90) \
	$(SRC_DIR)/surface$(F90) \
	$(SRC_DIR)/curve_intersection$(F90)
TEST_SOURCES := \
	$(CURR_DIR)/unit_test_helpers$(F90) \
	$(CURR_DIR)/test_helpers$(F90) \
	$(CURR_DIR)/test_curve$(F90)
F77_OBJS := $(patsubst $(QUADPACK_DIR)/%$(F77), $(CURR_DIR)/%$(OBJ), $(F77_SOURCES))
F90_OBJS := $(patsubst $(SRC_DIR)/%$(F90), $(CURR_DIR)/%$(OBJ), $(F90_SOURCES))
TEST_OBJS := $(patsubst $(CURR_DIR)/%$(F90), $(CURR_DIR)/%$(OBJ), $(TEST_SOURCES))

test: $(CURR_DIR)/test-bin
	$(CURR_DIR)/test-bin

$(CURR_DIR)/%$(OBJ): $(QUADPACK_DIR)/%$(F77)
	$(FC) $(FCFLAGS) -c $< -o $@

$(CURR_DIR)/%$(OBJ): $(SRC_DIR)/%$(F90)
	$(FC) $(FCFLAGS) -c $< -o $@

$(CURR_DIR)/%$(OBJ): $(CURR_DIR)/%$(F90)
	$(FC) $(FCFLAGS) -c $< -o $@

$(CURR_DIR)/test-bin: $(F77_OBJS) $(F90_OBJS) $(TEST_OBJS) $(CURR_DIR)/test.f90
	$(FC) $(FCFLAGS) \
	  -o $(CURR_DIR)/test-bin \
	  $(F77_OBJS) \
	  $(F90_OBJS) \
	  $(TEST_OBJS) \
	  $(CURR_DIR)/test.f90

lcov: $(CURR_DIR)/test-bin
	$(CURR_DIR)/test-bin
	lcov --capture \
	  --directory $(CURR_DIR) \
	  -output-file $(CURR_DIR)/coverage.info
	genhtml \
	  $(CURR_DIR)/coverage.info \
	  --output-directory $(CURR_DIR)/lcov-html

clean:
	rm -f $(CURR_DIR)/*.gcno
	rm -f $(CURR_DIR)/*.gcda
	rm -f $(CURR_DIR)/*.mod
	rm -f $(CURR_DIR)/*$(OBJ)
	rm -f $(CURR_DIR)/test-bin
	rm -f $(CURR_DIR)/coverage.info
	rm -fr $(CURR_DIR)/lcov-html

.PHONY: test lcov clean<commit_msg>Adding branch information to `make lcov`.<commit_after>CURR_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SRC_DIR := $(realpath $(CURR_DIR)/../../src/bezier)
QUADPACK_DIR := $(realpath $(SRC_DIR)/quadpack)

FC = gfortran
F77 = .f
F90 = .f90
OBJ = .o
FCFLAGS = -fPIC -O0 -fprofile-arcs -ftest-coverage

# NOTE: **Must** specify the order for source files.
F77_SOURCES := \
	$(QUADPACK_DIR)/d1mach$(F77) \
	$(QUADPACK_DIR)/dqelg$(F77) \
	$(QUADPACK_DIR)/dqpsrt$(F77) \
	$(QUADPACK_DIR)/dqk21$(F77) \
	$(QUADPACK_DIR)/dqagse$(F77)
F90_SOURCES := \
	$(SRC_DIR)/types$(F90) \
	$(SRC_DIR)/helpers$(F90) \
	$(SRC_DIR)/curve$(F90) \
	$(SRC_DIR)/surface$(F90) \
	$(SRC_DIR)/curve_intersection$(F90)
TEST_SOURCES := \
	$(CURR_DIR)/unit_test_helpers$(F90) \
	$(CURR_DIR)/test_helpers$(F90) \
	$(CURR_DIR)/test_curve$(F90)
F77_OBJS := $(patsubst $(QUADPACK_DIR)/%$(F77), $(CURR_DIR)/%$(OBJ), $(F77_SOURCES))
F90_OBJS := $(patsubst $(SRC_DIR)/%$(F90), $(CURR_DIR)/%$(OBJ), $(F90_SOURCES))
TEST_OBJS := $(patsubst $(CURR_DIR)/%$(F90), $(CURR_DIR)/%$(OBJ), $(TEST_SOURCES))

test: $(CURR_DIR)/test-bin
	$(CURR_DIR)/test-bin

$(CURR_DIR)/%$(OBJ): $(QUADPACK_DIR)/%$(F77)
	$(FC) $(FCFLAGS) -c $< -o $@

$(CURR_DIR)/%$(OBJ): $(SRC_DIR)/%$(F90)
	$(FC) $(FCFLAGS) -c $< -o $@

$(CURR_DIR)/%$(OBJ): $(CURR_DIR)/%$(F90)
	$(FC) $(FCFLAGS) -c $< -o $@

$(CURR_DIR)/test-bin: $(F77_OBJS) $(F90_OBJS) $(TEST_OBJS) $(CURR_DIR)/test.f90
	$(FC) $(FCFLAGS) \
	  -o $(CURR_DIR)/test-bin \
	  $(F77_OBJS) \
	  $(F90_OBJS) \
	  $(TEST_OBJS) \
	  $(CURR_DIR)/test.f90

lcov: $(CURR_DIR)/test-bin
	$(CURR_DIR)/test-bin
	lcov --capture \
	  --directory $(CURR_DIR) \
	  -output-file $(CURR_DIR)/coverage.info \
	  --rc lcov_branch_coverage=1
	genhtml \
	  $(CURR_DIR)/coverage.info \
	  --output-directory $(CURR_DIR)/lcov-html \
	  --branch-coverage

clean:
	rm -f $(CURR_DIR)/*.gcno
	rm -f $(CURR_DIR)/*.gcda
	rm -f $(CURR_DIR)/*.mod
	rm -f $(CURR_DIR)/*$(OBJ)
	rm -f $(CURR_DIR)/test-bin
	rm -f $(CURR_DIR)/coverage.info
	rm -fr $(CURR_DIR)/lcov-html

.PHONY: test lcov clean
{'fraction_non_alphanumeric': 0.24690133862171543, 'fraction_numerical': 0.035696579077838374, 'mean_word_length': 4.302233902759527, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, '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': '1742748', 'n_tokens_mistral': 2043, 'n_tokens_neox': 1883, 'n_words': 280}