# 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:
-include $(TOP)/mk/paths.mk
-include $(TOP)/mk/opts.mk
--include $(TOP)/mk/version.mk
-include $(TOP)/mk/suffix.mk
# -----------------------------------------------------------------
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
-datadir = @datadir@/$(ProjectNameShort)-$(ProjectVersion)
+datadir = @datadir@
#sysconfdir = @datadir@
#sharedstatedir = @sharedstatedir@
#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