<commit_before>TOP = ..
include $(TOP)/mk/boilerplate.mk

INSTALLING=1

SRC_HC_OPTS += -package data -package text -package util -package net -fglasgow-exts -cpp
HS_PROG = haddock.bin

HsParser_HC_OPTS      += -Onot
HaddockParse_HC_OPTS  += -Onot
HaddockVersion_HC_OPTS = -DHADDOCK_VERSION=$(ProjectVersion)

HaddockVersion : ../mk/version.mk

ifeq "$(INSTALLING)" "1"
ifeq "$(BIN_DIST)"   "1"
HADDOCKLIB=$$\"\"libdir/haddock
HADDOCKBIN=$$\"\"libexecdir/$(HS_PROG)
else
ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
# --mixed is only provided by newer versions of cygpath (1.2 doesn't have it, for instance.)
#HADDOCKLIB=$(shell cygpath --mixed $(libdir))
HADDOCKLIB=$(shell cygpath -w $(libdir) | sed -e 's%\\%/%g')
else
HADDOCKLIB=$(libdir)
endif # mingw
HADDOCKBIN=$(libexecdir)/$(HS_PROG)
endif # BIN_DIST
else
ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
# See above comment re: --mixed
#HADDOCKLIB=$(shell cygpath --mixed $(FPTOOLS_TOP_ABS)/haddock/html)
HADDOCKLIB=$(shell cygpath -w $(FPTOOLS_TOP_ABS)/haddock/html | sed -e 's%\\%/%g')
else
HADDOCKLIB=$(FPTOOLS_TOP_ABS)/haddock/html
endif
HADDOCKBIN=$(FPTOOLS_TOP_ABS)/haddock/src/$(HS_PROG)
endif # INSTALLING

HADDOCKLIB=$(shell cygpath -w $(libdir) | sed -e 's%\\%/%g')

HAPPY_OPTS += $(GHC_HAPPY_OPTS)

INSTALLED_SCRIPT_PROG  = haddock-$(ProjectVersion)
INPLACE_SCRIPT_PROG    = haddock-inplace

ifeq "$(INSTALLING)" "1"
TOP_PWD 	:= $(prefix)
SCRIPT_PROG 	=  $(INSTALLED_SCRIPT_PROG)
LINK	 	=  haddock
else
TOP_PWD 	:= $(FPTOOLS_TOP_ABS)
SCRIPT_PROG 	=  $(INPLACE_SCRIPT_PROG)
endif

SCRIPT_OBJS=haddock.sh

INTERP=$(SHELL)

SCRIPT_SUBST_VARS = HADDOCKLIB HADDOCKBIN

INSTALL_SCRIPTS += $(SCRIPT_PROG)<commit_msg>[haddock @ 2003-05-30 17:59:28 by sof] oops, drop test defn from prev commit<commit_after>TOP = ..
include $(TOP)/mk/boilerplate.mk

INSTALLING=1

SRC_HC_OPTS += -package data -package text -package util -package net -fglasgow-exts -cpp
HS_PROG = haddock.bin

HsParser_HC_OPTS      += -Onot
HaddockParse_HC_OPTS  += -Onot
HaddockVersion_HC_OPTS = -DHADDOCK_VERSION=$(ProjectVersion)

HaddockVersion : ../mk/version.mk

ifeq "$(INSTALLING)" "1"
ifeq "$(BIN_DIST)"   "1"
HADDOCKLIB=$$\"\"libdir/haddock
HADDOCKBIN=$$\"\"libexecdir/$(HS_PROG)
else
ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
# --mixed is only provided by newer versions of cygpath (1.2 doesn't have it, for instance.)
#HADDOCKLIB=$(shell cygpath --mixed $(libdir))
HADDOCKLIB=$(shell cygpath -w $(libdir) | sed -e 's%\\%/%g')
else
HADDOCKLIB=$(libdir)
endif # mingw
HADDOCKBIN=$(libexecdir)/$(HS_PROG)
endif # BIN_DIST
else
ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
# See above comment re: --mixed
#HADDOCKLIB=$(shell cygpath --mixed $(FPTOOLS_TOP_ABS)/haddock/html)
HADDOCKLIB=$(shell cygpath -w $(FPTOOLS_TOP_ABS)/haddock/html | sed -e 's%\\%/%g')
else
HADDOCKLIB=$(FPTOOLS_TOP_ABS)/haddock/html
endif
HADDOCKBIN=$(FPTOOLS_TOP_ABS)/haddock/src/$(HS_PROG)
endif # INSTALLING

HAPPY_OPTS += $(GHC_HAPPY_OPTS)

INSTALLED_SCRIPT_PROG  = haddock-$(ProjectVersion)
INPLACE_SCRIPT_PROG    = haddock-inplace

ifeq "$(INSTALLING)" "1"
TOP_PWD 	:= $(prefix)
SCRIPT_PROG 	=  $(INSTALLED_SCRIPT_PROG)
LINK	 	=  haddock
else
TOP_PWD 	:= $(FPTOOLS_TOP_ABS)
SCRIPT_PROG 	=  $(INPLACE_SCRIPT_PROG)
endif

SCRIPT_OBJS=haddock.sh

INTERP=$(SHELL)

SCRIPT_SUBST_VARS = HADDOCKLIB HADDOCKBIN

INSTALL_SCRIPTS += $(SCRIPT_PROG)
{'fraction_non_alphanumeric': 0.15462384775498067, 'fraction_numerical': 0.01367826345524829, 'mean_word_length': 5.481695568400771, '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': '6383821', 'n_tokens_mistral': 1557, 'n_tokens_neox': 1443, 'n_words': 265}