[project @ 2005-01-20 14:22:26 by simonmar]
authorsimonmar <unknown>
Thu, 20 Jan 2005 14:22:26 +0000 (14:22 +0000)
committersimonmar <unknown>
Thu, 20 Jan 2005 14:22:26 +0000 (14:22 +0000)
Fill in the haddock-interfaces and haddock-html fields in the
package.conf files.

To do this I had to make some changes:

  - haddock-interfaces requires the value of $(datadir).  We can't
    just plug this in, because $(datadir) might change at install-time
    (eg. a Windows installer can be placed anywhere, as can a Unix
    binary .tar.gz distribution).  The current trick is for the
    compiler to splice in the value of $libdir in package.conf at
    runtime.  So we could extend this mechanism and tell the compiler
    the value of $datadir via a command-line option, but that seems
    ugly.

    On Windows, $datadir==$libdir, so we don't need any changes:
    package.conf still uses $libdir, and a Windows installation is
    independent of its absolute location.  Even 'make install' on
    Windows should have this property.

    On Unix:
- for 'make install' and in-place execution, we just use
          absolute paths in package.conf

- for a binary dist, we generate a package.conf that refers
  to $libdir and $datadir, and splice in the values at
  install-time (distrib/Makefile-bin.in).

  - Also, I renamed $libdir to $topdir to more closely reflect its
    actual meaning.  This is somewhat malicious in that it will flush
    out all those clients using $libdir when they really shouldn't
    be :-)

package.conf.in

index 4f59dc5..df4b3db 100644 (file)
@@ -163,11 +163,9 @@ hidden-modules:
 
 import-dirs:   IMPORT_DIR
 
-#ifdef INSTALLING
-library-dirs:  "$libdir"
-#else
-library-dirs:  "$libdir/libraries/base",
-               "$libdir/libraries/base/cbits"
+library-dirs:  LIB_DIR
+#ifndef INSTALLING
+               , LIB_DIR"/cbits"
 #endif
 
 #if !defined(mingw32_TARGET_OS) && !defined(cygwin32_TARGET_OS)
@@ -187,12 +185,7 @@ extra-libs:  "HSbase_cbits"
             , "wsock32", "msvcrt", "kernel32", "user32", "shell32"
 #endif
 
-#ifdef INSTALLING
-include-dirs:
-#else
-include-dirs: "$libdir/libraries/base/include"
-#endif
-
+include-dirs:          INCLUDE_DIR
 includes:              HsBase.h
 depends:               rts
 extra-hugs-opts:
@@ -200,5 +193,5 @@ extra-cc-opts:
 extra-ld-opts:
 framework-dirs:
 extra-frameworks:
-haddock-interfaces:
-haddock-html:
+haddock-interfaces:    HADDOCK_IFACE
+haddock-html:          HTML_DIR