[project @ 2001-06-28 09:57:32 by simonmar]
authorsimonmar <unknown>
Thu, 28 Jun 2001 09:57:33 +0000 (09:57 +0000)
committersimonmar <unknown>
Thu, 28 Jun 2001 09:57:33 +0000 (09:57 +0000)
include version.mk before boilerplate.mk, so that boilerplate.mk has
the project name and version available.

Override libdir and datadir in fptools/mk/config.mk to add the project
name and version.

Suggested by: Manuel

ghc/mk/boilerplate.mk
mk/config.mk.in

index c1b736a..4a4ea32 100644 (file)
@@ -10,6 +10,8 @@
 # Remember, TOP is the top level of the innermost level
 # (FPTOOLS_TOP is the fptools top)
 
+-include $(TOP)/mk/version.mk
+
 # We need to set TOP to be the TOP that the next level up expects!
 # The TOP variable is reset after the inclusion of the fptools
 # boilerplate, so we stash TOP away first:
@@ -28,7 +30,6 @@ TOP:=$(GHC_TOP)
 
 -include $(TOP)/mk/paths.mk
 -include $(TOP)/mk/opts.mk
--include $(TOP)/mk/version.mk
 -include $(TOP)/mk/suffix.mk
 
 # -----------------------------------------------------------------
index dfa9a9b..89b7739 100644 (file)
@@ -434,7 +434,7 @@ FPTOOLS_TOP_ABS_UNIX    = @hardtop@
 prefix                 = @prefix@
 exec_prefix            = @exec_prefix@
 bindir                 = @bindir@
-datadir                        = @datadir@/$(ProjectNameShort)-$(ProjectVersion)
+datadir                        = @datadir@
 
 #sysconfdir            = @datadir@
 #sharedstatedir                = @sharedstatedir@
@@ -447,6 +447,13 @@ mandir                     = @mandir@
 #UNUSED:infodir                = @infodir@
 #UNUSED:srcdir          = @srcdir@
 
+#
+# override libdir and datadir to put project-specific stuff in
+# a subdirectory with the version number included.
+#
+libdir     := $(if $(ProjectNameShort), $(libdir), $(libdir))
+datadir    := $(if $(ProjectNameShort), $(datadir)/$(ProjectNameShort)-$(ProjectVersion), $(datadir))
+
 # 
 # Default values for most of the above are only set if
 # they weren't configured to anything in particular