# make doesn't give us an easy way to get the libraries built in
# dependency order the first time, but not rebuild base (for example)
# when we want to rebuild another library later.
# make doesn't give us an easy way to get the libraries built in
# dependency order the first time, but not rebuild base (for example)
# when we want to rebuild another library later.
-# We explicitly set datadir to "$prefix/share" as, while that is the
-# default on Linux, on Windows it defaults to
-# "C:\\Program Files\\Common Files"
+# We explicitly set datadir to a sensible value, as Cabal (used to?) use
+# "C:\\Program Files\\Common Files"
+# on Windows
# the executable with the shell script on non-Windows. This should
# probably be tidied up so that we can always pass the same libsubdir.
ifeq "$(Windows)" "YES"
# the executable with the shell script on non-Windows. This should
# probably be tidied up so that we can always pass the same libsubdir.
ifeq "$(Windows)" "YES"
# We rely on all the CONFIGURE_ARGS being quoted with '...', and there
# being no 's inside the values.
# We rely on all the CONFIGURE_ARGS being quoted with '...', and there
# being no 's inside the values.
--libsubdir='$(libsubdir)' \
--with-compiler=../../compiler/stage1/ghc-inplace$ \
--with-hc-pkg=../../utils/ghc-pkg/ghc-pkg-inplace$ \
--with-hsc2hs=../../utils/hsc2hs/hsc2hs-inplace \
--with-ld=$(LD) \
--libsubdir='$(libsubdir)' \
--with-compiler=../../compiler/stage1/ghc-inplace$ \
--with-hc-pkg=../../utils/ghc-pkg/ghc-pkg-inplace$ \
--with-hsc2hs=../../utils/hsc2hs/hsc2hs-inplace \
--with-ld=$(LD) \
--use-index=../doc-index.html" \
$(FLAGGED_CONFIGURE_ARGS) \
--configure-option=--with-cc=$(CC) ) \
--use-index=../doc-index.html" \
$(FLAGGED_CONFIGURE_ARGS) \
--configure-option=--with-cc=$(CC) ) \
doc.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \
%/setup/Setup ifBuildable/ifBuildable
if ifBuildable/ifBuildable $*; then \
doc.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \
%/setup/Setup ifBuildable/ifBuildable
if ifBuildable/ifBuildable $*; then \
install: $(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR))
ifeq "$(HADDOCK_DOCS)" "YES"
install: $(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR))
ifeq "$(HADDOCK_DOCS)" "YES"
- $(INSTALL_DIR) $(DOC_ROOT)
- $(INSTALL_DATA) index.html doc-index.html $(DOC_ROOT)
- $(INSTALL_SCRIPT) gen_contents_index $(DOC_ROOT)
+ $(INSTALL_DIR) $(DESTDIR)$(libraryhtmldir)
+ $(INSTALL_DATA) index.html doc-index.html $(DESTDIR)$(libraryhtmldir)
+ $(INSTALL_SCRIPT) gen_contents_index $(DESTDIR)$(libraryhtmldir)
- $(INSTALL_DATA) $(DOC_ROOT)/base/*.css $(DOC_ROOT)
- $(INSTALL_DATA) $(DOC_ROOT)/base/*.js $(DOC_ROOT)
- $(INSTALL_DATA) $(DOC_ROOT)/base/*.gif $(DOC_ROOT)
+ $(INSTALL_DATA) $(DESTDIR)$(libraryhtmldir)/base/*.css $(DESTDIR)$(libraryhtmldir)
+ $(INSTALL_DATA) $(DESTDIR)$(libraryhtmldir)/base/*.js $(DESTDIR)$(libraryhtmldir)
+ $(INSTALL_DATA) $(DESTDIR)$(libraryhtmldir)/base/*.gif $(DESTDIR)$(libraryhtmldir)
install.library.%: installPackage/installPackage ifBuildable/ifBuildable
if ifBuildable/ifBuildable $*; then \
cd $* && \
install.library.%: installPackage/installPackage ifBuildable/ifBuildable
if ifBuildable/ifBuildable $*; then \
cd $* && \
mkdir $(BIN_DIST_LIBDIR)/ifBuildable
cp ifBuildable/ifBuildable $(BIN_DIST_LIBDIR)/ifBuildable
cp Makefile $(BIN_DIST_LIBDIR)
mkdir $(BIN_DIST_LIBDIR)/ifBuildable
cp ifBuildable/ifBuildable $(BIN_DIST_LIBDIR)/ifBuildable
cp Makefile $(BIN_DIST_LIBDIR)
cp gen_contents_index $(BIN_DIST_LIBDIR)
cp index.html $(BIN_DIST_LIBDIR)
cp doc-index.html $(BIN_DIST_LIBDIR)
cp gen_contents_index $(BIN_DIST_LIBDIR)
cp index.html $(BIN_DIST_LIBDIR)
cp doc-index.html $(BIN_DIST_LIBDIR)
- cp -a dist $(BIN_DIST_LIBDIR)/$* && \
- # Euch \
- (cp -aL include $(BIN_DIST_LIBDIR)/$* || :) && \
+ cp LICENSE $(BIN_DIST_LIBDIR)/$* && \
+ cp -R dist $(BIN_DIST_LIBDIR)/$* && \
+ (cp -RL include $(BIN_DIST_LIBDIR)/$* || true) && \
$(FIND) $(BIN_DIST_LIBDIR)/$*/dist \
\( -name "*_split" -o -name "autogen" \) | xargs rm -rf && \
$(FIND) $(BIN_DIST_LIBDIR)/$*/dist \
$(FIND) $(BIN_DIST_LIBDIR)/$*/dist \
\( -name "*_split" -o -name "autogen" \) | xargs rm -rf && \
$(FIND) $(BIN_DIST_LIBDIR)/$*/dist \