Change to resource-set.make to make it ready for filesystem changes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@24512 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2007-02-12 19:20:02 +00:00
parent 514c1a2918
commit 5ec7133bfd
2 changed files with 48 additions and 23 deletions

View file

@ -1,3 +1,14 @@
2007-02-12 Nicola Pero <nicola.pero@meta-innovation.com>,
Matt Rice <ratmice@gmail.com>,
This change in the API is needed for resource-set.make to work
with the new filesystem layouts.
* Instance/resource-set.make (xxx_INSTALL_DIR): New variable that
should replace xxx_RESOURCE_FILES_INSTALL_DIR. Recognize the new
variable; emit a warning if the old variable is used (but still
use it). Install by default into
GNUSTEP_RESOURCES/GNUSTEP_INSTANCE if nothing is set.
2007-02-12 Nicola Pero <nicola.pero@meta-innovation.com>
* gnustep-config.in: Fixed help message.

View file

@ -28,7 +28,7 @@ endif
# The list of resource file are in xxx_RESOURCE_FILES
# The list of resource directories to create are in xxx_RESOURCE_DIRS
# The directory in which to install the resources is in the
# xxx_RESOURCE_FILES_INSTALL_DIR
# xxx_INSTALL_DIR
# The directory in which the resources are is in the
# xxx_RESOURCE_FILES_DIR (defaults to ./ if omitted)
# The list of LANGUAGES is in the xxx_LANGUAGES variable.
@ -40,12 +40,26 @@ endif
.PHONY: internal-resource_set-install_ \
internal-resource_set-uninstall_
# Determine installation dir
RESOURCE_FILES_INSTALL_DIR = $($(GNUSTEP_INSTANCE)_RESOURCE_FILES_INSTALL_DIR)
RESOURCE_FILES_FULL_INSTALL_DIR = $(GNUSTEP_INSTALLATION_DIR)/$(RESOURCE_FILES_INSTALL_DIR)
#
# Determine where to install. By default, install into GNUSTEP_RESOURCES/GNUSTEP_INSTANCE
#
ifneq ($($(GNUSTEP_INSTANCE)_INSTALL_DIR),)
RESOURCE_FILES_INSTALL_DIR = $($(GNUSTEP_INSTANCE)_INSTALL_DIR)
endif
ifneq ($($(GNUSTEP_INSTANCE)_RESOURCE_FILES_INSTALL_DIR),)
# This is deprecated because we need to prepend GNUSTEP_INSTALLATION_DIR to it, which
# is deprecated. This was deprecated on 12 Feb 2007.
$(warning xxx_RESOURCE_FILES_INSTALL_DIR is deprecated, please use xxx_INSTALL_DIR instead)
RESOURCE_FILES_INSTALL_DIR = $(GNUSTEP_INSTALLATION_DIR)/$($(GNUSTEP_INSTANCE)_RESOURCE_FILES_INSTALL_DIR)
endif
ifeq ($(RESOURCE_FILES_INSTALL_DIR),)
RESOURCE_FILES_INSTALL_DIR = $(GNUSTEP_RESOURCES)/$(GNUSTEP_INSTANCE)
endif
# Rule to build the installation dir
$(RESOURCE_FILES_FULL_INSTALL_DIR):
$(RESOURCE_FILES_INSTALL_DIR):
$(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)
@ -54,7 +68,7 @@ RESOURCE_DIRS = $($(GNUSTEP_INSTANCE)_RESOURCE_DIRS)
ifneq ($(RESOURCE_DIRS),)
# Rule to build the additional installation dirs
$(addprefix $(RESOURCE_FILES_FULL_INSTALL_DIR)/,$(RESOURCE_DIRS)):
$(addprefix $(RESOURCE_FILES_INSTALL_DIR)/,$(RESOURCE_DIRS)):
$(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)
endif
@ -88,24 +102,24 @@ ifeq ($(GNUSTEP_DEVELOPER),)
# Standard one - just run a subshell and loop, and install everything.
internal-resource_set-install_: \
$(RESOURCE_FILES_FULL_INSTALL_DIR) \
$(addprefix $(RESOURCE_FILES_FULL_INSTALL_DIR)/,$(RESOURCE_DIRS))
$(RESOURCE_FILES_INSTALL_DIR) \
$(addprefix $(RESOURCE_FILES_INSTALL_DIR)/,$(RESOURCE_DIRS))
ifneq ($(RESOURCE_FILES),)
$(ECHO_NOTHING)for file in $(RESOURCE_FILES) __done; do \
if [ $$file != __done ]; then \
$(INSTALL_DATA) $(RESOURCE_FILES_DIR)/$$file \
$(RESOURCE_FILES_FULL_INSTALL_DIR)/$$file; \
$(RESOURCE_FILES_INSTALL_DIR)/$$file; \
fi; \
done$(END_ECHO)
endif
ifneq ($(LOCALIZED_RESOURCE_FILES),)
$(ECHO_NOTHING)for l in $(LANGUAGES); do \
if [ -d $$l.lproj ]; then \
$(MKINSTALLDIRS) $(RESOURCE_FILES_FULL_INSTALL_DIR)/$$l.lproj; \
$(MKINSTALLDIRS) $(RESOURCE_FILES_INSTALL_DIR)/$$l.lproj; \
for f in $(LOCALIZED_RESOURCE_FILES); do \
if [ -f $$l.lproj/$$f ]; then \
$(INSTALL_DATA) $$l.lproj/$$f \
$(RESOURCE_FILES_FULL_INSTALL_DIR)/$$l.lproj; \
$(RESOURCE_FILES_INSTALL_DIR)/$$l.lproj; \
else \
echo "Warning: $$l.lproj/$$f not found - ignoring"; \
fi; \
@ -122,14 +136,14 @@ else # Following code turned on by setting GNUSTEP_DEVELOPER=YES in the shell
# One optimized for recurrent installations during development - this
# rule installs a single file only if strictly needed
$(RESOURCE_FILES_FULL_INSTALL_DIR)/% : $(RESOURCE_FILES_DIR)/%
$(RESOURCE_FILES_INSTALL_DIR)/% : $(RESOURCE_FILES_DIR)/%
$(ECHO_NOTHING)$(INSTALL_DATA) $< $@$(END_ECHO)
# This rule depends on having installed all files
internal-resource_set-install_: \
$(RESOURCE_FILES_FULL_INSTALL_DIR) \
$(addprefix $(RESOURCE_FILES_FULL_INSTALL_DIR)/,$(RESOURCE_DIRS)) \
$(addprefix $(RESOURCE_FILES_FULL_INSTALL_DIR)/,$(RESOURCE_FILES)) \
$(RESOURCE_FILES_INSTALL_DIR) \
$(addprefix $(RESOURCE_FILES_INSTALL_DIR)/,$(RESOURCE_DIRS)) \
$(addprefix $(RESOURCE_FILES_INSTALL_DIR)/,$(RESOURCE_FILES)) \
internal-resource-set-install-languages
ifeq ($(LOCALIZED_RESOURCE_FILES),)
@ -138,7 +152,7 @@ internal-resource-set-install-languages:
else
# Rule to build the language installation directories
$(addsuffix .lproj,$(addprefix $(RESOURCE_FILES_FULL_INSTALL_DIR)/,$(LANGUAGES))):
$(addsuffix .lproj,$(addprefix $(RESOURCE_FILES_INSTALL_DIR)/,$(LANGUAGES))):
$(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)
# install the localized resources, checking the installation date by
@ -146,14 +160,14 @@ $(addsuffix .lproj,$(addprefix $(RESOURCE_FILES_FULL_INSTALL_DIR)/,$(LANGUAGES))
# rules because we want to issue a warning if the directory/file can't
# be found, rather than aborting with an error as make would do.
internal-resource-set-install-languages: \
$(addsuffix .lproj,$(addprefix $(RESOURCE_FILES_FULL_INSTALL_DIR)/,$(LANGUAGES)))
$(addsuffix .lproj,$(addprefix $(RESOURCE_FILES_INSTALL_DIR)/,$(LANGUAGES)))
$(ECHO_NOTHING)for l in $(LANGUAGES); do \
if [ -d $$l.lproj ]; then \
for f in $(LOCALIZED_RESOURCE_FILES); do \
if [ -f $$l.lproj/$$f ]; then \
if [ $$l.lproj -nt $(RESOURCE_FILES_FULL_INSTALL_DIR)/$$l.lproj/$$f ]; then \
if [ $$l.lproj -nt $(RESOURCE_FILES_INSTALL_DIR)/$$l.lproj/$$f ]; then \
$(INSTALL_DATA) $$l.lproj/$$f \
$(RESOURCE_FILES_FULL_INSTALL_DIR)/$$l.lproj; \
$(RESOURCE_FILES_INSTALL_DIR)/$$l.lproj; \
fi; \
else \
echo "Warning: $$l.lproj/$$f not found - ignoring"; \
@ -174,14 +188,14 @@ internal-resource_set-uninstall_:
ifneq ($(LOCALIZED_RESOURCE_FILES),)
-$(ECHO_NOTHING)for language in $(LANGUAGES); do \
for file in $(LOCALIZED_RESOURCE_FILES); do \
rm -rf $(RESOURCE_FILES_FULL_INSTALL_DIR)/$$language.lproj/$$file;\
rm -rf $(RESOURCE_FILES_INSTALL_DIR)/$$language.lproj/$$file;\
done; \
rmdir $(RESOURCE_FILES_FULL_INSTALL_DIR)/$$language.lproj; \
rmdir $(RESOURCE_FILES_INSTALL_DIR)/$$language.lproj; \
done$(END_ECHO)
endif
ifneq ($(RESOURCE_FILES),)
$(ECHO_NOTHING)for file in $(RESOURCE_FILES); do \
rm -rf $(RESOURCE_FILES_FULL_INSTALL_DIR)/$$file ; \
rm -rf $(RESOURCE_FILES_INSTALL_DIR)/$$file ; \
done$(END_ECHO)
-rmdir $(RESOURCE_FILES_FULL_INSTALL_DIR)
-rmdir $(RESOURCE_FILES_INSTALL_DIR)
endif