From 4871afef95d1a9bf9d83889a08aaaa10227b57d2 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 28 Jun 2001 09:57:33 +0000 Subject: [PATCH] [project @ 2001-06-28 09:57:32 by simonmar] 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 | 3 ++- mk/config.mk.in | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ghc/mk/boilerplate.mk b/ghc/mk/boilerplate.mk index c1b736a..4a4ea32 100644 --- a/ghc/mk/boilerplate.mk +++ b/ghc/mk/boilerplate.mk @@ -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 # ----------------------------------------------------------------- diff --git a/mk/config.mk.in b/mk/config.mk.in index dfa9a9b..89b7739 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -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 -- 1.7.10.4