<commit_before>.if !defined(TOPDIR)
.error "TOPDIR must be defined."
.endif

.if defined(NETWORK_TEST)
.if !defined(SKIP_NETWORK_TESTS)
TEST=${NETWORK_TEST}
.endif
.endif

.if defined(TEST)
.if !defined(SKIP_TESTS)
PROGRAM=${TEST}
SRCS+=${TEST}.cc

.if !target(regress)
regress: ${PROGRAM}
	${.OBJDIR}/${PROGRAM}
.endif
.endif
.endif

.if !target(regress)
regress: ${PROGRAM}
.endif

.PHONY: regress

OSNAME!=uname -s

CFLAGS+=-I${TOPDIR}
.if defined(NDEBUG)
CFLAGS+=-DNDEBUG=1
.else
.if ${OSNAME} != "SunOS"
CFLAGS+=-g
.endif
.endif

#CFLAGS+=--std gnu++0x
#CFLAGS+=-pedantic
CFLAGS+=-Wno-deprecated
CFLAGS+=-W -Wall
.if ${OSNAME} != "OpenBSD"
CFLAGS+=-Werror
.endif
CFLAGS+=-Wno-system-headers
#CFLAGS+=-Wno-unused-parameter
CFLAGS+=-Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts
#CFLAGS+=-Winline

.if defined(PROGRAM)
__LIBRARIES!=echo ${USE_LIBS} | sort -u | xargs
.for _lib in ${__LIBRARIES}
.include "${TOPDIR}/${_lib}/lib.mk"
.endfor

OBJS+=  ${SRCS:R:S/$/.o/g}

all: ${PROGRAM}

${PROGRAM}: ${OBJS}
	${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}

clean:
	rm -f ${PROGRAM} ${OBJS}
<commit_msg>Add a hastily-tried way to ensure that library dependencies are honored.<commit_after>.if !defined(TOPDIR)
.error "TOPDIR must be defined."
.endif

.if defined(NETWORK_TEST)
.if !defined(SKIP_NETWORK_TESTS)
TEST=${NETWORK_TEST}
.endif
.endif

.if defined(TEST)
.if !defined(SKIP_TESTS)
PROGRAM=${TEST}
SRCS+=${TEST}.cc

.if !target(regress)
regress: ${PROGRAM}
	${.OBJDIR}/${PROGRAM}
.endif
.endif
.endif

.if !target(regress)
regress: ${PROGRAM}
.endif

.PHONY: regress

OSNAME!=uname -s

CFLAGS+=-I${TOPDIR}
.if defined(NDEBUG)
CFLAGS+=-DNDEBUG=1
.else
.if ${OSNAME} != "SunOS"
CFLAGS+=-g
.endif
.endif

#CFLAGS+=--std gnu++0x
#CFLAGS+=-pedantic
CFLAGS+=-Wno-deprecated
CFLAGS+=-W -Wall
.if ${OSNAME} != "OpenBSD"
CFLAGS+=-Werror
.endif
CFLAGS+=-Wno-system-headers
#CFLAGS+=-Wno-unused-parameter
CFLAGS+=-Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts
#CFLAGS+=-Winline

.if defined(PROGRAM)
__LIBRARIES!=echo ${USE_LIBS} | sort -u | xargs
.for _lib in ${__LIBRARIES}
.include "${TOPDIR}/${_lib}/lib.mk"
.if defined(${_lib:U}_REQUIRES)
.for _lib2 in ${${_lib:U}_REQUIRES}
.if empty(__LIBRARIES:M${_lib2})
.error "Inclusion of library ${_lib} requires library ${_lib2}."
.endif
.endfor
.endif
.endfor

OBJS+=  ${SRCS:R:S/$/.o/g}

all: ${PROGRAM}

${PROGRAM}: ${OBJS}
	${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}

clean:
	rm -f ${PROGRAM} ${OBJS}

{'fraction_non_alphanumeric': 0.19984831247629883, 'fraction_numerical': 0.0026545316647705727, 'mean_word_length': 4.941441441441442, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1629811', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1127, 'n_words': 237}