Fixed dependency of Info-gnustep.plist on xxxInfo.plist and palette.table on xxxpalette.table. Fixed creating Info-gnustep.plist and not Info.plist for GNU frameworks. Obsoleted xxx_PREPROCESS_INFO_PLIST by automating the detection of xxxInfo.cplist

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@24880 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2007-03-16 12:23:56 +00:00
parent 670da4673a
commit 97af36b6cc
7 changed files with 96 additions and 28 deletions

View file

@ -1,3 +1,29 @@
2007-03-16 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented rebuilding Info-gnustep.plist when xxxInfo.plist is
changed (and palette.table from xxxpalette.table for palettes).
For applications, automated detecting xxxInfo.cplist and
preprocessing it, so that xxx_PREPROCESS_INFO_PLIST in
GNUmakefiles is now obsolete and can be removed.
* Instance/application.make (GNUSTEP_PLIST_DEPEND): Automatically
add xxxInfo.plist if the file is there; if not, automatically add
xxxInfo.cplist if there. Removed xxx_PREPROCESS_INFO_PLIST.
* Instance/bundle.make: Have Info-gnustep.plist automatically
depend on xxxInfo.plist if it exists.
* Instance/framework.make: Same change.
* Instance/gswapp.make: Same change.
* Instance/service.make: Same change.
* Instance/palette.make Have Info-gnustep.plist automatically
depend on xxxInfo.plist if it exists, and palette.table
automatically depend on xxxpalette.table if it exists.
* Instance/framework.make (FRAMEWORK_INFO_PLIST_FILE): New
variable fixing the fact that frameworks on gnu-gnu-gnu were
creating Info.plist instead of Info-gnustep.plist.
* Instance/service.make: Fixed rules to only cat xxxInfo.plist if
it exists. Print a warning if it doesn't, as services need to
have one to be useful.
2007-03-16 Xavier Glattard <xavier.glattard@online.fr>
* configure.ac (CYGWIN): Set to no on MinGW.

View file

@ -186,8 +186,9 @@ MAIN_MARKUP_FILE = $(strip $(subst .gsmarkup,,$($(GNUSTEP_INSTANCE)_MAIN_MARKUP_
# APPLICATION_ICON and/or MAIN_MODEL_FILE and/or MAIN_MARKUP_FILE has
# changed since last time we built Info.plist. We use
# stamp-string.make, which will store the variables in a stamp file
# inside GNUSTEP_STAMP_DIR, and rebuild Info.plist iff
# GNUSTEP_STAMP_STRING changes.
# inside GNUSTEP_STAMP_DIR, and rebuild Info.plist if
# GNUSTEP_STAMP_STRING changes. We will also depend on xxxInfo.plist
# if any.
GNUSTEP_STAMP_STRING = $(PRINCIPAL_CLASS)-$(APPLICATION_ICON)-$(MAIN_MODEL_FILE)-$(MAIN_MARKUP_FILE)
ifneq ($(FOUNDATION_LIB),apple)
@ -202,14 +203,11 @@ endif
include $(GNUSTEP_MAKEFILES)/Instance/Shared/stamp-string.make
# FIXME: Missing dependency on $(GNUSTEP_INSTANCE)Info.plist files
# You can have a single xxxInfo.plist for both GNUstep and Apple.
# Often enough, you can just put in it all fields required by both
# GNUstep and Apple; if there is a conflict, you can add
# xxx_PREPROCESS_INFO_PLIST = yes to your GNUmakefile, and provide a
# xxxInfo.cplist (please note the suffix!) - that file is
# GNUstep and Apple; if there is a conflict, you can provide
# axxxInfo.cplist (please note the suffix!) - that file is
# automatically run through the C preprocessor to generate a
# xxxInfo.plist file from it. The preprocessor will define GNUSTEP
# when using gnustep-base, APPLE when using Apple FoundationKit, NEXT
@ -223,17 +221,17 @@ include $(GNUSTEP_MAKEFILES)/Instance/Shared/stamp-string.make
# to have your .cplist use different code for each.
#
# The following is really a hack, but very elegant. Our problem is
# that we'd like to always depend on xxxInfo.plist if it's there, and
# not depend on it if it's not there - but we don't have a solution to
# this problem at the moment, so we don't depend on it. Adding
# xxx_PREPROCESS_INFO_PLIST = yes at the moment just turns on the
# dependency on xxxInfo.plist, which is then built from xxxInfo.cplist
# using the %.plist: %.cplist rules.
ifeq ($($(GNUSTEP_INSTANCE)_PREPROCESS_INFO_PLIST), yes)
GNUSTEP_PLIST_DEPEND = $(GNUSTEP_INSTANCE)Info.plist
else
GNUSTEP_PLIST_DEPEND =
# Our problem is that we'd like to always depend on xxxInfo.plist if
# it's there, and not depend on it if it's not there - which we solve
# by expanding $(wildcard $(GNUSTEP_INSTANCE)Info.plist)
GNUSTEP_PLIST_DEPEND = $(wildcard $(GNUSTEP_INSTANCE)Info.plist)
# As a special case, if xxxInfo.cplist is there, in this case as well
# we'd like to depend on xxxInfo.plist.
ifeq ($(GNUSTEP_PLIST_DEPEND),)
# xxxInfo.plist is not there. Check if xxxInfo.cplist is there, and
# if so, convert it to xxxInfo.plist and add it to the dependencies.
GNUSTEP_PLIST_DEPEND = $(patsubst %.cplist,%.plist,$(wildcard $(GNUSTEP_INSTANCE)Info.cplist))
endif
# On Apple we assume that xxxInfo.plist has a '{' (and nothing else)

View file

@ -255,10 +255,14 @@ endif
else # following executed if FOUNDATION_LIB != apple
# Depend on xxxInfo.plist but only if it exists.
GNUSTEP_PLIST_DEPEND = $(wildcard $(GNUSTEP_INSTANCE)Info.plist)
ifneq ($(OBJ_FILES_TO_LINK),)
# GNUstep bundles
$(BUNDLE_DIR)/Resources/Info-gnustep.plist: $(BUNDLE_DIR)/Resources \
$(GNUSTEP_STAMP_DEPEND)
$(GNUSTEP_STAMP_DEPEND) \
$(GNUSTEP_PLIST_DEPEND)
$(ECHO_CREATING)(echo "{"; echo ' NOTE = "Automatically generated, do not edit!";'; \
echo " NSExecutable = \"$(GNUSTEP_INSTANCE)$(BUNDLE_OBJ_EXT)\";"; \
echo " NSMainNibFile = \"$(MAIN_MODEL_FILE)\";"; \
@ -270,7 +274,8 @@ $(BUNDLE_DIR)/Resources/Info-gnustep.plist: $(BUNDLE_DIR)/Resources \
else # following code for when no object file is built
# GNUstep bundles
$(BUNDLE_DIR)/Resources/Info-gnustep.plist: $(BUNDLE_DIR)/Resources \
$(GNUSTEP_STAMP_DEPEND)
$(GNUSTEP_STAMP_DEPEND) \
$(GNUSTEP_PLIST_DEPEND)
$(ECHO_CREATING)(echo "{"; echo ' NOTE = "Automatically generated, do not edit!";'; \
echo " NSMainNibFile = \"$(MAIN_MODEL_FILE)\";"; \
echo "}") >$@$(END_ECHO)

View file

@ -447,15 +447,21 @@ $(DUMMY_FRAMEWORK_OBJ_FILE): $(DUMMY_FRAMEWORK_FILE)
$(ECHO_COMPILING)$(CC) $< -c $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS) -o $@$(END_ECHO)
endif
ifeq ($(FOUNDATION_LIB),gnu)
FRAMEWORK_INFO_PLIST_FILE = Info-gnustep.plist
else
FRAMEWORK_INFO_PLIST_FILE = Info.plist
endif
ifeq ($(FRAMEWORK_VERSION_SUPPORT), yes)
build-framework: $(FRAMEWORK_FILE) \
shared-instance-bundle-all \
$(FRAMEWORK_VERSION_DIR)/Resources/Info.plist \
$(FRAMEWORK_VERSION_DIR)/Resources/$(FRAMEWORK_INFO_PLIST_FILE) \
$(GNUSTEP_BUILD_DIR)/$(GNUSTEP_INSTANCE).framework/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_INSTANCE)
else
build-framework: $(FRAMEWORK_FILE) \
shared-instance-bundle-all \
$(FRAMEWORK_VERSION_DIR)/Resources/Info.plist
$(FRAMEWORK_VERSION_DIR)/Resources/$(FRAMEWORK_INFO_PLIST_FILE)
endif
ifeq ($(findstring darwin, $(GNUSTEP_TARGET_OS)), darwin)
@ -535,6 +541,9 @@ endif
MAIN_MODEL_FILE = $(strip $(subst .gmodel,,$(subst .gorm,,$(subst .nib,,$($(GNUSTEP_INSTANCE)_MAIN_MODEL_FILE)))))
# FIXME: Use stamp.make to depend on the value of MAIN_MODEL_FILE and PRINCIPAL_CLASS
# FIXME: MacOSX frameworks should also merge xxxInfo.plist into them
# MacOSX-S frameworks
$(FRAMEWORK_VERSION_DIR)/Resources/Info.plist: $(FRAMEWORK_VERSION_DIR)/Resources
$(ECHO_CREATING)(echo "{"; echo ' NOTE = "Automatically generated, do not edit!";'; \
@ -543,8 +552,14 @@ $(FRAMEWORK_VERSION_DIR)/Resources/Info.plist: $(FRAMEWORK_VERSION_DIR)/Resource
echo " NSPrincipalClass = \"$(PRINCIPAL_CLASS)\";"; \
echo "}") >$@$(END_ECHO)
# Depend on xxxInfo.plist but only if it exists.
GNUSTEP_PLIST_DEPEND = $(wildcard $(GNUSTEP_INSTANCE)Info.plist)
# GNUstep frameworks
$(FRAMEWORK_VERSION_DIR)/Resources/Info-gnustep.plist: $(FRAMEWORK_VERSION_DIR)/Resources $(DUMMY_FRAMEWORK_FILE)
$(FRAMEWORK_VERSION_DIR)/Resources/Info-gnustep.plist: \
$(FRAMEWORK_VERSION_DIR)/Resources \
$(DUMMY_FRAMEWORK_FILE) \
$(GNUSTEP_PLIST_DEPEND)
$(ECHO_CREATING)(echo "{"; echo ' NOTE = "Automatically generated, do not edit!";'; \
echo " NSExecutable = \"$(GNUSTEP_INSTANCE)$(FRAMEWORK_OBJ_EXT)\";"; \
echo " NSMainNibFile = \"$(MAIN_MODEL_FILE)\";"; \

View file

@ -149,7 +149,10 @@ HAS_GSWCOMPONENTS = $($(GNUSTEP_INSTANCE)_HAS_GSWCOMPONENTS)
GSWAPP_INFO_PLIST = $($(GNUSTEP_INSTANCE)_GSWAPP_INFO_PLIST)
MAIN_MODEL_FILE = $(strip $(subst .gmodel,,$(subst .gorm,,$(subst .nib,,$($(GNUSTEP_INSTANCE)_MAIN_MODEL_FILE)))))
$(GSWAPP_INFO_PLIST_FILE):
# Depend on xxxInfo.plist but only if it exists.
GNUSTEP_PLIST_DEPEND = $(wildcard $(GNUSTEP_INSTANCE)Info.plist)
$(GSWAPP_INFO_PLIST_FILE): $(GNUSTEP_PLIST_DEPEND)
$(ECHO_CREATING)(echo "{"; echo ' NOTE = "Automatically generated, do not edit!";'; \
echo " NSExecutable = \"$(GNUSTEP_INSTANCE)\";"; \
echo " NSPrincipalClass = \"$(PRINCIPAL_CLASS)\";"; \

View file

@ -119,7 +119,12 @@ ifeq ($(PALETTE_ICON),)
PALETTE_ICON = $(GNUSTEP_INSTANCE)
endif
$(PALETTE_DIR)/Resources/Info-gnustep.plist: $(PALETTE_DIR)/Resources
# Depend on xxxInfo.plist but only if it exists.
GNUSTEP_PLIST_DEPEND = $(wildcard $(GNUSTEP_INSTANCE)Info.plist)
# FIXME - xxxInfo.plist in this case is not really a plist!
$(PALETTE_DIR)/Resources/Info-gnustep.plist: $(PALETTE_DIR)/Resources $(GNUSTEP_PLIST_DEPEND)
$(ECHO_CREATING)(echo "{"; echo ' NOTE = "Automatically generated, do not edit!";'; \
echo " NSExecutable = \"$(PALETTE_NAME)$(PALETTE_OBJ_EXT)\";"; \
if [ -r "$(GNUSTEP_INSTANCE)Info.plist" ]; then \
@ -129,7 +134,12 @@ $(PALETTE_DIR)/Resources/Info-gnustep.plist: $(PALETTE_DIR)/Resources
MAIN_MODEL_FILE = $(strip $(subst .gmodel,,$(subst .gorm,,$(subst .nib,,$($(GNUSTEP_INSTANCE)_MAIN_MODEL_FILE)))))
$(PALETTE_DIR)/Resources/palette.table: $(PALETTE_DIR)/Resources
# Depend on xxxpalette.table but only if it exists.
PALETTE_TABLE_DEPEND = $(wildcard $(GNUSTEP_INSTANCE)palette.table)
# FIXME - use stamp.make to depend on the value of the variables
# MAIN_MODEL_FILE, PRINCIPAL_CLASS and PALETTE_ICON
$(PALETTE_DIR)/Resources/palette.table: $(PALETTE_DIR)/Resources $(PALETTE_TABLE_DEPEND)
$(ECHO_CREATING)(echo "{";\
echo ' NOTE = "Automatically generated, do not edit!";'; \
echo " NibFile = \"$(MAIN_MODEL_FILE)\";"; \

View file

@ -92,11 +92,22 @@ ifeq ($(GNUSTEP_MAKE_SERVICES),)
GNUSTEP_MAKE_SERVICES = make_services
endif
# Depend on xxxInfo.plist but only if it exists.
GNUSTEP_PLIST_DEPEND = $(wildcard $(GNUSTEP_INSTANCE)Info.plist)
ifeq ($(GNUSTEP_PLIST_DEPEND),)
$(warning Service $(GNUSTEP_INSTANCE) missing $(GNUSTEP_INSTANCE)Info.plist)
endif
# FIXME - xxxInfo.plist in this case is not really a plist!
$(SERVICE_DIR)/Resources/Info-gnustep.plist: \
$(SERVICE_DIR)/Resources $(GNUSTEP_INSTANCE)Info.plist
$(SERVICE_DIR)/Resources $(GNUSTEP_PLIST_DEPEND)
$(ECHO_CREATING)(echo "{"; echo ' NOTE = "Automatically generated, do not edit!";'; \
echo " NSExecutable = \"$(GNUSTEP_INSTANCE)\";"; \
cat $(GNUSTEP_INSTANCE)Info.plist; \
if [ -r "$(GNUSTEP_INSTANCE)Info.plist" ]; then \
cat $(GNUSTEP_INSTANCE)Info.plist; \
fi; \
echo "}") >$@ ;\
if $(GNUSTEP_MAKE_SERVICES) --test $@; then : ; else rm -f $@; false; \
fi$(END_ECHO)