[Add make install, enable auto depend on base-package
Einar Karttunen <ekarttun@cs.helsinki.fi>**20060228152934
 
 This patch enables the auto dependency on the base
 package, which is really needed for an installed
 compiler. Adding --noauto to the command line
 preserves the old behavior.
] hunk ./Makefile 2
+PREFIX=/usr/local
hunk ./Makefile 40
+ifdef DESTDIR
+DP=$(DESTDIR)/$(PREFIX)
+DC=--destdir=$(DESTDIR)
+else
+DP=$(PREFIX)
+DC=
+endif
hunk ./Makefile 48
+install: jhc
+	(cd lib && \
+	 runghc Setup.lhs configure --jhc -w ../jhc --prefix=$(PREFIX) && \
+	 runghc Setup.lhs build && \
+	 runghc Setup.lhs copy $(DC))
+	install -d "$(DP)/bin"
+	install jhc "$(DP)/bin"
+	(cd "$(DP)/bin" && rm -f jhci && ln -s jhc jhci)
+	strip -s "$(DP)/bin/jhc"
+
hunk ./Makefile 118
+	rm -f $@
hunk ./Makefile 124
+	rm -f $@
hunk ./Makefile 132
+	echo '{-# NOINLINE libraryPath #-}'                            >> $@
+	echo 'libraryPath=["$(PREFIX)/lib/jhc-$(JHC_VERSION)"]'        >> $@
+	echo '{-# NOINLINE basePackages #-}'                           >> $@
+	echo 'basePackages=["base-1.0"]'                               >> $@
hunk ./Options.hs 35
-
-basePackages = ["base-0.1", "haskell98-0.1"]
+import Version.Raw(basePackages, libraryPath)
hunk ./Options.hs 83
-    optHlPath      = initialIncludes,
+    optHlPath      = initialIncludes ++ libraryPath,
hunk ./Options.hs 98
-    optNoAuto      = True,
+    optNoAuto      = False,
hunk ./docs/using.txt 28
-=== Installing the libraries ====
+Installation is done with 'gmake install' or for a custom installation
+prefix 'gmake install PREFIX=/foo/bar'. This will install jhc and jhci
+in ${PREFIX}/bin and base libraries in ${PREFIX}/lib, from where they
+are automatically included when needed.
+
+=== Installing the libraries - the old way ====