Implemented support for xxx_LOCALIZED_RESOURCE_DIRS; merged code for

xxx_COMPONENTS into code for xxx_RESOURCE_FILES (and similar for all other
similar variables); fixed typos and bugs in gsweb code, and update to support
everything that the standard code supports, plus other minor changes


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@13850 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2002-06-12 13:55:43 +00:00
parent 4fe3945b38
commit cf7e4c45df

View file

@ -45,27 +45,30 @@
# This is used when building bundles on MacOSX. If not set, it's
# ignored.
#
# $(GNUSTEP_INSTANCE)_RESOURCE_FILES : the list of resource files to install
# $(GNUSTEP_INSTANCE)_RESOURCE_FILES : a list of resource files to install.
# They are recursively copied (/symlinked), so it might also include dirs.
#
# $(GNUSTEP_INSTANCE)_RESOURCE_FILES_DIR : the directory in which the
# resources are located.
#
# $(GNUSTEP_INSTANCE)_RESOURCE_DIRS : the list of additional resource dirs
# $(GNUSTEP_INSTANCE)_RESOURCE_DIRS : a list of additional resource dirs
# to create.
#
# $(GNUSTEP_INSTANCE)_LANGUAGES : the list of languages of localized resource
# files
#
# $(GNUSTEP_INSTANCE)_LOCALIZED_RESOURCE_FILES : the list of localized
# resource files to install
# $(GNUSTEP_INSTANCE)_LOCALIZED_RESOURCE_FILES : a list of localized
# resource files to install.
#
# $(GNUSTEP_INSTANCE)_RESOURCE_DIRS : a list of additional localized
# resource dirs to create.
#
# $(GNUSTEP_INSTANCE)_COMPONENTS : a list of directories which are
# recursively copied (/locally symlinked if symlinks are available)
# into the resource bundle.
# into the resource bundle. Basically, they are currently added to
# $(GNUSTEP_INSTANCE)_RESOURCE_FILES.
#
# $(GNUSTEP_INSTANCE)_LOCALIZED_COMPONENTS : a list of localized
# directories which are recursively copied (/locally symlinked if
# symlinks are available) into the resource bundle.
# symlinks are available) into the resource bundle. Currently, they
# are simply added to $(GNUSTEP_INSTANCE)_LOCALIZED_RESOURCE_FILES.
#
# $(GNUSTEP_INSTANCE)_SUBPROJECTS : the list of subprojects is used
# because the resources from each subproject are merged into the bundle
@ -82,12 +85,17 @@
# copy from the WebServerResources directory into the WebServer
# subdirectory of the resource bundle
#
# $(GNUSTEP_INSTANCE)_LOCALIZED_WEBSERVER_RESOURCE_FILES : a list of
# $(GNUSTEP_INSTANCE)_WEBSERVER_LOCALIZED_RESOURCE_FILES : a list of
# localized resource files to copy from the yyy.lproj subdir of the
# WebServerResources directory into the yyy.lproj subdir of the
# WebServer subdirectory of the resource bundle - this for each
# language yyy.
#
# $(GNUSTEP_INSTANCE)_WEBSERVER_COMPONENTS:
# $(GNUSTEP_INSTANCE)_WEBSERVER_LOCALIZED_COMPONENTS:
# $(GNUSTEP_INSTANCE)_WEBSERVER_RESOURCE_DIRS:
# $(GNUSTEP_INSTANCE)_WEBSERVER_LOCALIZED_RESOURCE_DIRS:
#
#
# public targets:
@ -98,12 +106,15 @@
# resource path (invoked automatically)
#
RESOURCE_FILES = $(strip $($(GNUSTEP_INSTANCE)_RESOURCE_FILES))
RESOURCE_FILES = $(strip $($(GNUSTEP_INSTANCE)_RESOURCE_FILES)) \
$(strip $($(GNUSTEP_INSTANCE)_COMPONENTS))
RESOURCE_DIRS = $(strip $($(GNUSTEP_INSTANCE)_RESOURCE_DIRS))
LANGUAGES = $(strip $($(GNUSTEP_INSTANCE)_LANGUAGES))
LOCALIZED_RESOURCE_FILES = $(strip $($(GNUSTEP_INSTANCE)_LOCALIZED_RESOURCE_FILES))
COMPONENTS = $(strip $($(GNUSTEP_INSTANCE)_COMPONENTS))
LOCALIZED_COMPONENTS = $(strip $($(GNUSTEP_INSTANCE)_LOCALIZED_COMPONENTS))
LOCALIZED_RESOURCE_FILES = \
$(strip $($(GNUSTEP_INSTANCE)_LOCALIZED_RESOURCE_FILES)) \
$(strip $($(GNUSTEP_INSTANCE)_LOCALIZED_COMPONENTS))
LOCALIZED_RESOURCE_DIRS = \
$(strip $($(GNUSTEP_INSTANCE)_LOCALIZED_RESOURCE_DIRS))
# NB: Use _SUBPROJECTS, not SUBPROJECTS here as that might conflict
# with what is used in aggregate.make.
@ -160,7 +171,24 @@ shared-instance-bundle-all: $(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH) \
ifneq ($(RESOURCE_FILES),)
@(echo "Copying resources into the $(GNUSTEP_TYPE) wrapper..."; \
for f in $(RESOURCE_FILES); do \
cp -r $$f $(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH); \
if [ -f $$f -o -d $$f ]; then \
cp -r $$f $(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH); \
else \
echo "Warning: $$f not found - ignoring"; \
fi; \
done)
endif
ifneq ($(LOCALIZED_RESOURCE_DIRS),)
@(echo "Creating localized resource dirs into the $(GNUSTEP_TYPE) wrapper..."; \
for l in $(LANGUAGES); do \
if [ -d $$l.lproj ]; then \
$(MKDIRS) $(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/$$l.lproj; \
for f in $(LOCALIZED_RESOURCE_DIRS); do \
$(MKDIRS) $(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/$$l.lproj/$$f; \
done; \
else \
echo "Warning: $$l.lproj not found - ignoring"; \
fi; \
done)
endif
ifneq ($(LOCALIZED_RESOURCE_FILES),)
@ -169,7 +197,7 @@ ifneq ($(LOCALIZED_RESOURCE_FILES),)
if [ -d $$l.lproj ]; then \
$(MKDIRS) $(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/$$l.lproj; \
for f in $(LOCALIZED_RESOURCE_FILES); do \
if [ -f $$l.lproj/$$f ]; then \
if [ -f $$l.lproj/$$f -o -d $$l.lproj/$$f ]; then \
cp -r $$l.lproj/$$f \
$(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/$$l.lproj; \
else \
@ -181,32 +209,6 @@ ifneq ($(LOCALIZED_RESOURCE_FILES),)
fi; \
done)
endif
ifneq ($(COMPONENTS),)
@(echo "Copying components into the $(GNUSTEP_TYPE) wrapper..."; \
for component in $(COMPONENTS); do \
if [ -d $$component ]; then \
cp -r $$component $(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/;\
fi; \
done)
endif
ifneq ($(LOCALIZED_COMPONENTS),)
@(echo "Copying localized components into the $(GNUSTEP_TYPE) wrapper..."; \
for l in $(LANGUAGES); do \
if [ -d $$l.lproj ]; then \
$(MKDIRS) $(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/$$l.lproj; \
for component in $(LOCALIZED_COMPONENTS); do \
if [ -d $$l.lproj/$$component ]; then \
cp -r $$l.lproj/$$component \
$(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/$$l.lproj; \
else \
echo "Warning: $$l.lproj/$$component not found - ignoring"; \
fi; \
done; \
else \
echo "Warning: $$l.lproj not found - ignoring"; \
fi; \
done)
endif
ifneq ($(_SUBPROJECTS),)
@(echo "Copying resources from subprojects into the $(GNUSTEP_TYPE) wrapper..."; \
for subproject in $(_SUBPROJECTS); do \
@ -222,13 +224,24 @@ endif
##
##
## GSWeb code
## A main issue here is - executing *nothing* if gsweb is not used :-)
##
##
WEBSERVER_RESOURCE_FILES = $(strip $($(GNUSTEP_INSTANCE)_WEBSERVER_RESOURCE_FILES))
# For historical reasons, the external API is different for the following one
WEBSERVER_LOCALIZED_RESOURCE_FILES = $(strip $($(GNUSTEP_INSTANCE)_LOCALIZED_WEBSERVER_RESOURCE_FILES))
WEBSERVER_RESOURCE_DIRS = $(strip $($(GNUSTEP_INSTANCE)_WEBSERVER_RESOURCE_DIRS))
WEBSERVER_RESOURCE_FILES = \
$(strip $($(GNUSTEP_INSTANCE)_WEBSERVER_RESOURCE_FILES)) \
$(strip $($(GNUSTEP_INSTANCE)_WEBSERVER_COMPONENTS))
# For historical reasons, we recognized the old variant
# xxx_LOCALIZED_WEBSERVER_RESOURCE_FILES - but we recommend to use
# xxx_WEBSERVER_LOCALIZED_RESOURCE_FILES instead.
WEBSERVER_LOCALIZED_RESOURCE_FILES = \
$(strip $($(GNUSTEP_INSTANCE)_LOCALIZED_WEBSERVER_RESOURCE_FILES)) \
$(strip $($(GNUSTEP_INSTANCE)_WEBSERVER_LOCALIZED_RESOURCE_FILES)) \
$(strip $($(GNUSTEP_INSTANCE)_WEBSERVER_LOCALIZED_COMPONENTS))
WEBSERVER_RESOURCE_DIRS = \
$(strip $($(GNUSTEP_INSTANCE)_WEBSERVER_RESOURCE_DIRS))
WEBSERVER_LOCALIZED_RESOURCE_DIRS = \
$(strip $($(GNUSTEP_INSTANCE)_WEBSERVER_LOCALIZED_RESOURCE_DIRS))
ifneq ($(WEBSERVER_RESOURCE_DIRS),)
@ -257,9 +270,14 @@ shared-instance-bundle-all-webresources: \
$(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/WebServer \
$(WEBSERVER_FULL_RESOURCE_DIRS)
@(echo "Copying webserver resources into the $(GNUSTEP_TYPE) wrapper..."; \
for file in $(WEBSERVER_RESOURCE_FILES); do \
cp -r ./WebServerResources/$$file \
$(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/WebServer/$$file;\
for f in $(WEBSERVER_RESOURCE_FILES); do \
if [ -f ./WebServerResources/$$f \
-o -d ./WebServerResources/$$f ]; then \
cp -r ./WebServerResources/$$f \
$(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/WebServer/$$f; \
else \
echo "Warning: WebServerResources/$$f not found - ignoring"; \
fi; \
done)
else
@ -267,25 +285,41 @@ shared-instance-bundle-all-webresources:
endif
ifneq ($(LOCALIZED_WEBSERVER_RESOURCE_FILES),)
ifneq ($(WEBSERVER_LOCALIZED_RESOURCE_FILES)$(WEBSERVER_LOCALIZED_RESOURCE_DIRS),)
shared-instance-bundle-all-localized-webresources: \
$(WEBSERVER_FULL_RESOURCE_DIRS)
@( echo "Copying localized webserver resources into the $(GNUSTEP_TYPE) wrapper..."; \
ifneq ($(WEBSERVER_LOCALIZED_RESOURCE_DIRS),)
@(echo "Creating localized webserver resource dirs into the $(GNUSTEP_TYPE) wrapper..."; \
for l in $(LANGUAGES); do \
if [ -d WebServerResources/$$l.lproj ]; then \
if [ -d ./WebServerResources/$$l.lproj ]; then \
$(MKDIRS) \
$(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/WebServer/$$l.lproj; \
for f in $(WEBSERVER_LOCALIZED_RESOURCE_DIRS); do \
$(MKDIRS) \
$(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/WebServer/$$l.lproj/$$f; \
done; \
else \
echo "Warning: WebServer/$$l.lproj not found - ignoring"; \
fi; \
done)
endif
@(echo "Copying localized webserver resources into the $(GNUSTEP_TYPE) wrapper..."; \
for l in $(LANGUAGES); do \
if [ -d ./WebServerResources/$$l.lproj ]; then \
$(MKDIRS) \
$(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/WebServer/$$l.lproj;\
for f in $(LOCALIZED_WEBSERVER_RESOURCE_FILES); do \
if [ -f WebServerResources/$$l.lproj/$$f ]; then \
cp -r WebServerResources/$$l.lproj/$$f \
$(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/WebServer/$$l.lproj/$$f; \
else \
echo "Warning: WebServerResources/$$l.lproj/$$f not found - ignoring";\
fi;\
done;\
else \
echo "Warning: WebServerResources/$$l.lproj not found - ignoring"; \
fi; \
for f in $(WEBSERVER_LOCALIZED_RESOURCE_FILES); do \
if [ -f ./WebServerResources/$$l.lproj/$$f \
-o -d ./WebServerResources/$$l.lproj/$$f ]; then \
cp -r ./WebServerResources/$$l.lproj/$$f \
$(GNUSTEP_SHARED_INSTANCE_BUNDLE_RESOURCE_PATH)/WebServer/$$l.lproj/$$f; \
else \
echo "Warning: WebServerResources/$$l.lproj/$$f not found - ignoring"; \
fi; \
done; \
else \
echo "Warning: WebServerResources/$$l.lproj not found - ignoring"; \
fi; \
done)
else