Resurrect the "lib" subdirectory in the installation tree, it was somehow lost
[ghc-hetmet.git] / libraries / Makefile
index ac2bde4..2bd80fa 100644 (file)
@@ -209,16 +209,6 @@ configure: $(foreach SUBDIR,$(SUBDIRS), \
 #     "C:\\Program Files\\Common Files"
 # on Windows
 
-# We also set libsubdir differently on Windows and non-Windows, as on
-# non-Windows the path we deduce is higher up than the path passed to
-# 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"
-libsubdir      = $$pkgid
-else
-libsubdir      = $$compiler/lib/$$pkgid
-endif
-
 # We rely on all the CONFIGURE_ARGS being quoted with '...', and there
 # being no 's inside the values.
 FLAGGED_CONFIGURE_ARGS = $(subst $(space)',\
@@ -233,8 +223,8 @@ stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).%: %/setup/Setup
                   $(CONFIGURE_OPTS) \
                   --prefix='$$topdir' \
                   --bindir='$(bindir)' \
-                  --libdir='$(libdir)' \
-                  --libsubdir='$(libsubdir)' \
+                  --libdir='$(libdir)/lib' \
+                  --libsubdir='$$pkgid' \
                   --libexecdir='$(libexecdir)' \
                   --datadir='$(datadir)' \
                   --docdir='$(docdir)' \
@@ -250,7 +240,7 @@ stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).%: %/setup/Setup
              && touch $@ || touch $*/unbuildable
 # We don't touch $@ if configure failed as we would prefer to try
 # configuring it next time round, rather than assuming it'll still fail.
-# This is particularly important for corelibs, where failure means the
+# This is particularly important for bootlibs, where failure means the
 # build dies!
 
 # Build the library using 'make'
@@ -305,6 +295,9 @@ clean: $(foreach SUBDIR,$(SUBDIRS),clean.library.$(SUBDIR))
        $(RM) -rf installPackage
        $(RM) -f libraries.txt index.html doc-index.html doc-index*.html
 
+distclean:
+       $(RM) $(foreach lib, $(SUBDIRS), $(lib)/.depend $(lib)/.depend.bak)
+
 $(foreach SUBDIR,$(SUBDIRS),clean.library.$(SUBDIR)): \
 clean.library.%:
        $(RM) -f stamp/configure.library.*.$* $*/unbuildable
@@ -346,7 +339,7 @@ $(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR)): \
 install.library.%: installPackage/installPackage ifBuildable/ifBuildable
        if ifBuildable/ifBuildable $*; then \
          cd $* && \
-         ../installPackage/installPackage '$(DESTDIR)' '$(prefix)' '$(bindir)' '$(libdir)' '$(libexecdir)' '$(datadir)' '$(docdir)' '$(htmldir_install)' '$(GHC_PKG_PROG)' '$(DESTDIR)$(libdir)/package.conf' ; \
+         ../installPackage/installPackage '$(DESTDIR)' '$(prefix)' '$(bindir)' '$(libdir)/lib' '$(libexecdir)' '$(datadir)' '$(docdir)' '$(htmldir_install)' '$(htmldir_configure)' '$(GHC_PKG_PROG)' '$(DESTDIR)$(libdir)/package.conf' ; \
        fi
 
 .PHONY: binary-dist binary-dist.library.%