mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
* Instance/rules.make: Add detection for different forms of the
Info.plist. * Instance/application.make, * Instance/bundle.make, * Instance/framework.make, * Instance/gswapp.make, * Instance/palette.make, * Instance/service.make: Use GNUSTEP_PLIST_DEPEND directly. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@37522 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
925f28d5c8
commit
bcb8180e0d
8 changed files with 66 additions and 61 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2013-12-25 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Instance/rules.make: Add detection for different forms of the Info.plist.
|
||||
* Instance/application.make,
|
||||
* Instance/bundle.make,
|
||||
* Instance/framework.make,
|
||||
* Instance/gswapp.make,
|
||||
* Instance/palette.make,
|
||||
* Instance/service.make: Use GNUSTEP_PLIST_DEPEND directly.
|
||||
|
||||
2013-12-25 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* config.make.in: Use the correct CXX compiler. Fixes bug #36722.
|
||||
|
|
|
@ -242,37 +242,6 @@ endif
|
|||
|
||||
include $(GNUSTEP_MAKEFILES)/Instance/Shared/stamp-string.make
|
||||
|
||||
# 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 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
|
||||
# when using NeXT/OPENStep FoundationKit, and UNKNOWN when using
|
||||
# something else, so you can use
|
||||
# #ifdef GNUSTEP
|
||||
# ... some plist code for GNUstep ...
|
||||
# #else
|
||||
# ... some plist code for Apple ...
|
||||
# #endif
|
||||
# to have your .cplist use different code for each.
|
||||
#
|
||||
|
||||
# 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)
|
||||
# on the first line, and the rest of the file is a plain property list
|
||||
# dictionary. You must make sure your xxxInfo.plist is in this format
|
||||
|
@ -299,8 +268,8 @@ $(APP_INFO_PLIST_FILE): $(GNUSTEP_STAMP_DEPEND) $(GNUSTEP_PLIST_DEPEND)
|
|||
echo " CFBundleIconFile = \"$(APPLICATION_ICON)\";"; \
|
||||
fi; \
|
||||
echo " NSPrincipalClass = \"$(PRINCIPAL_CLASS)\";"; \
|
||||
if [ -r "$(GNUSTEP_INSTANCE)Info.plist" ]; then \
|
||||
sed '1d' "$(GNUSTEP_INSTANCE)Info.plist"; \
|
||||
if [ -r "$(GNUSTEP_PLIST_DEPEND)" ]; then \
|
||||
sed '1d' "$(GNUSTEP_PLIST_DEPEND)"; \
|
||||
else \
|
||||
echo "}"; \
|
||||
fi) > $@$(END_ECHO)
|
||||
|
@ -316,8 +285,8 @@ $(APP_INFO_PLIST_FILE): $(GNUSTEP_STAMP_DEPEND) $(GNUSTEP_PLIST_DEPEND)
|
|||
fi; \
|
||||
echo " NSPrincipalClass = \"$(PRINCIPAL_CLASS)\";"; \
|
||||
echo "}") >$@$(END_ECHO)
|
||||
-$(ECHO_NOTHING)if [ -r "$(GNUSTEP_INSTANCE)Info.plist" ]; then \
|
||||
plmerge $@ "$(GNUSTEP_INSTANCE)Info.plist"; \
|
||||
-$(ECHO_NOTHING)if [ -r "$(GNUSTEP_PLIST_DEPEND)" ]; then \
|
||||
plmerge $@ "$(GNUSTEP_PLIST_DEPEND)"; \
|
||||
fi$(END_ECHO)
|
||||
|
||||
$(APP_DIR)/Resources/$(GNUSTEP_INSTANCE).desktop: $(APP_INFO_PLIST_FILE)
|
||||
|
|
|
@ -293,9 +293,6 @@ 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: $(GNUSTEP_STAMP_DEPEND) \
|
||||
|
@ -305,8 +302,8 @@ $(BUNDLE_DIR)/Resources/Info-gnustep.plist: $(GNUSTEP_STAMP_DEPEND) \
|
|||
echo " NSMainNibFile = \"$(MAIN_MODEL_FILE)\";"; \
|
||||
echo " NSPrincipalClass = \"$(PRINCIPAL_CLASS)\";"; \
|
||||
echo "}") >$@$(END_ECHO)
|
||||
$(ECHO_NOTHING)if [ -r "$(GNUSTEP_INSTANCE)Info.plist" ]; then \
|
||||
plmerge $@ $(GNUSTEP_INSTANCE)Info.plist; \
|
||||
$(ECHO_NOTHING)if [ -r "$(GNUSTEP_PLIST_DEPEND)" ]; then \
|
||||
plmerge $@ $(GNUSTEP_PLIST_DEPEND); \
|
||||
fi$(END_ECHO)
|
||||
else # following code for when no object file is built
|
||||
# GNUstep bundles
|
||||
|
@ -315,8 +312,8 @@ $(BUNDLE_DIR)/Resources/Info-gnustep.plist: $(GNUSTEP_STAMP_DEPEND) \
|
|||
$(ECHO_CREATING)(echo "{"; echo ' NOTE = "Automatically generated, do not edit!";'; \
|
||||
echo " NSMainNibFile = \"$(MAIN_MODEL_FILE)\";"; \
|
||||
echo "}") >$@$(END_ECHO)
|
||||
$(ECHO_NOTHING)if [ -r "$(GNUSTEP_INSTANCE)Info.plist" ]; then \
|
||||
plmerge $@ $(GNUSTEP_INSTANCE)Info.plist; \
|
||||
$(ECHO_NOTHING)if [ -r "$(GNUSTEP_PLIST_DEPEND)" ]; then \
|
||||
plmerge $@ $(GNUSTEP_PLIST_DEPEND); \
|
||||
fi$(END_ECHO)
|
||||
endif
|
||||
|
||||
|
|
|
@ -640,9 +640,6 @@ $(FRAMEWORK_VERSION_DIR)/Resources/Info.plist:
|
|||
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: \
|
||||
$(DUMMY_FRAMEWORK_FILE) \
|
||||
|
@ -655,8 +652,8 @@ $(FRAMEWORK_VERSION_DIR)/Resources/Info-gnustep.plist: \
|
|||
cat $(DUMMY_FRAMEWORK_CLASS_LIST); \
|
||||
echo " ;"; \
|
||||
echo "}") >$@$(END_ECHO)
|
||||
$(ECHO_NOTHING)if [ -r "$(GNUSTEP_INSTANCE)Info.plist" ]; then \
|
||||
plmerge $@ $(GNUSTEP_INSTANCE)Info.plist; \
|
||||
$(ECHO_NOTHING)if [ -r "$(GNUSTEP_PLIST_DEPEND)" ]; then \
|
||||
plmerge $@ $(GNUSTEP_PLIST_DEPEND); \
|
||||
fi$(END_ECHO)
|
||||
|
||||
ifneq ($(BUILD_DLL),yes)
|
||||
|
|
|
@ -153,8 +153,6 @@ 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)))))
|
||||
|
||||
# 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!";'; \
|
||||
|
@ -164,8 +162,8 @@ $(GSWAPP_INFO_PLIST_FILE): $(GNUSTEP_PLIST_DEPEND)
|
|||
echo " HasGSWComponents = \"$(HAS_GSWCOMPONENTS)\";"; \
|
||||
fi; \
|
||||
echo " NSMainNibFile = \"$(MAIN_MODEL_FILE)\";"; \
|
||||
if [ -r "$(GNUSTEP_INSTANCE)Info.plist" ]; then \
|
||||
cat $(GNUSTEP_INSTANCE)Info.plist; \
|
||||
if [ -r "$(GNUSTEP_PLIST_DEPEND)" ]; then \
|
||||
cat $(GNUSTEP_PLIST_DEPEND); \
|
||||
fi; \
|
||||
if [ "$(GSWAPP_INFO_PLIST)" != "" ]; then \
|
||||
cat $(GSWAPP_INFO_PLIST); \
|
||||
|
|
|
@ -155,16 +155,13 @@ ifeq ($(PALETTE_ICON),)
|
|||
PALETTE_ICON = $(GNUSTEP_INSTANCE)
|
||||
endif
|
||||
|
||||
# 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 \
|
||||
cat $(GNUSTEP_INSTANCE)Info.plist; \
|
||||
if [ -r "$(GNUSTEP_PLIST_DEPEND)" ]; then \
|
||||
cat $(GNUSTEP_PLIST_DEPEND); \
|
||||
fi; \
|
||||
echo "}") >$@$(END_ECHO)
|
||||
|
||||
|
|
|
@ -487,3 +487,43 @@ LANGUAGES = $(strip $($(GNUSTEP_INSTANCE)_LANGUAGES))
|
|||
ifeq ($(LANGUAGES),)
|
||||
LANGUAGES = English
|
||||
endif
|
||||
|
||||
# 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 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
|
||||
# when using NeXT/OPENStep FoundationKit, and UNKNOWN when using
|
||||
# something else, so you can use
|
||||
# #ifdef GNUSTEP
|
||||
# ... some plist code for GNUstep ...
|
||||
# #else
|
||||
# ... some plist code for Apple ...
|
||||
# #endif
|
||||
# to have your .cplist use different code for each.
|
||||
#
|
||||
|
||||
# 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)
|
||||
|
||||
# older versions of XCode use the form Info-xxx.plist
|
||||
ifeq ($(GNUSTEP_PLIST_DEPEND),)
|
||||
GNUSTEP_PLIST_DEPEND = $(wildcard Info-$(GNUSTEP_INSTANCE).plist)
|
||||
endif
|
||||
|
||||
# Newer versions of XCode use the form xxx-Info.plist
|
||||
ifeq ($(GNUSTEP_PLIST_DEPEND),)
|
||||
GNUSTEP_PLIST_DEPEND = $(wildcard $(GNUSTEP_INSTANCE)-Info.plist)
|
||||
endif
|
||||
|
||||
# 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
|
||||
|
|
|
@ -130,9 +130,6 @@ 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
|
||||
|
@ -143,8 +140,8 @@ $(SERVICE_DIR)/Resources/Info-gnustep.plist: \
|
|||
$(SERVICE_DIR)/Resources $(GNUSTEP_PLIST_DEPEND)
|
||||
$(ECHO_CREATING)(echo "{"; echo ' NOTE = "Automatically generated, do not edit!";'; \
|
||||
echo " NSExecutable = \"$(GNUSTEP_INSTANCE)\";"; \
|
||||
if [ -r "$(GNUSTEP_INSTANCE)Info.plist" ]; then \
|
||||
cat $(GNUSTEP_INSTANCE)Info.plist; \
|
||||
if [ -r "$(GNUSTEP_PLIST_DEPEND)" ]; then \
|
||||
cat $(GNUSTEP_PLIST_DEPEND); \
|
||||
fi; \
|
||||
echo "}") >$@ ;\
|
||||
if $(GNUSTEP_MAKE_SERVICES) --test $@; then : ; else rm -f $@; false; \
|
||||
|
|
Loading…
Reference in a new issue