<commit_before># -----------------------------------------------------------------------------
#
# (c) 2009 The University of Glasgow
#
# This file is part of the GHC build system.
#
# To understand how the build system works and how to modify it, see
#      http://ghc.haskell.org/trac/ghc/wiki/Building/Architecture
#      http://ghc.haskell.org/trac/ghc/wiki/Building/Modifying
#
# -----------------------------------------------------------------------------


# Build a perl script.  Invoke like this:
#
# driver/mangler_PERL_SRC = ghc-asm.lprl
# driver/mangler_dist_PROGNAME = ghc-asm
#
# $(eval $(call build-perl,driver/mangler,dist))

define build-perl
$(call trace, build-perl($1,$2))
$(call profStart, build-perl($1,$2))
# $1 = dir
# $2 = distdir

ifneq "$$(CLEANING)" "YES"
ifeq "$$($1_$2_PROGNAME)" ""
$$(error $1_$2_PROGNAME is not set)
endif
ifneq "$$($1_$2_PROG)" ""
$$(error $1_$2_PROG is set)
endif
$1_$2_PROG = $$($1_$2_PROGNAME)

ifneq "$$($$($1_$2_PROG)_INPLACE)" ""
$$(error $$($1_$2_PROG)_INPLACE defined twice)
endif
ifeq "$$($1_$2_TOPDIR)" "YES"
$$($1_$2_PROG)_INPLACE = $$(INPLACE_TOPDIR)/$$($1_$2_PROG)
else
$$($1_$2_PROG)_INPLACE = $$(INPLACE_BIN)/$$($1_$2_PROG)
endif
endif

$1_$2_INPLACE = $$($$($1_$2_PROG)_INPLACE)

$(call all-target,$1_$2,$$($1_$2_INPLACE))

$(call clean-target,$1,$2,$1/$2 $$($1_$2_INPLACE))
.PHONY: clean_$1
clean_$1 : clean_$1_$2

# INPLACE_BIN etc. might be empty if we're cleaning
ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
ifneq "$$(BINDIST)" "YES"
$1/$2/$$($1_$2_PROG).prl: $1/$$($1_PERL_SRC) $$$$(unlit_INPLACE) | $$$$(dir $$$$@)/.
	"$$(unlit_INPLACE)" $$(UNLIT_OPTS) $$< $$@
endif

$1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl
	$$(call removeFiles,$$@)
	echo '#!$$(PERL)'                                  >> $$@
	echo '$$$$TARGETPLATFORM  = "$$(TARGETPLATFORM)";' >> $$@
	echo '$$$$TABLES_NEXT_TO_CODE  = "$(GhcEnableTablesNextToCode)";' >> $$@
	cat $$<                                            >> $$@

$$($1_$2_INPLACE): $1/$2/$$($1_$2_PROG) | $$$$(dir $$$$@)/.
	"$$(CP)" $$< $$@
	$$(EXECUTABLE_FILE) $$@

endif

$(call profEnd, build-perl($1,$2))
endef
<commit_msg>Fix installation of ghc-split (#8760)<commit_after># -----------------------------------------------------------------------------
#
# (c) 2009 The University of Glasgow
#
# This file is part of the GHC build system.
#
# To understand how the build system works and how to modify it, see
#      http://ghc.haskell.org/trac/ghc/wiki/Building/Architecture
#      http://ghc.haskell.org/trac/ghc/wiki/Building/Modifying
#
# -----------------------------------------------------------------------------


# Build a perl script.  Invoke like this:
#
# driver/mangler_PERL_SRC = ghc-asm.lprl
# driver/mangler_dist_PROGNAME = ghc-asm
#
# $(eval $(call build-perl,driver/mangler,dist))

define build-perl
$(call trace, build-perl($1,$2))
$(call profStart, build-perl($1,$2))
# $1 = dir
# $2 = distdir

ifneq "$$(CLEANING)" "YES"
ifeq "$$($1_$2_PROGNAME)" ""
$$(error $1_$2_PROGNAME is not set)
endif
ifneq "$$($1_$2_PROG)" ""
$$(error $1_$2_PROG is set)
endif
$1_$2_PROG = $$($1_$2_PROGNAME)

ifneq "$$($$($1_$2_PROG)_INPLACE)" ""
$$(error $$($1_$2_PROG)_INPLACE defined twice)
endif
ifeq "$$($1_$2_TOPDIR)" "YES"
$$($1_$2_PROG)_INPLACE = $$(INPLACE_TOPDIR)/$$($1_$2_PROG)
else
$$($1_$2_PROG)_INPLACE = $$(INPLACE_BIN)/$$($1_$2_PROG)
endif
endif

$1_$2_INPLACE = $$($$($1_$2_PROG)_INPLACE)

$(call all-target,$1_$2,$$($1_$2_INPLACE))

$(call clean-target,$1,$2,$1/$2 $$($1_$2_INPLACE))
.PHONY: clean_$1
clean_$1 : clean_$1_$2

# INPLACE_BIN etc. might be empty if we're cleaning
ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
ifneq "$$(BINDIST)" "YES"
$1/$2/$$($1_$2_PROG).prl: $1/$$($1_PERL_SRC) $$$$(unlit_INPLACE) | $$$$(dir $$$$@)/.
	"$$(unlit_INPLACE)" $$(UNLIT_OPTS) $$< $$@

$1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl
	$$(call removeFiles,$$@)
	echo '#!$$(PERL)'                                  >> $$@
	echo '$$$$TARGETPLATFORM  = "$$(TARGETPLATFORM)";' >> $$@
	echo '$$$$TABLES_NEXT_TO_CODE  = "$(GhcEnableTablesNextToCode)";' >> $$@
	cat $$<                                            >> $$@

$$($1_$2_INPLACE): $1/$2/$$($1_$2_PROG) | $$$$(dir $$$$@)/.
	"$$(CP)" $$< $$@
	$$(EXECUTABLE_FILE) $$@

endif
endif

ifeq "$$($1_$2_INSTALL)" "YES"
ifeq "$$($1_$2_TOPDIR)" "YES"
INSTALL_TOPDIRS  += $$($1_$2_INPLACE)
else
INSTALL_BINS     += $$($1_$2_INPLACE)
endif
endif

$(call profEnd, build-perl($1,$2))
endef

{'fraction_non_alphanumeric': 0.2970965563808238, 'fraction_numerical': 0.03691199639882962, 'mean_word_length': 3.1649484536082473, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4359463', 'n_tokens_mistral': 1936, 'n_tokens_neox': 1878, 'n_words': 315}