mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Implemented library resource bundles, with versioning
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@24836 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5264b5d3d6
commit
5fd68fb3c0
6 changed files with 118 additions and 40 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
2007-03-09 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* Instance/Shared/bundle.make: Internal shared bundle install
|
||||
variables have been reorganized to support library resources with
|
||||
versioning.
|
||||
(shared-instance-bundle-install): Rewritten for changes.
|
||||
(shared-instance-bundle-copy_into_dir): Same change.
|
||||
(shared-instance-bundle-uninstall): Same change.
|
||||
* Instance/application.make: Updated GNUSTEP_SHARED_BUNDLE_xxx
|
||||
variables to work with the new stuff.
|
||||
* Instance/bundle.make: Same change.
|
||||
* Instance/tool.make: Same change.
|
||||
* Instance/library.make: Implemented xxx_HAS_RESOURCE_BUNDLE for
|
||||
libraries -- including versioned resources.
|
||||
|
||||
2007-03-09 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
Implemented versioning of Microsoft Windows DLLs. Every DLL now
|
||||
|
|
|
@ -25,28 +25,53 @@
|
|||
#
|
||||
|
||||
#
|
||||
# GNUSTEP_SHARED_BUNDLE_RESOURCE_PATH : the path to the local
|
||||
# resource bundle (this might be a subdirectory of the actual bundle
|
||||
# directory). This path must include GNUSTEP_BUILD_DIR. Resource
|
||||
# files will be copied into this path. For example, for a normal
|
||||
# bundle it would be $(BUNDLE_DIR)/Resources; for an application it
|
||||
# would be $(APP_DIR)/Resources; for a library or a tool,
|
||||
# $(GNUSTEP_BUILD_DIR)/Resources/$(GNUSTEP_INSTANCE). This variable
|
||||
# is used during build, to copy the resources in place.
|
||||
# GNUSTEP_SHARED_BUNDLE_RESOURCE_PATH : this is used when copying
|
||||
# resource files into the bundle. It's the path to the local resource
|
||||
# bundle where all resources will be put (this might be a subdirectory
|
||||
# of the actual bundle directory). This path must include
|
||||
# GNUSTEP_BUILD_DIR. Resource files will be copied into this path.
|
||||
# For example, for a normal bundle it would be
|
||||
# $(BUNDLE_DIR)/Resources; for an application it would be
|
||||
# $(APP_DIR)/Resources; for a library or a tool,
|
||||
# $(GNUSTEP_BUILD_DIR)/Resources/$(GNUSTEP_INSTANCE). This variable
|
||||
# is used during build, to copy the resources in place.
|
||||
#
|
||||
# GNUSTEP_BUILD_DIR : Implicitly used to find the bundle.
|
||||
#
|
||||
# GNUSTEP_SHARED_BUNDLE_MAIN_PATH : the path to the top level bundle
|
||||
# directory to install, relative to GNUSTEP_BUILD_DIR during build
|
||||
# (and installation dir when installed). For example, for a normal
|
||||
# bundle it would be $(BUNDLE_DIR_NAME); for an application it would
|
||||
# be $(APP_DIR_NAME); for a library or a tool, $(GNUSTEP_INSTANCE).
|
||||
# GNUSTEP_SHARED_BUNDLE_INSTALL_NAME : this is used when installing.
|
||||
# It's the name of the directory that is installed. For example, for
|
||||
# a normal bundle it would be $(BUNDLE_DIR_NAME); for an application
|
||||
# it would be $(APP_DIR_NAME); for a tool $(GNUSTEP_INSTANCE); for a
|
||||
# library, $(INTERFACE_VERSION).
|
||||
#
|
||||
# GNUSTEP_SHARED_BUNDLE_INSTALL_DIR : the path to the dir
|
||||
# in which the bundle is to be installed. For example, for a normal
|
||||
# bundle it would be $(BUNDLE_INSTALL_DIR); for an application it would
|
||||
# be $(APP_INSTALL_DIR); for a library or tool, $(GNUSTEP_RESOURCES),
|
||||
# or $(GNUSTEP_TOOL_RESOURCES).
|
||||
# GNUSTEP_SHARED_BUNDLE_INSTALL_LOCAL_PATH : this is used when
|
||||
# installing. It's the path to the directory that contains
|
||||
# GNUSTEP_SHARED_BUNDLE_INSTALL_NAME, but relative to
|
||||
# GNUSTEP_BUILD_DIR. For example, for a normal bundle or an
|
||||
# application this is simply ./; for a tool this is ./Resources; for a
|
||||
# library this is ./Resources/$(GNUSTEP_INSTANCE). This is relative
|
||||
# to GNUSTEP_BUILD_DIR so that it can be used by COPY_INTO_DIR as
|
||||
# well. When we are asked to COPY_INTO_DIR (instead of the standard
|
||||
# installation) then we copy the stuff from
|
||||
# GNUSTEP_BUILD_DIR/GNUSTEP_SHARED_BUNDLE_INSTALL_LOCAL_PATH into
|
||||
# COPY_INTO_DIR/GNUSTEP_SHARED_BUNDLE_INSTALL_LOCAL_PATH. This works
|
||||
# well for tool resources, for example, so that when you copy a tool
|
||||
# with resources into a framework, the tool resources and the tool
|
||||
# executable remain in the same relative relationship and tool
|
||||
# resources can be found.
|
||||
#
|
||||
# GNUSTEP_SHARED_BUNDLE_INSTALL_PATH : this is used when installing.
|
||||
# It's the path where we install the bundle; that is, we will take
|
||||
# GNUSTEP_SHARED_BUNDLE_INSTALL_NAME from
|
||||
# GNUSTEP_SHARED_BUNDLE_INSTALL_LOCAL_PATH and install it into
|
||||
# GNUSTEP_SHARED_BUNDLE_INSTALL_PATH. For example, for a normal
|
||||
# bundle it would be $(BUNDLE_INSTALL_DIR); for an application it
|
||||
# would be $(APP_INSTALL_DIR); for a tool, $(GNUSTEP_TOOL_RESOURCES);
|
||||
# for a library $(GNUSTEP_RESOURCES)/$(GNUSTEP_INSTANCE).
|
||||
#
|
||||
# Please note that the main constraint when installing is that your
|
||||
# local bundle should have the same name that it has when installed.
|
||||
# Paths can be changed arbitrarily though.
|
||||
#
|
||||
# $(GNUSTEP_INSTANCE)_RESOURCE_FILES : a list of resource files to install.
|
||||
# They are recursively copied (/symlinked), so it might also include dirs.
|
||||
|
@ -115,7 +140,7 @@
|
|||
|
||||
#
|
||||
# Warning - the bundle install rules depend on the rule to create
|
||||
# $(GNUSTEP_SHARED_BUNDLE_INSTALL_DIR) - the rule to build it has to be
|
||||
# $(GNUSTEP_SHARED_BUNDLE_INSTALL_PATH) - the rule to build it has to be
|
||||
# provided by the caller {we can't provide two rules to build the same
|
||||
# target; the caller might need to provide the rule for cases when we
|
||||
# are not included, so we let the caller always provide it}
|
||||
|
@ -378,19 +403,21 @@ endif
|
|||
# files to exclude. We use a standard exclude file list which we store
|
||||
# in GNUSTEP_MAKEFILES.
|
||||
#
|
||||
shared-instance-bundle-install:: $(GNUSTEP_SHARED_BUNDLE_INSTALL_DIR)
|
||||
$(ECHO_INSTALLING_BUNDLE)rm -rf $(GNUSTEP_SHARED_BUNDLE_INSTALL_DIR)/$(GNUSTEP_SHARED_BUNDLE_MAIN_PATH); \
|
||||
(cd $(GNUSTEP_BUILD_DIR); $(TAR) chfX - $(GNUSTEP_MAKEFILES)/tar-exclude-list $(GNUSTEP_SHARED_BUNDLE_MAIN_PATH)) \
|
||||
| (cd $(GNUSTEP_SHARED_BUNDLE_INSTALL_DIR); $(TAR) xf -)$(END_ECHO)
|
||||
shared-instance-bundle-install:: $(GNUSTEP_SHARED_BUNDLE_INSTALL_PATH)
|
||||
$(ECHO_INSTALLING_BUNDLE)rm -rf $(GNUSTEP_SHARED_BUNDLE_INSTALL_PATH)/$(GNUSTEP_SHARED_BUNDLE_INSTALL_NAME); \
|
||||
(cd $(GNUSTEP_BUILD_DIR)/$(GNUSTEP_SHARED_BUNDLE_INSTALL_LOCAL_PATH); \
|
||||
$(TAR) chfX - $(GNUSTEP_MAKEFILES)/tar-exclude-list $(GNUSTEP_SHARED_BUNDLE_INSTALL_NAME)) \
|
||||
| (cd $(GNUSTEP_SHARED_BUNDLE_INSTALL_PATH); $(TAR) xf -)$(END_ECHO)
|
||||
ifneq ($(CHOWN_TO),)
|
||||
$(ECHO_CHOWNING)$(CHOWN) -R $(CHOWN_TO) \
|
||||
$(GNUSTEP_SHARED_BUNDLE_INSTALL_DIR)/$(GNUSTEP_SHARED_BUNDLE_MAIN_PATH)$(END_ECHO)
|
||||
$(GNUSTEP_SHARED_BUNDLE_INSTALL_PATH)/$(GNUSTEP_SHARED_BUNDLE_INSTALL_NAME)$(END_ECHO)
|
||||
endif
|
||||
|
||||
shared-instance-bundle-copy_into_dir::
|
||||
$(ECHO_COPYING_BUNDLE_INTO_DIR)rm -rf $(COPY_INTO_DIR)/$(GNUSTEP_SHARED_BUNDLE_MAIN_PATH); \
|
||||
(cd $(GNUSTEP_BUILD_DIR); $(TAR) chfX - $(GNUSTEP_MAKEFILES)/tar-exclude-list $(GNUSTEP_SHARED_BUNDLE_MAIN_PATH)) \
|
||||
| (cd $(COPY_INTO_DIR); $(TAR) xf -)$(END_ECHO)
|
||||
$(ECHO_COPYING_BUNDLE_INTO_DIR)rm -rf $(COPY_INTO_DIR)/$(GNUSTEP_SHARED_BUNDLE_INSTALL_LOCAL_PATH)/$(GNUSTEP_SHARED_BUNDLE_INSTALL_NAME); \
|
||||
(cd $(GNUSTEP_BUILD_DIR); \
|
||||
$(TAR) chfX - $(GNUSTEP_MAKEFILES)/tar-exclude-list $(GNUSTEP_SHARED_BUNDLE_INSTALL_LOCAL_PATH)/$(GNUSTEP_SHARED_BUNDLE_INSTALL_NAME)) \
|
||||
| (cd $(COPY_INTO_DIR); $(TAR) xf -)$(END_ECHO)
|
||||
|
||||
shared-instance-bundle-uninstall::
|
||||
$(ECHO_NOTHING)cd $(GNUSTEP_SHARED_BUNDLE_INSTALL_DIR); rm -rf $(GNUSTEP_SHARED_BUNDLE_MAIN_PATH)$(END_ECHO)
|
||||
$(ECHO_NOTHING)cd $(GNUSTEP_SHARED_BUNDLE_INSTALL_PATH); rm -rf $(GNUSTEP_SHARED_BUNDLE_INSTALL_NAME)$(END_ECHO)
|
||||
|
|
|
@ -81,8 +81,9 @@ else
|
|||
GNUSTEP_SHARED_BUNDLE_RESOURCE_PATH = $(APP_DIR)/Contents/Resources
|
||||
APP_INFO_PLIST_FILE = $(APP_DIR)/Contents/Info.plist
|
||||
endif
|
||||
GNUSTEP_SHARED_BUNDLE_MAIN_PATH = $(APP_DIR_NAME)
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_DIR = $(APP_INSTALL_DIR)
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_NAME = $(APP_DIR_NAME)
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_LOCAL_PATH = .
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_PATH = $(APP_INSTALL_DIR)
|
||||
include $(GNUSTEP_MAKEFILES)/Instance/Shared/bundle.make
|
||||
|
||||
ifneq ($(FOUNDATION_LIB), apple)
|
||||
|
|
|
@ -138,8 +138,9 @@ else
|
|||
GNUSTEP_SHARED_BUNDLE_RESOURCE_PATH = $(BUNDLE_DIR)/Contents/Resources
|
||||
BUNDLE_INFO_PLIST_FILE = $(BUNDLE_DIR)/Contents/Info.plist
|
||||
endif
|
||||
GNUSTEP_SHARED_BUNDLE_MAIN_PATH = $(BUNDLE_DIR_NAME)
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_DIR = $(BUNDLE_INSTALL_DIR)
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_NAME = $(BUNDLE_DIR_NAME)
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_LOCAL_PATH = .
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_PATH = $(BUNDLE_INSTALL_DIR)
|
||||
include $(GNUSTEP_MAKEFILES)/Instance/Shared/bundle.make
|
||||
|
||||
ifneq ($(OBJ_FILES_TO_LINK),)
|
||||
|
|
|
@ -302,4 +302,39 @@ endif
|
|||
#
|
||||
internal-library-check::
|
||||
|
||||
#
|
||||
# If the user makefile contains the command
|
||||
# xxx_HAS_RESOURCE_BUNDLE = yes
|
||||
# then we need to build a resource bundle for the library, and install it.
|
||||
# You can then add resources to the library, any sort of, with the usual
|
||||
# xxx_RESOURCE_FILES, xxx_LOCALIZED_RESOURCE_FILES, xxx_LANGUAGES, etc.
|
||||
# The library resource bundle (and all resources inside it) can be
|
||||
# accessed at runtime very comfortably, by using gnustep-base's
|
||||
# [NSBundle +bundleForLibrary:version:].
|
||||
#
|
||||
ifeq ($($(GNUSTEP_INSTANCE)_HAS_RESOURCE_BUNDLE),yes)
|
||||
|
||||
# Include the rules to build resource bundles
|
||||
GNUSTEP_SHARED_BUNDLE_RESOURCE_PATH = $(GNUSTEP_BUILD_DIR)/Resources/$(GNUSTEP_INSTANCE)/$(INTERFACE_VERSION)
|
||||
|
||||
# We want to install gnustep-base resources into
|
||||
# GNUSTEP_RESOURCES/gnustep-base/1.14/.
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_NAME = $(INTERFACE_VERSION)
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_LOCAL_PATH = Resources/$(GNUSTEP_INSTANCE)
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_PATH = $(GNUSTEP_RESOURCES)/$(GNUSTEP_INSTANCE)
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/Instance/Shared/bundle.make
|
||||
|
||||
internal-library-all_:: shared-instance-bundle-all
|
||||
internal-library-copy_into_dir:: shared-instance-bundle-copy_into_dir
|
||||
|
||||
$(GNUSTEP_RESOURCES)/$(GNUSTEP_INSTANCE):
|
||||
$(ECHO_CREATING)$(MKINSTALLDIRS) $@$(END_ECHO)
|
||||
|
||||
internal-library-install_:: $(GNUSTEP_RESOURCES)/$(GNUSTEP_INSTANCE) shared-instance-bundle-install
|
||||
|
||||
internal-library-uninstall:: shared-instance-bundle-uninstall
|
||||
|
||||
endif
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/Instance/Shared/strings.make
|
||||
|
|
|
@ -104,11 +104,10 @@ ifeq ($($(GNUSTEP_INSTANCE)_HAS_RESOURCE_BUNDLE),yes)
|
|||
|
||||
# Include the rules to build resource bundles
|
||||
GNUSTEP_SHARED_BUNDLE_RESOURCE_PATH = $(GNUSTEP_BUILD_DIR)/Resources/$(GNUSTEP_INSTANCE)
|
||||
GNUSTEP_SHARED_BUNDLE_MAIN_PATH = Resources/$(GNUSTEP_INSTANCE)
|
||||
# TODO: Think if we shouldn't add a new GNUSTEP_TOOL_RESOURCES
|
||||
# variable that is set to GNUSTEP_LIBRARY/Tools, and use it here. But
|
||||
# we'd need to update Instance/Shared/bundle.make if we do.
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_DIR = $(GNUSTEP_LIBRARY)/Tools
|
||||
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_NAME = $(GNUSTEP_INSTANCE)
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_LOCAL_PATH = Resources
|
||||
GNUSTEP_SHARED_BUNDLE_INSTALL_PATH = $(GNUSTEP_LIBRARY)/Tools/Resources
|
||||
include $(GNUSTEP_MAKEFILES)/Instance/Shared/bundle.make
|
||||
|
||||
internal-tool-all_:: shared-instance-bundle-all
|
||||
|
@ -117,11 +116,11 @@ internal-tool-copy_into_dir:: shared-instance-bundle-copy_into_dir
|
|||
$(TOOL_INSTALL_DIR):
|
||||
$(ECHO_CREATING)$(MKINSTALLDIRS) $@$(END_ECHO)
|
||||
|
||||
$(GNUSTEP_LIBRARY)/Tools:
|
||||
$(GNUSTEP_LIBRARY)/Tools/Resources:
|
||||
$(ECHO_CREATING)$(MKINSTALLDIRS) $@$(END_ECHO)
|
||||
|
||||
internal-tool-install_:: $(GNUSTEP_LIBRARY)/Tools \
|
||||
shared-instance-bundle-install
|
||||
internal-tool-install_:: $(GNUSTEP_LIBRARY)/Tools/Resources \
|
||||
shared-instance-bundle-install
|
||||
|
||||
internal-tool-uninstall:: shared-instance-bundle-uninstall
|
||||
|
||||
|
|
Loading…
Reference in a new issue