<commit_before>include ../Makefile.config

.PHONY: all
all: ../simlib.a

$(eval $(call dependencies))

# Because source file is generated we may not generate dependencies
# automatically (the file may not be already created), that is why we have to
# do it manually
syscall_name_32.o: syscall_name_32.cc.deps
syscall_name_64.o: syscall_name_64.cc.deps

ifneq ($(wildcard /usr/include/x86_64-linux-gnu/asm/unistd_32.h),)
syscall_name_32.cc: UNISTD_32 = /usr/include/x86_64-linux-gnu/asm/unistd_32.h
else ifneq ($(wildcard /usr/include/x86-linux-gnu/asm/unistd_32.h),)
syscall_name_32.cc: UNISTD_32 = /usr/include/x86-linux-gnu/asm/unistd_32.h
else
syscall_name_32.cc: UNISTD_32 = /usr/include/asm/unistd_32.h
endif

syscall_name_32.cc: Makefile $(UNISTD_32)
	$(GEN)
	$(Q)echo -e "// WARNING: file generated automatically; changes will not be permanent." > $@
	$(Q)echo -e "#include \"../include/syscall_name.h\"" >> $@
	$(Q)echo -e "#include \"$(UNISTD_32)\"" >> $@
	$(Q)echo -e "" >> $@
	# 32 bit
	$(Q) [ -f $(UNISTD_32) ] || \
		{ echo -e "Error: $(UNISTD_32): No such file or directory"; $(RM) $@; exit 1; }
	$(Q)echo -e "SyscallNameSet x86_syscall_name {" >> $@
	$(Q)grep -E "^\s*#\s*define\s*__NR_" $(UNISTD_32) | \
		sed 's/#define\s*__NR_//' | \
		awk '{ printf "\t{"; if (2<=NF) printf $$2; for (i=3; i<=NF; ++i) printf " " $$i; print ", \"" $$1 "\"}," }' >> $@
	$(Q)echo -e "};" >> $@

ifneq ($(wildcard /usr/include/x86_64-linux-gnu/asm/unistd_64.h),)
syscall_name_64.cc: UNISTD_64 = /usr/include/x86_64-linux-gnu/asm/unistd_64.h
else ifneq ($(wildcard /usr/include/x86-linux-gnu/asm/unistd_64.h),)
syscall_name_64.cc: UNISTD_64 = /usr/include/x86-linux-gnu/asm/unistd_64.h
else
syscall_name_64.cc: UNISTD_64 = /usr/include/asm/unistd_64.h
endif

syscall_name_64.cc: Makefile $(UNISTD_64)
	$(GEN)
	$(Q)echo -e "// WARNING: file generated automatically; changes will not be permanent." > $@
	$(Q)echo -e "#include \"../include/syscall_name.h\"" >> $@
	$(Q)echo -e "#include \"$(UNISTD_64)\"" >> $@
	$(Q)echo -e "" >> $@
	# 64 bit
	$(Q)echo -e "SyscallNameSet x86_64_syscall_name {" >> $@
	$(Q) [ -f $(UNISTD_64) ] || \
		{ echo -e "Error: $(UNISTD_64): No such file or directory"; $(RM) $@; exit 1; }
	$(Q)grep -E "^\s*#\s*define\s*__NR_" $(UNISTD_64) | \
		sed 's/#define\s*__NR_//' | \
		awk '{ printf "\t{"; if (2<=NF) printf $$2; for (i=3; i<=NF; ++i) printf " " $$i; print ", \"" $$1 "\"}," }' >> $@
	$(Q)echo -e "};" >> $@
<commit_msg>Try to fix echo commands in Makefiles;<commit_after>include ../Makefile.config

.PHONY: all
all: ../simlib.a

$(eval $(call dependencies))

# Because source file is generated we may not generate dependencies
# automatically (the file may not be already created), that is why we have to
# do it manually
syscall_name_32.o: syscall_name_32.cc.deps
syscall_name_64.o: syscall_name_64.cc.deps

ifneq ($(wildcard /usr/include/x86_64-linux-gnu/asm/unistd_32.h),)
syscall_name_32.cc: UNISTD_32 = /usr/include/x86_64-linux-gnu/asm/unistd_32.h
else ifneq ($(wildcard /usr/include/x86-linux-gnu/asm/unistd_32.h),)
syscall_name_32.cc: UNISTD_32 = /usr/include/x86-linux-gnu/asm/unistd_32.h
else
syscall_name_32.cc: UNISTD_32 = /usr/include/asm/unistd_32.h
endif

syscall_name_32.cc: Makefile $(UNISTD_32)
	$(GEN)
	$(Q)echo "// WARNING: file generated automatically; changes will not be permanent." > $@
	$(Q)echo "#include \"../include/syscall_name.h\"" >> $@
	$(Q)echo "#include \"$(UNISTD_32)\"" >> $@
	$(Q)echo "" >> $@
	# 32 bit
	$(Q) [ -f $(UNISTD_32) ] || \
		{ echo "Error: $(UNISTD_32): No such file or directory"; $(RM) $@; exit 1; }
	$(Q)echo "SyscallNameSet x86_syscall_name {" >> $@
	$(Q)grep -E "^\s*#\s*define\s*__NR_" $(UNISTD_32) | \
		sed 's/#define\s*__NR_//' | \
		awk '{ printf "\t{"; if (2<=NF) printf $$2; for (i=3; i<=NF; ++i) printf " " $$i; print ", \"" $$1 "\"}," }' >> $@
	$(Q)echo "};" >> $@

ifneq ($(wildcard /usr/include/x86_64-linux-gnu/asm/unistd_64.h),)
syscall_name_64.cc: UNISTD_64 = /usr/include/x86_64-linux-gnu/asm/unistd_64.h
else ifneq ($(wildcard /usr/include/x86-linux-gnu/asm/unistd_64.h),)
syscall_name_64.cc: UNISTD_64 = /usr/include/x86-linux-gnu/asm/unistd_64.h
else
syscall_name_64.cc: UNISTD_64 = /usr/include/asm/unistd_64.h
endif

syscall_name_64.cc: Makefile $(UNISTD_64)
	$(GEN)
	$(Q)echo "// WARNING: file generated automatically; changes will not be permanent." > $@
	$(Q)echo "#include \"../include/syscall_name.h\"" >> $@
	$(Q)echo "#include \"$(UNISTD_64)\"" >> $@
	$(Q)echo "" >> $@
	# 64 bit
	$(Q)echo "SyscallNameSet x86_64_syscall_name {" >> $@
	$(Q) [ -f $(UNISTD_64) ] || \
		{ echo "Error: $(UNISTD_64): No such file or directory"; $(RM) $@; exit 1; }
	$(Q)grep -E "^\s*#\s*define\s*__NR_" $(UNISTD_64) | \
		sed 's/#define\s*__NR_//' | \
		awk '{ printf "\t{"; if (2<=NF) printf $$2; for (i=3; i<=NF; ++i) printf " " $$i; print ", \"" $$1 "\"}," }' >> $@
	$(Q)echo "};" >> $@

{'fraction_non_alphanumeric': 0.222700266338865, 'fraction_numerical': 0.049170251997541485, 'mean_word_length': 3.976554536187564, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 55, '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': '4686563', 'n_tokens_mistral': 2321, 'n_tokens_neox': 2057, 'n_words': 420}