blob: 903b19e6be4fb2f3a34d431ce575f92b5e8126a4 (
plain) (
tree)
|
|
TOP = ..
include $(TOP)/mk/boilerplate.mk
INSTALLING=1
SRC_HC_OPTS += -package data -package text -package util -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
HADDOCKLIB=$(libdir)
HADDOCKBIN=$(libexecdir)/$(HS_PROG)
endif # BIN_DIST
else
HADDOCKLIB=$(FPTOOLS_TOP_ABS)/haddock/html
HADDOCKBIN=$(FPTOOLS_TOP_ABS)/haddock/src/$(HS_PROG)
endif
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)
INSTALL_LIBEXECS = $(HS_PROG)
# don't recurse on 'make install'
#
ifeq "$(INSTALLING)" "1"
all clean distclean maintainer-clean ::
$(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@
endif
include $(TOP)/mk/target.mk
|