Prepare filesystem support for letting users override standard location

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@24520 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2007-02-13 05:19:49 +00:00
parent a040cad73e
commit bf377da117
4 changed files with 232 additions and 73 deletions

View file

@ -1,3 +1,12 @@
2007-02-13 Nicola Pero <nicola.pero@meta-innovation.com>,
Matt Rice <ratmice@gmail.com>,
* GNUmakefile.in (MAKE_FILES): Added filesystem.make.
* filesystem.make: New file.
* common.make: Include the new file. Rewritten code that
determines the installation directories. Use the information from
filesystem.make when required.
2007-02-13 Nicola Pero <nicola.pero@meta-innovation.com>
* Master/rules.make (internal-check-install-permissions): Only use
@ -34,7 +43,7 @@
version number on the top-level invocation.
2007-02-12 Nicola Pero <nicola.pero@meta-innovation.com>,
Matt Rice <ratmice@gmail.com>,
Matt Rice <ratmice@gmail.com>
This change in the API is needed for resource-set.make to work
with the new filesystem layouts.

View file

@ -81,7 +81,7 @@ VERTAG = $(subst .,_,$(GNUSTEP_MAKE_VERSION))
SVNPREFIX=svn+ssh://svn.gna.org/svn/gnustep/tools/make
MAKE_FILES = aggregate.make application.make bundle.make service.make \
common.make library-combo.make java.make jni.make library.make \
common.make filesystem.make library-combo.make java.make jni.make library.make \
messages.make rules.make target.make names.make resource-set.make \
tool.make ctool.make test-library.make \
objc.make test-application.make test-tool.make subproject.make \

View file

@ -92,7 +92,7 @@ endif
#
# Sanity checks - only performed at the first make invocation
#
# FIXME - these checks should probably be removed and/or rewritten.
# FIXME - the sanity checks should probably be removed and/or rewritten.
#
# Please note that _GNUSTEP_TOP_INVOCATION_DONE is set by the first
@ -167,6 +167,11 @@ endif
#
include $(GNUSTEP_MAKEFILES)/target.make
#
# Now load the filesystem locations.
#
include $(GNUSTEP_MAKEFILES)/filesystem.make
#
# GNUSTEP_INSTALLATION_DOMAIN is the domain where all things go. This
# is the variable you should use to specify where you want things to
@ -191,10 +196,11 @@ endif
endif
#
# GNUSTEP_INSTALLATION_DIR is an older mechanism for specifying
# where things should be installed. It is expected to be a
# GNUSTEP_INSTALLATION_DIR is an older/different mechanism for
# specifying where things should be installed. It is expected to be a
# fixed absolute path rather than a logical domain. You shouldn't
# normally use it, but might be handy if you need to force things.
# normally use it, but might be handy if you need to force things
# and you're using the GNUstep filesystem structure.
#
# If GNUSTEP_INSTALLATION_DIR is set, we automatically install
# everything in the GNUstep filesystem domain structure in the
@ -203,52 +209,91 @@ endif
# GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT).
#
# Please note that GNUSTEP_INSTALLATION_DIR overrides
# GNUSTEP_INSTALLATION_DOMAIN.
#
#
# This is a temporary implementation that only supports the GNUstep
# filesystem structure. So we just convert
# GNUSTEP_INSTALLATION_DOMAIN into a GNUSTEP_INSTALLATION_DIR, and
# then use GNUSTEP_INSTALLATION_DIR later on to define all the install
# locations.
# GNUSTEP_INSTALLATION_DOMAIN, so if you want to use
# GNUSTEP_INSTALLATION_DOMAIN, make sure you're not setting
# GNUSTEP_INSTALLATION_DIR.
#
# GNUSTEP_INSTALLATION_DIR overrides GNUSTEP_INSTALLATION_DOMAIN
ifeq ($(GNUSTEP_INSTALLATION_DIR),)
ifeq ($(GNUSTEP_INSTALLATION_DOMAIN), SYSTEM)
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
ifneq ($(GNUSTEP_INSTALLATION_DIR),)
# This is the case where we install things using a standard
# GNUstep filesystem rooted in GNUSTEP_INSTALLATION_DIR.
# This is not recommended since it does not work with custom
# filesystem configurations.
#
# DESTDIR allows you to relocate the entire installation somewhere else
# (as per GNU Coding Standards).
#
# Add DESTDIR as a prefix to GNUSTEP_INSTALLATION_DIR, but only if we're
# at the first top-level invocation. Else we risk adding it multiple
# times ;-)
#
ifeq ($(_GNUSTEP_TOP_INVOCATION_DONE),)
ifneq ($(DESTDIR),)
override GNUSTEP_INSTALLATION_DIR := $(DESTDIR)/$(GNUSTEP_INSTALLATION_DIR)
endif
endif
ifeq ($(GNUSTEP_INSTALLATION_DOMAIN), LOCAL)
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_LOCAL_ROOT)
# Make it public and available to all submakes invocations
export GNUSTEP_INSTALLATION_DIR
# Use GNUSTEP_INSTALLATION_DIR to set the installation dirs
GNUSTEP_APPS = $(GNUSTEP_INSTALLATION_DIR)/Applications
GNUSTEP_TOOLS = $(GNUSTEP_INSTALLATION_DIR)/Tools
GNUSTEP_LIBRARY = $(GNUSTEP_INSTALLATION_DIR)/Library
GNUSTEP_SERVICES = $(GNUSTEP_LIBRARY)/Services
ifeq ($(GNUSTEP_IS_FLATTENED),yes)
GNUSTEP_HEADERS = $(GNUSTEP_INSTALLATION_DIR)/Library/Headers
else
GNUSTEP_HEADERS = $(GNUSTEP_INSTALLATION_DIR)/Library/Headers/$(LIBRARY_COMBO)
endif
GNUSTEP_APPLICATION_SUPPORT = $(GNUSTEP_LIBRARY)/ApplicationSupport
GNUSTEP_BUNDLES = $(GNUSTEP_LIBRARY)/Bundles
GNUSTEP_FRAMEWORKS = $(GNUSTEP_LIBRARY)/Frameworks
GNUSTEP_PALETTES = $(GNUSTEP_LIBRARY)/ApplicationSupport/Palettes
GNUSTEP_LIBRARIES = $(GNUSTEP_INSTALLATION_DIR)/Library/Libraries
GNUSTEP_RESOURCES = $(GNUSTEP_LIBRARY)/Libraries/Resources
GNUSTEP_JAVA = $(GNUSTEP_LIBRARY)/Libraries/Java
GNUSTEP_DOCUMENTATION = $(GNUSTEP_LIBRARY)/Documentation
GNUSTEP_DOCUMENTATION_MAN = $(GNUSTEP_DOCUMENTATION)/man
GNUSTEP_DOCUMENTATION_INFO = $(GNUSTEP_DOCUMENTATION)/info
else
# This is the case where we install things in GNUSTEP_INSTALLATION_DOMAIN
# according to the (potentially custom) filesystem configuration of
# that domain. This is the recommended way.
# Make it public and available to all submakes invocations
export GNUSTEP_INSTALLATION_DOMAIN
# Use DESTDIR + GNUSTEP_INSTALLATION_DOMAIN to set the installation dirs
ifeq ($(DESTDIR),)
MAYBE_DESTDIR=
else
MAYBE_DESTDIR=$(DESTDIR)/
endif
ifeq ($(GNUSTEP_INSTALLATION_DOMAIN), NETWORK)
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_NETWORK_ROOT)
endif
GNUSTEP_APPS = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_APPS)
GNUSTEP_TOOLS = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_TOOLS)
GNUSTEP_LIBRARY = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_LIBRARY)
GNUSTEP_SERVICES = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_SERVICES)
GNUSTEP_HEADERS = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_HEADERS)
GNUSTEP_APPLICATION_SUPPORT = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_APPLICATION_SUPPORT)
GNUSTEP_BUNDLES = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_BUNDLES)
GNUSTEP_FRAMEWORKS = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_FRAMEWORKS)
GNUSTEP_PALETTES = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_PALETTES)
GNUSTEP_LIBRARIES = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_LIBRARIES)
GNUSTEP_RESOURCES = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_RESOURCES)
GNUSTEP_JAVA = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_JAVA)
GNUSTEP_DOCUMENTATION = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_DOCUMENTATION)
GNUSTEP_DOCUMENTATION_MAN = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_DOCUMENTATION_MAN)
GNUSTEP_DOCUMENTATION_INFO = $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_DOCUMENTATION_INFO)
ifeq ($(GNUSTEP_INSTALLATION_DOMAIN), USER)
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_USER_ROOT)
endif
endif
#
# DESTDIR allows you to relocate the entire installation somewhere else
# (as per GNU Coding Standards).
#
# Add DESTDIR as a prefix to GNUSTEP_INSTALLATION_DIR, but only if we're
# at the first top-level invocation. Else we risk adding it multiple
# times ;-)
#
ifeq ($(_GNUSTEP_TOP_INVOCATION_DONE),)
ifneq ($(DESTDIR),)
override GNUSTEP_INSTALLATION_DIR := $(DESTDIR)/$(GNUSTEP_INSTALLATION_DIR)
endif
endif
# Make it public and available to all submakes invocations
export GNUSTEP_INSTALLATION_DIR
#
# INSTALL_ROOT_DIR is the obsolete way of relocating stuff. It used
@ -270,37 +315,6 @@ ifneq ($(DESTDIR),)
endif
endif
#
# Variables specifying the installation directory paths.
#
# TODO: To support the 'native' filesystem structure, a list of such
# memorable directory locations will be stored in GNUstep.conf. This
# list might (FIXME) presumably follow the GNU Coding Standards for
# install locations (eg, bindir, etc) if it makes sense. Then we set
# the following variables by using the install locations from
# GNUstep.conf that are relevant to the domain where we are installing
# to.
#
GNUSTEP_APPS = $(GNUSTEP_INSTALLATION_DIR)/Applications
GNUSTEP_TOOLS = $(GNUSTEP_INSTALLATION_DIR)/Tools
GNUSTEP_LIBRARY = $(GNUSTEP_INSTALLATION_DIR)/Library
GNUSTEP_SERVICES = $(GNUSTEP_LIBRARY)/Services
ifeq ($(GNUSTEP_IS_FLATTENED),yes)
GNUSTEP_HEADERS = $(GNUSTEP_INSTALLATION_DIR)/Library/Headers
else
GNUSTEP_HEADERS = $(GNUSTEP_INSTALLATION_DIR)/Library/Headers/$(LIBRARY_COMBO)
endif
GNUSTEP_APPLICATION_SUPPORT = $(GNUSTEP_LIBRARY)/ApplicationSupport
GNUSTEP_BUNDLES = $(GNUSTEP_LIBRARY)/Bundles
GNUSTEP_FRAMEWORKS = $(GNUSTEP_LIBRARY)/Frameworks
GNUSTEP_PALETTES = $(GNUSTEP_LIBRARY)/ApplicationSupport/Palettes
GNUSTEP_LIBRARIES = $(GNUSTEP_INSTALLATION_DIR)/Library/Libraries
GNUSTEP_RESOURCES = $(GNUSTEP_LIBRARY)/Libraries/Resources
GNUSTEP_JAVA = $(GNUSTEP_LIBRARY)/Libraries/Java
GNUSTEP_DOCUMENTATION = $(GNUSTEP_LIBRARY)/Documentation
GNUSTEP_DOCUMENTATION_MAN = $(GNUSTEP_DOCUMENTATION)/man
GNUSTEP_DOCUMENTATION_INFO = $(GNUSTEP_DOCUMENTATION)/info
# The default name of the makefile to be used in recursive invocations of make
ifeq ($(MAKEFILE_NAME),)
MAKEFILE_NAME = GNUmakefile

136
filesystem.make Normal file
View file

@ -0,0 +1,136 @@
#
# filesystem.make
#
# Sets up the filesystem paths
#
# Copyright (C) 2007 Free Software Foundation, Inc.
#
# Author: Nicola Pero <nicola.pero@meta-innovation.com>,
# Matt Rice <ratmice@gmail.com>,
#
# Date: February 2007
#
# This file is part of the GNUstep Makefile Package.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# You should have received a copy of the GNU General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# We make sure that all the interesting paths in all domains are
# defined. Having this is a great help in iterating over header dirs,
# for example.
#
# PS: If you change this list, make sure that top update the list of
# paths used in common.make when GNUSTEP_INSTALLATION_DIR is set.
#
#
# We use '?=' to only set variables that have not already been set
# by the user in the config files (that should be read before
# this file). So, this describes the GNUstep filesystem default
# that is automatically used when the config file is missing some
# settings.
#
# We keep the list in this simple format (instead of generating it
# from functions, for example) to make it very easy to read for
# everyone.
#
#
# SYSTEM domain
#
GNUSTEP_SYSTEM_APPS ?= $(GNUSTEP_SYSTEM_ROOT)/Applications
GNUSTEP_SYSTEM_TOOLS ?= $(GNUSTEP_SYSTEM_ROOT)/Tools
GNUSTEP_SYSTEM_LIBRARY ?= $(GNUSTEP_SYSTEM_ROOT)/Library
GNUSTEP_SYSTEM_SERVICES ?= $(GNUSTEP_SYSTEM_LIBRARY)/Services
ifeq ($(GNUSTEP_IS_FLATTENED),yes)
GNUSTEP_SYSTEM_HEADERS ?= $(GNUSTEP_SYSTEM_ROOT)/Library/Headers
else
GNUSTEP_SYSTEM_HEADERS ?= $(GNUSTEP_SYSTEM_ROOT)/Library/Headers/$(LIBRARY_COMBO)
endif
GNUSTEP_SYSTEM_APPLICATION_SUPPORT ?= $(GNUSTEP_SYSTEM_LIBRARY)/ApplicationSupport
GNUSTEP_SYSTEM_BUNDLES ?= $(GNUSTEP_SYSTEM_LIBRARY)/Bundles
GNUSTEP_SYSTEM_FRAMEWORKS ?= $(GNUSTEP_SYSTEM_LIBRARY)/Frameworks
GNUSTEP_SYSTEM_PALETTES ?= $(GNUSTEP_SYSTEM_LIBRARY)/ApplicationSupport/Palettes
GNUSTEP_SYSTEM_LIBRARIES ?= $(GNUSTEP_SYSTEM_ROOT)/Library/Libraries
GNUSTEP_SYSTEM_RESOURCES ?= $(GNUSTEP_SYSTEM_LIBRARY)/Libraries/Resources
GNUSTEP_SYSTEM_JAVA ?= $(GNUSTEP_SYSTEM_LIBRARY)/Libraries/Java
GNUSTEP_SYSTEM_DOCUMENTATION ?= $(GNUSTEP_SYSTEM_LIBRARY)/Documentation
GNUSTEP_SYSTEM_DOCUMENTATION_MAN ?= $(GNUSTEP_SYSTEM_DOCUMENTATION)/man
GNUSTEP_SYSTEM_DOCUMENTATION_INFO ?= $(GNUSTEP_SYSTEM_DOCUMENTATION)/info
#
# LOCAL domain
#
GNUSTEP_LOCAL_APPS ?= $(GNUSTEP_LOCAL_ROOT)/Applications
GNUSTEP_LOCAL_TOOLS ?= $(GNUSTEP_LOCAL_ROOT)/Tools
GNUSTEP_LOCAL_LIBRARY ?= $(GNUSTEP_LOCAL_ROOT)/Library
GNUSTEP_LOCAL_SERVICES ?= $(GNUSTEP_LOCAL_LIBRARY)/Services
ifeq ($(GNUSTEP_IS_FLATTENED),yes)
GNUSTEP_LOCAL_HEADERS ?= $(GNUSTEP_LOCAL_ROOT)/Library/Headers
else
GNUSTEP_LOCAL_HEADERS ?= $(GNUSTEP_LOCAL_ROOT)/Library/Headers/$(LIBRARY_COMBO)
endif
GNUSTEP_LOCAL_APPLICATION_SUPPORT ?= $(GNUSTEP_LOCAL_LIBRARY)/ApplicationSupport
GNUSTEP_LOCAL_BUNDLES ?= $(GNUSTEP_LOCAL_LIBRARY)/Bundles
GNUSTEP_LOCAL_FRAMEWORKS ?= $(GNUSTEP_LOCAL_LIBRARY)/Frameworks
GNUSTEP_LOCAL_PALETTES ?= $(GNUSTEP_LOCAL_LIBRARY)/ApplicationSupport/Palettes
GNUSTEP_LOCAL_LIBRARIES ?= $(GNUSTEP_LOCAL_ROOT)/Library/Libraries
GNUSTEP_LOCAL_RESOURCES ?= $(GNUSTEP_LOCAL_LIBRARY)/Libraries/Resources
GNUSTEP_LOCAL_JAVA ?= $(GNUSTEP_LOCAL_LIBRARY)/Libraries/Java
GNUSTEP_LOCAL_DOCUMENTATION ?= $(GNUSTEP_LOCAL_LIBRARY)/Documentation
GNUSTEP_LOCAL_DOCUMENTATION_MAN ?= $(GNUSTEP_LOCAL_DOCUMENTATION)/man
GNUSTEP_LOCAL_DOCUMENTATION_INFO ?= $(GNUSTEP_LOCAL_DOCUMENTATION)/info
#
# NETWORK domain
#
GNUSTEP_NETWORK_APPS ?= $(GNUSTEP_NETWORK_ROOT)/Applications
GNUSTEP_NETWORK_TOOLS ?= $(GNUSTEP_NETWORK_ROOT)/Tools
GNUSTEP_NETWORK_LIBRARY ?= $(GNUSTEP_NETWORK_ROOT)/Library
GNUSTEP_NETWORK_SERVICES ?= $(GNUSTEP_NETWORK_LIBRARY)/Services
ifeq ($(GNUSTEP_IS_FLATTENED),yes)
GNUSTEP_NETWORK_HEADERS ?= $(GNUSTEP_NETWORK_ROOT)/Library/Headers
else
GNUSTEP_NETWORK_HEADERS ?= $(GNUSTEP_NETWORK_ROOT)/Library/Headers/$(LIBRARY_COMBO)
endif
GNUSTEP_NETWORK_APPLICATION_SUPPORT ?= $(GNUSTEP_NETWORK_LIBRARY)/ApplicationSupport
GNUSTEP_NETWORK_BUNDLES ?= $(GNUSTEP_NETWORK_LIBRARY)/Bundles
GNUSTEP_NETWORK_FRAMEWORKS ?= $(GNUSTEP_NETWORK_LIBRARY)/Frameworks
GNUSTEP_NETWORK_PALETTES ?= $(GNUSTEP_NETWORK_LIBRARY)/ApplicationSupport/Palettes
GNUSTEP_NETWORK_LIBRARIES ?= $(GNUSTEP_NETWORK_ROOT)/Library/Libraries
GNUSTEP_NETWORK_RESOURCES ?= $(GNUSTEP_NETWORK_LIBRARY)/Libraries/Resources
GNUSTEP_NETWORK_JAVA ?= $(GNUSTEP_NETWORK_LIBRARY)/Libraries/Java
GNUSTEP_NETWORK_DOCUMENTATION ?= $(GNUSTEP_NETWORK_LIBRARY)/Documentation
GNUSTEP_NETWORK_DOCUMENTATION_MAN ?= $(GNUSTEP_NETWORK_DOCUMENTATION)/man
GNUSTEP_NETWORK_DOCUMENTATION_INFO ?= $(GNUSTEP_NETWORK_DOCUMENTATION)/info
#
# USER domain
#
GNUSTEP_USER_APPS ?= $(GNUSTEP_USER_ROOT)/Applications
GNUSTEP_USER_TOOLS ?= $(GNUSTEP_USER_ROOT)/Tools
GNUSTEP_USER_LIBRARY ?= $(GNUSTEP_USER_ROOT)/Library
GNUSTEP_USER_SERVICES ?= $(GNUSTEP_USER_LIBRARY)/Services
ifeq ($(GNUSTEP_IS_FLATTENED),yes)
GNUSTEP_USER_HEADERS ?= $(GNUSTEP_USER_ROOT)/Library/Headers
else
GNUSTEP_USER_HEADERS ?= $(GNUSTEP_USER_ROOT)/Library/Headers/$(LIBRARY_COMBO)
endif
GNUSTEP_USER_APPLICATION_SUPPORT ?= $(GNUSTEP_USER_LIBRARY)/ApplicationSupport
GNUSTEP_USER_BUNDLES ?= $(GNUSTEP_USER_LIBRARY)/Bundles
GNUSTEP_USER_FRAMEWORKS ?= $(GNUSTEP_USER_LIBRARY)/Frameworks
GNUSTEP_USER_PALETTES ?= $(GNUSTEP_USER_LIBRARY)/ApplicationSupport/Palettes
GNUSTEP_USER_LIBRARIES ?= $(GNUSTEP_USER_ROOT)/Library/Libraries
GNUSTEP_USER_RESOURCES ?= $(GNUSTEP_USER_LIBRARY)/Libraries/Resources
GNUSTEP_USER_JAVA ?= $(GNUSTEP_USER_LIBRARY)/Libraries/Java
GNUSTEP_USER_DOCUMENTATION ?= $(GNUSTEP_USER_LIBRARY)/Documentation
GNUSTEP_USER_DOCUMENTATION_MAN ?= $(GNUSTEP_USER_DOCUMENTATION)/man
GNUSTEP_USER_DOCUMENTATION_INFO ?= $(GNUSTEP_USER_DOCUMENTATION)/info