2002-11-06 10:59:52 +00:00
|
|
|
# -*-makefile-*-
|
2002-01-31 17:57:16 +00:00
|
|
|
# application.make
|
|
|
|
#
|
|
|
|
# Instance Makefile rules to build GNUstep-based applications.
|
|
|
|
#
|
2010-02-12 09:19:25 +00:00
|
|
|
# Copyright (C) 1997 - 2010 Free Software Foundation, Inc.
|
2002-01-31 17:57:16 +00:00
|
|
|
#
|
2010-02-12 09:19:25 +00:00
|
|
|
# Author: Nicola Pero <nicola.pero@meta-innovation.com>
|
2002-01-31 17:57:16 +00:00
|
|
|
# Author: Ovidiu Predescu <ovidiu@net-community.com>
|
|
|
|
# Based on the original version by Scott Christley.
|
|
|
|
#
|
|
|
|
# This file is part of the GNUstep Makefile Package.
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
2007-10-30 14:18:41 +00:00
|
|
|
# as published by the Free Software Foundation; either version 3
|
2002-01-31 17:57:16 +00:00
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public
|
2007-07-13 10:11:48 +00:00
|
|
|
# License along with this library; see the file COPYING.
|
2002-01-31 17:57:16 +00:00
|
|
|
# If not, write to the Free Software Foundation,
|
2005-05-22 03:20:14 +00:00
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-01-31 17:57:16 +00:00
|
|
|
|
2008-02-19 10:49:20 +00:00
|
|
|
# Applications usually link against a gui library (if available).
|
2008-02-19 14:15:08 +00:00
|
|
|
ifeq ($(NEEDS_GUI),)
|
2008-03-11 01:06:50 +00:00
|
|
|
NEEDS_GUI = yes
|
2008-02-19 14:15:08 +00:00
|
|
|
endif
|
2008-02-19 10:49:20 +00:00
|
|
|
|
2002-01-31 17:57:16 +00:00
|
|
|
#
|
|
|
|
# Include in the common makefile rules
|
|
|
|
#
|
|
|
|
ifeq ($(RULES_MAKE_LOADED),)
|
2002-11-06 10:59:52 +00:00
|
|
|
include $(GNUSTEP_MAKEFILES)/rules.make
|
2002-01-31 17:57:16 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# The name of the application is in the APP_NAME variable.
|
|
|
|
# The list of application resource directories is in xxx_RESOURCE_DIRS
|
|
|
|
# The list of application resource files is in xxx_RESOURCE_FILES
|
|
|
|
# The list of localized resource files is in xxx_LOCALIZED_RESOURCE_FILES
|
|
|
|
# The list of supported languages is in xxx_LANGUAGES
|
|
|
|
# The name of the application icon (if any) is in xxx_APPLICATION_ICON
|
|
|
|
# The name of the app class is xxx_PRINCIPAL_CLASS (defaults to NSApplication).
|
2008-10-21 11:18:05 +00:00
|
|
|
#
|
|
|
|
# If you want to insert your own entries into Info.plist (or
|
|
|
|
# Info-gnustep.plist) you should create a xxxInfo.plist file (where
|
|
|
|
# xxx is the application name) and gnustep-make will automatically
|
|
|
|
# read it and merge it into Info-gnustep.plist.
|
2002-01-31 17:57:16 +00:00
|
|
|
#
|
|
|
|
|
2002-03-19 13:06:56 +00:00
|
|
|
.PHONY: internal-app-all_ \
|
|
|
|
internal-app-install_ \
|
|
|
|
internal-app-uninstall_ \
|
2002-11-06 10:59:52 +00:00
|
|
|
internal-app-copy_into_dir \
|
2009-02-23 11:12:11 +00:00
|
|
|
internal-application-build-template \
|
|
|
|
internal-app-run-compile-submake \
|
|
|
|
internal-app-compile
|
2002-01-31 17:57:16 +00:00
|
|
|
|
2002-09-26 00:56:54 +00:00
|
|
|
#
|
|
|
|
# Determine where to install. By default, install into GNUSTEP_APPS.
|
|
|
|
#
|
|
|
|
ifneq ($($(GNUSTEP_INSTANCE)_INSTALL_DIR),)
|
|
|
|
APP_INSTALL_DIR = $($(GNUSTEP_INSTANCE)_INSTALL_DIR)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(APP_INSTALL_DIR),)
|
|
|
|
APP_INSTALL_DIR = $(GNUSTEP_APPS)
|
|
|
|
endif
|
|
|
|
|
2002-01-31 17:57:16 +00:00
|
|
|
APP_DIR_NAME = $(GNUSTEP_INSTANCE:=.$(APP_EXTENSION))
|
2003-10-13 23:25:23 +00:00
|
|
|
APP_DIR = $(GNUSTEP_BUILD_DIR)/$(APP_DIR_NAME)
|
2002-02-28 18:02:55 +00:00
|
|
|
|
2002-09-26 01:05:11 +00:00
|
|
|
#
|
|
|
|
# Now include the standard resource-bundle routines from Shared/bundle.make
|
|
|
|
#
|
2002-12-25 02:13:35 +00:00
|
|
|
|
2002-12-30 16:33:21 +00:00
|
|
|
ifneq ($(FOUNDATION_LIB), apple)
|
2002-12-25 02:13:35 +00:00
|
|
|
# GNUstep bundle
|
2003-10-13 23:25:23 +00:00
|
|
|
GNUSTEP_SHARED_BUNDLE_RESOURCE_PATH = $(APP_DIR)/Resources
|
|
|
|
APP_INFO_PLIST_FILE = $(APP_DIR)/Resources/Info-gnustep.plist
|
2002-12-25 02:13:35 +00:00
|
|
|
else
|
|
|
|
# OSX bundle
|
2003-10-13 23:25:23 +00:00
|
|
|
GNUSTEP_SHARED_BUNDLE_RESOURCE_PATH = $(APP_DIR)/Contents/Resources
|
|
|
|
APP_INFO_PLIST_FILE = $(APP_DIR)/Contents/Info.plist
|
2002-12-25 02:13:35 +00:00
|
|
|
endif
|
2007-03-09 17:27:55 +00:00
|
|
|
GNUSTEP_SHARED_BUNDLE_INSTALL_NAME = $(APP_DIR_NAME)
|
|
|
|
GNUSTEP_SHARED_BUNDLE_INSTALL_LOCAL_PATH = .
|
|
|
|
GNUSTEP_SHARED_BUNDLE_INSTALL_PATH = $(APP_INSTALL_DIR)
|
2002-02-28 18:02:55 +00:00
|
|
|
include $(GNUSTEP_MAKEFILES)/Instance/Shared/bundle.make
|
2002-01-31 17:57:16 +00:00
|
|
|
|
2002-12-30 16:33:21 +00:00
|
|
|
ifneq ($(FOUNDATION_LIB), apple)
|
2003-10-13 23:25:23 +00:00
|
|
|
APP_FILE_NAME = $(APP_DIR_NAME)/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_INSTANCE)$(EXEEXT)
|
2002-01-31 17:57:16 +00:00
|
|
|
else
|
2004-03-07 15:37:22 +00:00
|
|
|
APP_FILE_NAME = $(APP_DIR_NAME)/Contents/MacOS/$(GNUSTEP_INSTANCE)$(EXEEXT)
|
2002-01-31 17:57:16 +00:00
|
|
|
endif
|
|
|
|
|
2003-10-13 23:25:23 +00:00
|
|
|
APP_FILE = $(GNUSTEP_BUILD_DIR)/$(APP_FILE_NAME)
|
|
|
|
|
|
|
|
|
2002-01-31 17:57:16 +00:00
|
|
|
#
|
|
|
|
# Internal targets
|
|
|
|
#
|
|
|
|
|
2005-03-22 04:21:57 +00:00
|
|
|
# If building on Windows, also generate an import library which can be
|
|
|
|
# used by loadable bundles to resolve symbols in the application. If
|
|
|
|
# a loadable bundle/palette needs to use symbols in the application,
|
|
|
|
# it just needs to link against this APP_NAME/APP_NAME.exe.a library.
|
|
|
|
# We add .exe to the application name to account for Gorm which is
|
|
|
|
# using the same name for the library (libGorm.dll.a) and for the
|
|
|
|
# application (Gorm.exe). Using this terminology, just add
|
|
|
|
# Gorm.app/Gorm.exe.a to the list of objects you link and you get it
|
|
|
|
# working. TODO: Move this into target.make
|
|
|
|
ifeq ($(BUILD_DLL), yes)
|
|
|
|
ALL_LDFLAGS += -Wl,--export-all-symbols -Wl,--out-implib,$(GNUSTEP_BUILD_DIR)/$(APP_DIR_NAME)/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_INSTANCE).exe$(LIBEXT)
|
|
|
|
endif
|
|
|
|
|
2007-03-02 03:15:32 +00:00
|
|
|
# If building on MinGW, also mark the application as a 'GUI'
|
|
|
|
# application. This prevents an ugly terminal window from being
|
|
|
|
# automatically opened when you start your application directly by
|
|
|
|
# double-clicking on the .exe icon in the Windows file manager. TODO:
|
|
|
|
# Move this into target.make, but somehow make sure it is only used
|
|
|
|
# when linking applications.
|
|
|
|
ifeq ($(findstring mingw32, $(GNUSTEP_TARGET_OS)), mingw32)
|
2009-10-26 17:58:11 +00:00
|
|
|
ALL_LDFLAGS += -Wl,-subsystem,windows
|
2007-03-02 03:15:32 +00:00
|
|
|
endif
|
|
|
|
|
2002-01-31 17:57:16 +00:00
|
|
|
$(APP_FILE): $(OBJ_FILES_TO_LINK)
|
2009-03-19 16:59:53 +00:00
|
|
|
ifeq ($(OBJ_FILES_TO_LINK),)
|
|
|
|
$(WARNING_EMPTY_LINKING)
|
|
|
|
endif
|
2005-09-22 22:07:57 +00:00
|
|
|
$(ECHO_LINKING)$(LD) $(ALL_LDFLAGS) $(CC_LDFLAGS) -o $(LDOUT)$@ \
|
2008-02-19 10:49:20 +00:00
|
|
|
$(OBJ_FILES_TO_LINK) $(ALL_LIB_DIRS) $(ALL_LIBS)$(END_ECHO)
|
2002-01-31 17:57:16 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Compilation targets
|
|
|
|
#
|
2009-02-16 11:21:57 +00:00
|
|
|
ifeq ($(GNUSTEP_MAKE_PARALLEL_BUILDING), no)
|
|
|
|
# Standard building
|
|
|
|
internal-app-run-compile-submake: $(APP_FILE)
|
|
|
|
else
|
|
|
|
# Parallel building. The actual compilation is delegated to a
|
|
|
|
# sub-make invocation where _GNUSTEP_MAKE_PARALLEL is set to yet.
|
|
|
|
# That sub-make invocation will compile files in parallel.
|
|
|
|
internal-app-run-compile-submake:
|
2010-02-14 23:13:47 +00:00
|
|
|
$(ECHO_NOTHING_RECURSIVE_MAKE)$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory --no-keep-going \
|
2009-02-16 11:21:57 +00:00
|
|
|
internal-app-compile \
|
|
|
|
GNUSTEP_TYPE=$(GNUSTEP_TYPE) \
|
|
|
|
GNUSTEP_INSTANCE=$(GNUSTEP_INSTANCE) \
|
|
|
|
GNUSTEP_OPERATION=compile \
|
|
|
|
GNUSTEP_BUILD_DIR="$(GNUSTEP_BUILD_DIR)" \
|
2010-02-14 23:13:47 +00:00
|
|
|
_GNUSTEP_MAKE_PARALLEL=yes$(END_ECHO_RECURSIVE_MAKE)
|
2009-02-16 11:21:57 +00:00
|
|
|
|
|
|
|
internal-app-compile: $(APP_FILE)
|
|
|
|
endif
|
2002-12-15 15:48:39 +00:00
|
|
|
|
2002-12-30 16:33:21 +00:00
|
|
|
ifeq ($(FOUNDATION_LIB), apple)
|
2010-02-12 09:19:25 +00:00
|
|
|
internal-app-all_:: $(GNUSTEP_OBJ_INSTANCE_DIR) \
|
2009-10-10 17:33:02 +00:00
|
|
|
$(OBJ_DIRS_TO_CREATE) \
|
2004-03-07 15:37:22 +00:00
|
|
|
$(APP_DIR)/Contents/MacOS \
|
2009-02-16 11:21:57 +00:00
|
|
|
internal-app-run-compile-submake \
|
2002-12-25 02:13:35 +00:00
|
|
|
shared-instance-bundle-all \
|
|
|
|
$(APP_INFO_PLIST_FILE)
|
2009-10-10 14:59:24 +00:00
|
|
|
# If they specified Info.plist in the xxx_RESOURCE_FILES, print a
|
|
|
|
# warning. They are supposed to provide a xxxInfo.plist which gets
|
|
|
|
# merged with the automatically generated entries to generate
|
|
|
|
# Info.plist.
|
|
|
|
ifneq ($(filter Info.plist,$($(GNUSTEP_INSTANCE)_RESOURCE_FILES)),)
|
|
|
|
$(WARNING_INFO_PLIST)
|
|
|
|
endif
|
2002-01-31 17:57:16 +00:00
|
|
|
|
2004-03-07 15:37:22 +00:00
|
|
|
$(APP_DIR)/Contents/MacOS:
|
2003-05-27 10:19:06 +00:00
|
|
|
$(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)
|
2002-01-31 17:57:16 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2010-02-12 09:19:25 +00:00
|
|
|
internal-app-all_:: $(GNUSTEP_OBJ_INSTANCE_DIR) \
|
2009-10-10 17:33:02 +00:00
|
|
|
$(OBJ_DIRS_TO_CREATE) \
|
2003-10-13 23:25:23 +00:00
|
|
|
$(APP_DIR)/$(GNUSTEP_TARGET_LDIR) \
|
2009-02-16 11:21:57 +00:00
|
|
|
internal-app-run-compile-submake \
|
2002-03-19 13:06:56 +00:00
|
|
|
internal-application-build-template \
|
2003-10-13 23:25:23 +00:00
|
|
|
$(APP_DIR)/Resources \
|
2002-12-25 02:13:35 +00:00
|
|
|
$(APP_INFO_PLIST_FILE) \
|
2003-10-13 23:25:23 +00:00
|
|
|
$(APP_DIR)/Resources/$(GNUSTEP_INSTANCE).desktop \
|
2002-03-19 13:06:56 +00:00
|
|
|
shared-instance-bundle-all
|
2009-10-10 14:59:24 +00:00
|
|
|
# If they specified Info-gnustep.plist in the xxx_RESOURCE_FILES,
|
|
|
|
# print a warning. They are supposed to provide a xxxInfo.plist which
|
|
|
|
# gets merged with the automatically generated entries to generate
|
|
|
|
# Info-gnustep.plist.
|
|
|
|
ifneq ($(filter Info-gnustep.plist,$($(GNUSTEP_INSTANCE)_RESOURCE_FILES)),)
|
|
|
|
$(WARNING_INFO_GNUSTEP_PLIST)
|
|
|
|
endif
|
2002-01-31 17:57:16 +00:00
|
|
|
|
2003-10-13 23:25:23 +00:00
|
|
|
$(APP_DIR)/$(GNUSTEP_TARGET_LDIR):
|
2003-05-27 10:19:06 +00:00
|
|
|
$(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)
|
2002-01-31 17:57:16 +00:00
|
|
|
|
2006-10-02 15:54:56 +00:00
|
|
|
ifeq ($(GNUSTEP_IS_FLATTENED), no)
|
2003-10-13 23:25:23 +00:00
|
|
|
internal-application-build-template: $(APP_DIR)/$(GNUSTEP_INSTANCE)
|
2002-02-28 18:02:55 +00:00
|
|
|
|
2003-10-13 23:25:23 +00:00
|
|
|
$(APP_DIR)/$(GNUSTEP_INSTANCE):
|
2003-05-27 12:07:03 +00:00
|
|
|
$(ECHO_NOTHING)cp $(GNUSTEP_MAKEFILES)/executable.template \
|
2003-10-13 23:25:23 +00:00
|
|
|
$(APP_DIR)/$(GNUSTEP_INSTANCE); \
|
|
|
|
chmod a+x $(APP_DIR)/$(GNUSTEP_INSTANCE)$(END_ECHO)
|
2007-03-08 17:15:05 +00:00
|
|
|
ifneq ($(CHOWN_TO),)
|
|
|
|
$(ECHO_CHOWNING)$(CHOWN) $(CHOWN_TO) $(APP_DIR)/$(GNUSTEP_INSTANCE)$(END_ECHO)
|
|
|
|
endif
|
2002-02-28 18:02:55 +00:00
|
|
|
else
|
|
|
|
internal-application-build-template:
|
2002-01-31 17:57:16 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2002-02-28 18:30:07 +00:00
|
|
|
PRINCIPAL_CLASS = $(strip $($(GNUSTEP_INSTANCE)_PRINCIPAL_CLASS))
|
|
|
|
|
2002-01-31 17:57:16 +00:00
|
|
|
ifeq ($(PRINCIPAL_CLASS),)
|
2002-02-28 18:30:07 +00:00
|
|
|
PRINCIPAL_CLASS = NSApplication
|
2002-01-31 17:57:16 +00:00
|
|
|
endif
|
|
|
|
|
2002-02-22 12:06:24 +00:00
|
|
|
APPLICATION_ICON = $($(GNUSTEP_INSTANCE)_APPLICATION_ICON)
|
|
|
|
|
2002-03-06 12:25:03 +00:00
|
|
|
MAIN_MODEL_FILE = $(strip $(subst .gmodel,,$(subst .gorm,,$(subst .nib,,$($(GNUSTEP_INSTANCE)_MAIN_MODEL_FILE)))))
|
|
|
|
|
2003-07-28 10:47:14 +00:00
|
|
|
MAIN_MARKUP_FILE = $(strip $(subst .gsmarkup,,$($(GNUSTEP_INSTANCE)_MAIN_MARKUP_FILE)))
|
2002-12-15 15:48:39 +00:00
|
|
|
|
2020-09-07 15:16:33 +00:00
|
|
|
MAIN_STORYBOARD_FILE = $(strip $(subst .storyboard,,$($(GNUSTEP_INSTANCE)_MAIN_STORYBOARD_FILE)))
|
2020-09-07 04:17:25 +00:00
|
|
|
|
2002-12-15 15:48:39 +00:00
|
|
|
# We must recreate Info.plist if PRINCIPAL_CLASS and/or
|
2020-09-07 04:17:25 +00:00
|
|
|
# APPLICATION_ICON and/or MAIN_MODEL_FILE and/or MAIN_MARKUP_FILE and/or
|
2020-09-07 15:16:33 +00:00
|
|
|
# MAIN_STORYBOARD_FILE has changed since last time we built Info.plist.
|
2020-09-07 04:17:25 +00:00
|
|
|
# We use stamp-string.make, which will store the variables in a stamp file
|
2007-03-16 12:23:56 +00:00
|
|
|
# inside GNUSTEP_STAMP_DIR, and rebuild Info.plist if
|
|
|
|
# GNUSTEP_STAMP_STRING changes. We will also depend on xxxInfo.plist
|
|
|
|
# if any.
|
2020-09-08 01:45:25 +00:00
|
|
|
GNUSTEP_STAMP_STRING = $(PRINCIPAL_CLASS)-$(APPLICATION_ICON)-$(MAIN_MODEL_FILE)-$(MAIN_MARKUP_FILE)-$(MAIN_STORYBOARD_FILE)
|
2004-03-07 15:37:22 +00:00
|
|
|
|
|
|
|
ifneq ($(FOUNDATION_LIB),apple)
|
2003-10-13 23:25:23 +00:00
|
|
|
GNUSTEP_STAMP_DIR = $(APP_DIR)
|
2002-12-15 15:48:39 +00:00
|
|
|
|
|
|
|
# Only for efficiency
|
2003-10-13 23:25:23 +00:00
|
|
|
$(GNUSTEP_STAMP_DIR): $(APP_DIR)/$(GNUSTEP_TARGET_LDIR)
|
2004-03-07 15:37:22 +00:00
|
|
|
else
|
|
|
|
# Everything goes in $(APP_DIR)/Contents on Apple
|
|
|
|
GNUSTEP_STAMP_DIR = $(APP_DIR)/Contents
|
2002-12-15 15:48:39 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
include $(GNUSTEP_MAKEFILES)/Instance/Shared/stamp-string.make
|
|
|
|
|
2003-02-26 17:40:37 +00:00
|
|
|
# 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
|
|
|
|
# to use it on Apple.
|
|
|
|
|
|
|
|
# The problem is, we need to add the automatically generated entries
|
|
|
|
# to this custom dictionary on Apple - to do that, we generate '{'
|
|
|
|
# followed by the custom entries, followed by xxxInfo.plist (with the
|
|
|
|
# first line removed), or by '}'. NB: "sed '1d' filename" prints out
|
|
|
|
# filename, except the first line.
|
|
|
|
|
|
|
|
# On GNUstep we use plmerge which is much slower, but should probably
|
|
|
|
# be safer, because as soon as xxxInfo.plist is in plist format, it
|
|
|
|
# should always work (even if the first line is not just a '{' and
|
|
|
|
# nothing else).
|
|
|
|
|
2002-12-30 16:33:21 +00:00
|
|
|
ifeq ($(FOUNDATION_LIB), apple)
|
2003-04-14 10:53:08 +00:00
|
|
|
$(APP_INFO_PLIST_FILE): $(GNUSTEP_STAMP_DEPEND) $(GNUSTEP_PLIST_DEPEND)
|
2003-05-27 10:35:01 +00:00
|
|
|
$(ECHO_CREATING)(echo "{"; echo ' NOTE = "Automatically generated, do not edit!";'; \
|
2002-12-25 02:13:35 +00:00
|
|
|
echo " NSExecutable = \"$(GNUSTEP_INSTANCE)\";"; \
|
|
|
|
echo " NSMainNibFile = \"$(MAIN_MODEL_FILE)\";"; \
|
2020-09-07 04:17:25 +00:00
|
|
|
echo " NSMainStoryboardFile = \"$(MAIN_STORYBOARD_FILE)\";"; \
|
2003-07-28 10:47:14 +00:00
|
|
|
echo " GSMainMarkupFile = \"$(MAIN_MARKUP_FILE)\";"; \
|
2002-12-25 02:13:35 +00:00
|
|
|
if [ "$(APPLICATION_ICON)" != "" ]; then \
|
2003-02-26 17:40:37 +00:00
|
|
|
echo " CFBundleIconFile = \"$(APPLICATION_ICON)\";"; \
|
2002-12-25 02:13:35 +00:00
|
|
|
fi; \
|
|
|
|
echo " NSPrincipalClass = \"$(PRINCIPAL_CLASS)\";"; \
|
2013-12-27 16:23:08 +00:00
|
|
|
if [ -r "$(GNUSTEP_PLIST_DEPEND)" ]; then \
|
|
|
|
sed '1d' "$(GNUSTEP_PLIST_DEPEND)"; \
|
2003-02-26 17:40:37 +00:00
|
|
|
else \
|
|
|
|
echo "}"; \
|
2003-05-27 10:35:01 +00:00
|
|
|
fi) > $@$(END_ECHO)
|
2002-12-25 02:13:35 +00:00
|
|
|
else
|
2003-04-14 10:53:08 +00:00
|
|
|
|
|
|
|
$(APP_INFO_PLIST_FILE): $(GNUSTEP_STAMP_DEPEND) $(GNUSTEP_PLIST_DEPEND)
|
2003-05-27 10:35:01 +00:00
|
|
|
$(ECHO_CREATING)(echo "{"; echo ' NOTE = "Automatically generated, do not edit!";'; \
|
2002-01-31 17:57:16 +00:00
|
|
|
echo " NSExecutable = \"$(GNUSTEP_INSTANCE)\";"; \
|
2002-03-06 12:25:03 +00:00
|
|
|
echo " NSMainNibFile = \"$(MAIN_MODEL_FILE)\";"; \
|
2020-09-07 04:17:25 +00:00
|
|
|
echo " NSMainStoryboardFile = \"$(MAIN_STORYBOARD_FILE)\";"; \
|
2003-07-28 10:47:14 +00:00
|
|
|
echo " GSMainMarkupFile = \"$(MAIN_MARKUP_FILE)\";"; \
|
2002-01-31 17:57:16 +00:00
|
|
|
if [ "$(APPLICATION_ICON)" != "" ]; then \
|
|
|
|
echo " NSIcon = \"$(APPLICATION_ICON)\";"; \
|
|
|
|
fi; \
|
|
|
|
echo " NSPrincipalClass = \"$(PRINCIPAL_CLASS)\";"; \
|
2003-05-27 10:35:01 +00:00
|
|
|
echo "}") >$@$(END_ECHO)
|
2013-12-27 16:23:08 +00:00
|
|
|
-$(ECHO_NOTHING)if [ -r "$(GNUSTEP_PLIST_DEPEND)" ]; then \
|
|
|
|
plmerge $@ "$(GNUSTEP_PLIST_DEPEND)"; \
|
2003-05-27 10:35:01 +00:00
|
|
|
fi$(END_ECHO)
|
2002-01-31 17:57:16 +00:00
|
|
|
|
2009-10-10 14:59:24 +00:00
|
|
|
$(APP_DIR)/Resources/$(GNUSTEP_INSTANCE).desktop: $(APP_INFO_PLIST_FILE)
|
2011-04-08 17:48:15 +00:00
|
|
|
$(ECHO_CREATING)pl2link $^ $(APP_DIR)/Resources/$(GNUSTEP_INSTANCE).desktop; \
|
|
|
|
chmod a+x $(APP_DIR)/Resources/$(GNUSTEP_INSTANCE).desktop$(END_ECHO)
|
2002-01-31 17:57:16 +00:00
|
|
|
|
2009-10-10 14:59:24 +00:00
|
|
|
endif
|
2002-01-31 17:57:16 +00:00
|
|
|
|
2002-11-06 10:59:52 +00:00
|
|
|
internal-app-copy_into_dir:: shared-instance-bundle-copy_into_dir
|
|
|
|
|
2007-03-08 17:15:05 +00:00
|
|
|
#
|
2002-09-26 01:05:11 +00:00
|
|
|
# install/uninstall targets
|
2007-03-08 17:15:05 +00:00
|
|
|
#
|
2002-09-26 00:56:54 +00:00
|
|
|
$(APP_INSTALL_DIR):
|
2003-05-27 10:19:06 +00:00
|
|
|
$(ECHO_CREATING)$(MKINSTALLDIRS) $@$(END_ECHO)
|
2002-01-31 17:57:16 +00:00
|
|
|
|
2007-03-08 17:15:05 +00:00
|
|
|
internal-app-install_:: shared-instance-bundle-install internal-install-app-wrapper
|
2002-09-26 01:05:11 +00:00
|
|
|
ifeq ($(strip),yes)
|
2003-10-13 23:25:23 +00:00
|
|
|
$(ECHO_STRIPPING)$(STRIP) $(APP_INSTALL_DIR)/$(APP_FILE_NAME)$(END_ECHO)
|
2002-09-26 01:05:11 +00:00
|
|
|
endif
|
|
|
|
|
2007-03-08 17:15:05 +00:00
|
|
|
internal-app-uninstall_:: shared-instance-bundle-uninstall internal-uninstall-app-wrapper
|
|
|
|
|
|
|
|
#
|
|
|
|
# Normally, to start up an application from the command-line you would
|
|
|
|
# need to use something like 'openapp Gorm.app'. To make this easier
|
|
|
|
# for end-users, we create a 'Gorm' executable inside GNUSTEP_TOOLS
|
|
|
|
# that does just that. Your environment needs to be setup (PATH and
|
|
|
|
# library path properly setup) to use this executable. But that's OK;
|
|
|
|
# if your environment is not setup, then GNUSTEP_TOOLS wouldn't be
|
|
|
|
# in your PATH and so typing 'openapp' or 'Gorm' at the command-line
|
|
|
|
# would do nothing anyway because they wouldn't be found! ;-)
|
|
|
|
#
|
|
|
|
# If your environment is difficult (and you can't fix it), then you
|
|
|
|
# should stick with 'openapp', and you may need to specify the whole
|
|
|
|
# PATH to openapp so that it is found. Eg,
|
|
|
|
# /usr/GNUstep/System/Tools/openapp Gorm.app. That will do a full
|
|
|
|
# GNUstep environment setup and should work no matter what.
|
|
|
|
#
|
|
|
|
# If we have symlinks, we simply create a symlink from
|
|
|
|
# GNUSTEP_TOOLS/GNUSTEP_TARGET_LDIR to APP_INSTALL_DIR/APP_FILE_NAME.
|
|
|
|
# This is the fastest way to start up your application; it just jumps
|
|
|
|
# to the executable file. In fact, it is much faster than openapp.
|
|
|
|
#
|
|
|
|
# If we don't have symlinks, we install an app-wrapper consisting of a
|
|
|
|
# one-liner shell script that will start openapp. This will be
|
|
|
|
# slower.
|
|
|
|
#
|
|
|
|
# These are the rules to create/delete this 'wrapper'.
|
|
|
|
#
|
|
|
|
$(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR):
|
|
|
|
$(ECHO_CREATING)$(MKINSTALLDIRS) $@$(END_ECHO)
|
|
|
|
|
|
|
|
ifeq ($(HAS_LN_S), yes)
|
|
|
|
# We generate a relative symlink. This makes it easier to use DESTDIR
|
|
|
|
# and other packaging relocation tricks.
|
|
|
|
internal-install-app-wrapper: $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR)
|
|
|
|
$(ECHO_NOTHING)\
|
|
|
|
cd $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR); \
|
|
|
|
$(RM_LN_S) $(GNUSTEP_INSTANCE); \
|
2008-01-09 17:44:12 +00:00
|
|
|
$(LN_S_RECURSIVE) `$(REL_PATH_SCRIPT) $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR) $(APP_INSTALL_DIR)/$(APP_FILE_NAME) short` \
|
2007-03-08 17:15:05 +00:00
|
|
|
$(GNUSTEP_INSTANCE)$(END_ECHO)
|
|
|
|
else
|
|
|
|
# Not sure that we can use relative paths with 'exec' in a portable
|
|
|
|
# way. We want the stuff to work with DESTDIR, so in this case we use
|
|
|
|
# openapp in the app wrapper. Much slower, but should work fine.
|
|
|
|
internal-install-app-wrapper: $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR)
|
|
|
|
$(ECHO_NOTHING)cat $(GNUSTEP_MAKEFILES)/app-wrapper.template \
|
|
|
|
| sed -e "s@GNUSTEP_INSTANCE@$(GNUSTEP_INSTANCE)@" > $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_INSTANCE); \
|
|
|
|
chmod a+x $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_INSTANCE)$(END_ECHO)
|
|
|
|
ifneq ($(CHOWN_TO),)
|
|
|
|
$(ECHO_CHOWNING)$(CHOWN) $(CHOWN_TO) $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_INSTANCE)$(END_ECHO)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
internal-uninstall-app-wrapper:
|
|
|
|
$(ECHO_NOTHING)$(RM) -f $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_INSTANCE)$(END_ECHO)
|
2002-01-31 17:57:16 +00:00
|
|
|
|
2002-10-22 00:27:39 +00:00
|
|
|
include $(GNUSTEP_MAKEFILES)/Instance/Shared/strings.make
|