~ubuntu-branches/ubuntu/edgy/sope/edgy

« back to all changes in this revision

Viewing changes to gnustep-make/Instance/gswapp.make

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Ley
  • Date: 2005-08-19 16:53:31 UTC
  • Revision ID: james.westby@ubuntu.com-20050819165331-hs683wz1osm708pw
Tags: upstream-4.4rc.2
ImportĀ upstreamĀ versionĀ 4.4rc.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
#   Instance/gswapp.make
 
3
#
 
4
#   Instance Makefile rules to build GNUstep web based applications.
 
5
#
 
6
#   Copyright (C) 1997-2004 Free Software Foundation, Inc.
 
7
#
 
8
#   Author:  Manuel Guesdon <mguesdon@sbuilders.com>,
 
9
#            Nicola Pero <n.pero@mi.flashnet.it>
 
10
#   Based on application.make by Ovidiu Predescu <ovidiu@net-community.com>
 
11
#   Based on gswapp.make by Helge Hess, MDlink online service center GmbH.
 
12
#   Based on the original version by Scott Christley.
 
13
#
 
14
#   This file is part of the GNUstep Makefile Package.
 
15
#
 
16
#   This library is free software; you can redistribute it and/or
 
17
#   modify it under the terms of the GNU General Public License
 
18
#   as published by the Free Software Foundation; either version 2
 
19
#   of the License, or (at your option) any later version.
 
20
#   
 
21
#   You should have received a copy of the GNU General Public
 
22
#   License along with this library; see the file COPYING.LIB.
 
23
#   If not, write to the Free Software Foundation,
 
24
#   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
25
 
 
26
ifeq ($(RULES_MAKE_LOADED),)
 
27
include $(GNUSTEP_MAKEFILES)/rules.make
 
28
endif
 
29
 
 
30
# FIXME/TODO - this file has not been updated to use
 
31
# Instance/Shared/bundle.make because it is linking resources instead of
 
32
# copying them.
 
33
 
 
34
 
 
35
# The name of the application is in the GSWAPP_NAME variable.
 
36
# The list of languages the app is localized in are in xxx_LANGUAGES <==
 
37
# The list of application resource file are in xxx_RESOURCE_FILES
 
38
# The list of localized application resource file are in 
 
39
#  xxx_LOCALIZED_RESOURCE_FILES <==
 
40
# The list of application resource directories are in xxx_RESOURCE_DIRS
 
41
# The list of application web server resource directories are in 
 
42
#  xxx_WEBSERVER_RESOURCE_DIRS <==
 
43
# The list of localized application web server resource directories are in 
 
44
#  xxx_LOCALIZED_WEBSERVER_RESOURCE_DIRS
 
45
# where xxx is the application name <==
 
46
 
 
47
# Determine the application directory extension
 
48
ifeq ($(profile), yes)
 
49
  GSWAPP_EXTENSION = profile
 
50
else
 
51
  ifeq ($(debug), yes)
 
52
    GSWAPP_EXTENSION = debug
 
53
  else
 
54
    GSWAPP_EXTENSION = gswa
 
55
  endif
 
56
endif
 
57
 
 
58
GNUSTEP_GSWAPPS = $(GNUSTEP_INSTALLATION_DIR)/GSWApps
 
59
 
 
60
.PHONY: internal-gswapp-all_ \
 
61
        internal-gswapp-install_ \
 
62
        internal-gswapp-uninstall_ \
 
63
        internal-gswapp-copy_into_dir
 
64
 
 
65
#
 
66
# Determine where to install.  By default, install into GNUSTEP_GSWAPPS.
 
67
#
 
68
ifneq ($($(GNUSTEP_INSTANCE)_INSTALL_DIR),)
 
69
  GSWAPP_INSTALL_DIR = $($(GNUSTEP_INSTANCE)_INSTALL_DIR)
 
70
endif
 
71
 
 
72
ifeq ($(GSWAPP_INSTALL_DIR),)
 
73
  GSWAPP_INSTALL_DIR = $(GNUSTEP_GSWAPPS)
 
74
endif
 
75
 
 
76
# Libraries that go before the WO libraries
 
77
ALL_GSW_LIBS =                                                          \
 
78
    $(shell $(WHICH_LIB_SCRIPT)                                         \
 
79
        $(ALL_LIB_DIRS)                                                 \
 
80
        $(ADDITIONAL_GSW_LIBS) $(AUXILIARY_GSW_LIBS) $(GSW_LIBS)        \
 
81
        $(ADDITIONAL_TOOL_LIBS) $(AUXILIARY_TOOL_LIBS)                  \
 
82
        $(FND_LIBS) $(ADDITIONAL_OBJC_LIBS) $(AUXILIARY_OBJC_LIBS)      \
 
83
        $(OBJC_LIBS) $(SYSTEM_LIBS) $(TARGET_SYSTEM_LIBS)               \
 
84
        debug=$(debug) profile=$(profile) shared=$(shared)              \
 
85
        libext=$(LIBEXT) shared_libext=$(SHARED_LIBEXT))
 
86
 
 
87
GSWAPP_DIR_NAME = $(GNUSTEP_INSTANCE:=.$(GSWAPP_EXTENSION))
 
88
GSWAPP_DIR = $(GNUSTEP_BUILD_DIR)/$(GSWAPP_DIR_NAME)
 
89
 
 
90
#
 
91
# Now include the standard resource-bundle routines from Shared/bundle.make
 
92
#
 
93
 
 
94
ifneq ($(FOUNDATION_LIB), apple)
 
95
  # GNUstep bundle
 
96
  GNUSTEP_SHARED_BUNDLE_RESOURCE_PATH = $(GSWAPP_DIR)/Resources
 
97
  GSWAPP_INFO_PLIST_FILE = $(GSWAPP_DIR)/Resources/Info-gnustep.plist
 
98
else
 
99
  # OSX bundle
 
100
  GNUSTEP_SHARED_BUNDLE_RESOURCE_PATH = $(GSWAPP_DIR)/Contents/Resources
 
101
  GSWAPP_INFO_PLIST_FILE = $(GSWAPP_DIR)/Contents/Info.plist
 
102
endif
 
103
GNUSTEP_SHARED_BUNDLE_MAIN_PATH = $(GSWAPP_DIR_NAME)
 
104
GNUSTEP_SHARED_BUNDLE_INSTALL_DIR = $(GSWAPP_INSTALL_DIR)
 
105
include $(GNUSTEP_MAKEFILES)/Instance/Shared/bundle.make
 
106
 
 
107
ifneq ($(FOUNDATION_LIB), apple)
 
108
GSWAPP_FILE_NAME = $(GSWAPP_DIR_NAME)/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_INSTANCE)$(EXEEXT)
 
109
else
 
110
GSWAPP_FILE_NAME = $(GSWAPP_DIR_NAME)/Contents/MacOS/$(GNUSTEP_INSTANCE)$(EXEEXT)
 
111
endif
 
112
 
 
113
GSWAPP_FILE = $(GNUSTEP_BUILD_DIR)/$(GSWAPP_FILE_NAME)
 
114
 
 
115
#
 
116
# Internal targets
 
117
#
 
118
 
 
119
$(GSWAPP_FILE): $(OBJ_FILES_TO_LINK)
 
120
        $(ECHO_LINKING)$(LD) $(ALL_LDFLAGS) -o $(LDOUT)$@ $(OBJ_FILES_TO_LINK)\
 
121
              $(ALL_GSW_LIBS)$(END_ECHO)
 
122
ifneq ($(FOUNDATION_LIB), apple)
 
123
        $(ECHO_NOTHING)$(TRANSFORM_PATHS_SCRIPT) $(subst -L,,$(ALL_LIB_DIRS)) \
 
124
                >$(GSWAPP_DIR)/$(GNUSTEP_TARGET_LDIR)/library_paths.openapp$(END_ECHO)
 
125
endif
 
126
 
 
127
#
 
128
# Compilation targets
 
129
#
 
130
ifeq ($(FOUNDATION_LIB), apple)
 
131
internal-gswapp-all_:: \
 
132
        $(GNUSTEP_OBJ_DIR) \
 
133
        $(GSWAPP_DIR)/Contents/MacOS \
 
134
        $(GSWAPP_FILE) \
 
135
        shared-instance-bundle-all \
 
136
        $(GSWAPP_INFO_PLIST_FILE)
 
137
 
 
138
$(GSWAPP_DIR)/Contents/MacOS:
 
139
        $(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)
 
140
else
 
141
 
 
142
internal-gswapp-all_:: $(GNUSTEP_OBJ_DIR) \
 
143
                    $(GSWAPP_DIR)/$(GNUSTEP_TARGET_LDIR) \
 
144
                    $(GSWAPP_FILE) \
 
145
                    $(GSWAPP_DIR)/Resources \
 
146
                    $(GSWAPP_INFO_PLIST_FILE) \
 
147
                    shared-instance-bundle-all
 
148
 
 
149
$(GSWAPP_DIR)/$(GNUSTEP_TARGET_LDIR):
 
150
        $(ECHO_CREATING)$(MKDIRS) $@$(END_ECHO)
 
151
 
 
152
endif
 
153
 
 
154
PRINCIPAL_CLASS = $(strip $($(GNUSTEP_INSTANCE)_PRINCIPAL_CLASS))
 
155
 
 
156
ifeq ($(PRINCIPAL_CLASS),)
 
157
  PRINCIPAL_CLASS = $(GNUSTEP_INSTANCE)
 
158
endif
 
159
 
 
160
HAS_GSWCOMPONENTS = $($(GNUSTEP_INSTANCE)_HAS_GSWCOMPONENTS)
 
161
GSWAPP_INFO_PLIST = $($(GNUSTEP_INSTANCE)_GSWAPP_INFO_PLIST)
 
162
MAIN_MODEL_FILE = $(strip $(subst .gmodel,,$(subst .gorm,,$(subst .nib,,$($(GNUSTEP_INSTANCE)_MAIN_MODEL_FILE)))))
 
163
 
 
164
$(GSWAPP_INFO_PLIST_FILE):
 
165
        $(ECHO_CREATING)(echo "{"; echo '  NOTE = "Automatically generated, do not edit!";'; \
 
166
          echo "  NSExecutable = \"$(GNUSTEP_INSTANCE)\";"; \
 
167
          echo "  NSPrincipalClass = \"$(PRINCIPAL_CLASS)\";"; \
 
168
          if [ "$(HAS_GSWCOMPONENTS)" != "" ]; then \
 
169
            echo "  HasGSWComponents = \"$(HAS_GSWCOMPONENTS)\";"; \
 
170
          fi; \
 
171
          echo "  NSMainNibFile = \"$(MAIN_MODEL_FILE)\";"; \
 
172
          if [ -r "$(GNUSTEP_INSTANCE)Info.plist" ]; then \
 
173
            cat $(GNUSTEP_INSTANCE)Info.plist; \
 
174
          fi; \
 
175
          if [ "$(GSWAPP_INFO_PLIST)" != "" ]; then \
 
176
            cat $(GSWAPP_INFO_PLIST); \
 
177
          fi; \
 
178
          echo "}") >$@$(END_ECHO)
 
179
 
 
180
internal-gswapp-copy_into_dir:: shared-instance-bundle-copy_into_dir
 
181
 
 
182
# install/uninstall targets
 
183
 
 
184
$(GSWAPP_INSTALL_DIR):
 
185
        $(ECHO_CREATING)$(MKINSTALLDIRS) $@$(END_ECHO)
 
186
 
 
187
internal-gswapp-install_:: shared-instance-bundle-install
 
188
ifeq ($(strip),yes)
 
189
        $(ECHO_STRIPPING)$(STRIP) $(GSWAPP_INSTALL_DIR)/$(GSWAPP_FILE_NAME)$(END_ECHO)
 
190
endif
 
191
 
 
192
internal-gswapp-uninstall_:: shared-instance-bundle-uninstall
 
193
 
 
194
include $(GNUSTEP_MAKEFILES)/Instance/Shared/strings.make