~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to build/NWGNUtail.inc

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# This contains final targets and should be included at the end of any
 
3
# NWGNUmakefile file
 
4
#
 
5
 
 
6
#
 
7
# If we are going to create an nlm, make sure we have assigned variables to
 
8
# use during the link.
 
9
#
 
10
echo NLM_NAME=$(NLM_NAME)
 
11
ifndef NLM_NAME
 
12
NLM_NAME = $(TARGET_nlm)
 
13
endif
 
14
 
 
15
ifndef NLM_DESCRIPTION
 
16
NLM_DESCRIPTION = $(NLM_NAME)
 
17
endif
 
18
 
 
19
ifndef NLM_THREAD_NAME
 
20
NLM_THREAD_NAME = $(NLM_NAME) Thread
 
21
endif
 
22
 
 
23
ifndef NLM_SCREEN_NAME
 
24
NLM_SCREEN_NAME = DEFAULT
 
25
endif
 
26
 
 
27
ifndef NLM_COPYRIGHT
 
28
NLM_COPYRIGHT = Copyright 2006 The Apache Software Foundation. Licensed under the Apache License Version 2.0.
 
29
endif
 
30
 
 
31
#
 
32
# Create dependency lists based on the files available
 
33
#
 
34
 
 
35
CCOPT_DEPENDS   = \
 
36
                                $(AP_WORK)\build\NWGNUhead.inc \
 
37
                                $(AP_WORK)\build\NWGNUenvironment.inc \
 
38
                                $(AP_WORK)\build\NWGNUtail.inc \
 
39
                                NWGNUmakefile \
 
40
                                $(CUSTOM_INI) \
 
41
                                $(EOLIST)
 
42
 
 
43
CPPOPT_DEPENDS  = \
 
44
                                $(AP_WORK)\build\NWGNUhead.inc \
 
45
                                $(AP_WORK)\build\NWGNUenvironment.inc \
 
46
                                $(AP_WORK)\build\NWGNUtail.inc \
 
47
                                NWGNUmakefile \
 
48
                                $(CUSTOM_INI) \
 
49
                                $(EOLIST)
 
50
 
 
51
$(NLM_NAME)_LINKOPT_DEPENDS     = \
 
52
                                $(TARGET_lib) \
 
53
                                $(AP_WORK)\build\NWGNUenvironment.inc \
 
54
                                NWGNUmakefile \
 
55
                                $(AP_WORK)\build\NWGNUtail.inc \
 
56
                                $(CUSTOM_INI) \
 
57
                                $(VERSION_INC) \
 
58
                                $(EOLIST)
 
59
 
 
60
ifeq "$(words $(strip $(TARGET_lib)))" "1"
 
61
LIB_NAME                                        = $(basename $(notdir $(TARGET_lib)))
 
62
$(LIB_NAME)_LIBLST_DEPENDS      = \
 
63
                                $(FILES_lib_objs) \
 
64
                                $(AP_WORK)\build\NWGNUenvironment.inc \
 
65
                                NWGNUmakefile \
 
66
                                $(AP_WORK)\build\NWGNUtail.inc \
 
67
                                $(CUSTOM_INI) \
 
68
                                $(EOLIST)
 
69
endif
 
70
 
 
71
ifeq "$(wildcard NWGNU$(LIB_NAME))" "NWGNU$(LIB_NAME)"
 
72
$(LIB_NAME)_LIBLST_DEPENDS      += NWGNU$(LIB_NAME)
 
73
endif
 
74
 
 
75
ifeq "$(wildcard NWGNU$(NLM_NAME))" "NWGNU$(NLM_NAME)"
 
76
$(NLM_NAME)_LINKOPT_DEPENDS     += NWGNU$(NLM_NAME)
 
77
CCOPT_DEPENDS   += NWGNU$(NLM_NAME)
 
78
CPPOPT_DEPENDS  += NWGNU$(NLM_NAME)
 
79
endif
 
80
 
 
81
#
 
82
# Generic compiler rules
 
83
#
 
84
 
 
85
$(AP_WORK)\build\NWGNUversion.inc : $(AP_WORK)\include\ap_release.h $(AP_WORK)\build\nw_ver.awk
 
86
        @echo Generating $(subst /,\,$@)
 
87
        awk -f $(AP_WORK)\build\nw_ver.awk $(AP_WORK)\include\ap_release.h > $(AP_WORK)\build\NWGNUversion.inc
 
88
 
 
89
-include $(AP_WORK)\build\NWGNUversion.inc
 
90
 
 
91
ifneq "$(strip $(VERSION_STR))" ""
 
92
VERSION_INC = $(AP_WORK)\build\NWGNUversion.inc
 
93
else
 
94
VERSION         = 2,0,0
 
95
VERSION_STR     = 2.0.0
 
96
endif
 
97
 
 
98
 
 
99
ifeq "$(words $(strip $(TARGET_nlm)))" "1"
 
100
 
 
101
$(OBJDIR)/%.o: %.c $(OBJDIR)\$(NLM_NAME)_cc.opt
 
102
        @echo Compiling $<
 
103
        $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
 
104
 
 
105
$(OBJDIR)\$(NLM_NAME)_cc.opt: $(CCOPT_DEPENDS)
 
106
        $(CHK) $@ $(DEL) $@
 
107
        @echo Generating $@
 
108
ifneq "$(strip $(CFLAGS))" ""
 
109
        @echo $(CFLAGS) >> $@
 
110
endif
 
111
ifneq "$(strip $(XCFLAGS))" ""
 
112
        @echo $(XCFLAGS) >> $@
 
113
endif
 
114
ifneq "$(strip $(XINCDIRS))" ""
 
115
        @echo $(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir)) >> $@
 
116
endif
 
117
ifneq "$(strip $(INCDIRS))" ""
 
118
        @echo $(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir)) >> $@
 
119
endif
 
120
ifneq "$(strip $(DEFINES))" ""
 
121
        @echo $(DEFINES) >> $@
 
122
endif
 
123
ifneq "$(strip $(XDEFINES))" ""
 
124
        @echo $(XDEFINES) >> $@
 
125
endif
 
126
 
 
127
$(OBJDIR)/%.o: %.cpp $(OBJDIR)\cpp.opt
 
128
        @echo Compiling $<
 
129
        $(CPP) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cpp.opt
 
130
 
 
131
$(OBJDIR)\cpp.opt: $(CPPOPT_DEPENDS)
 
132
        $(CHK) $@ $(DEL) $@
 
133
        @echo Generating $@
 
134
ifneq "$(strip $(CFLAGS))" ""
 
135
        @echo $(CFLAGS) >> $@
 
136
endif
 
137
ifneq "$(strip $(XCFLAGS))" ""
 
138
        @echo $(XCFLAGS) >> $@
 
139
endif
 
140
ifneq "$(strip $(XINCDIRS))" ""
 
141
        @echo $(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir)) >> $@
 
142
endif
 
143
ifneq "$(strip $(INCDIRS))" ""
 
144
        @echo $(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir)) >> $@
 
145
endif
 
146
ifneq "$(strip $(DEFINES))" ""
 
147
        @echo $(DEFINES) >> $@
 
148
endif
 
149
ifneq "$(strip $(XDEFINES))" ""
 
150
        @echo $(XDEFINES) >> $@
 
151
endif
 
152
 
 
153
endif # one target nlm
 
154
 
 
155
#
 
156
# Rules to build libraries
 
157
#
 
158
 
 
159
# If we only have one target library then build it
 
160
 
 
161
ifeq "$(words $(strip $(TARGET_lib)))" "1"
 
162
 
 
163
$(TARGET_lib) : $(OBJDIR)\$(LIB_NAME)_lib.lst
 
164
        @echo Generating $@
 
165
        $(CHK) $(OBJDIR)\$(@F) $(DEL) $(OBJDIR)\$(@F)
 
166
        $(LIB) -o $(OBJDIR)\$(@F) @$?
 
167
 
 
168
$(OBJDIR)\$(LIB_NAME)_lib.lst: $($(LIB_NAME)_LIBLST_DEPENDS)
 
169
        $(CHK) $@ $(DEL) $@
 
170
        @echo Generating $@
 
171
ifneq "$(strip $(FILES_lib_objs))" ""
 
172
        @echo $(foreach objfile,$(FILES_lib_objs),$(subst /,\,$(objfile)) ) >> $@
 
173
endif
 
174
 
 
175
else # We must have more than one target library so load the individual makefiles
 
176
 
 
177
$(OBJDIR)/%.lib: NWGNU% $(AP_WORK)\build\NWGNUhead.inc $(AP_WORK)\build\NWGNUtail.inc $(AP_WORK)\build\NWGNUenvironment.inc FORCE
 
178
        @echo Calling $<
 
179
        $(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
 
180
 
 
181
endif
 
182
 
 
183
#
 
184
# Rules to build nlms.
 
185
#
 
186
 
 
187
vpath libcpre.o $(NOVELLLIBC)\imports
 
188
 
 
189
# If we only have one target NLM then build it
 
190
ifeq "$(words $(strip $(TARGET_nlm)))" "1"
 
191
 
 
192
$(TARGET_nlm) : $(FILES_nlm_objs) $(FILES_nlm_libs) $(OBJDIR)\$(NLM_NAME)_link.opt
 
193
        @echo Linking $@
 
194
        $(LINK) @$(OBJDIR)\$(NLM_NAME)_link.opt
 
195
 
 
196
# This will force the link option file to be rebuilt if we change the
 
197
# corresponding makefile
 
198
 
 
199
$(OBJDIR)\$(NLM_NAME)_link.opt : $($(NLM_NAME)_LINKOPT_DEPENDS)
 
200
        $(CHK) $(OBJDIR)\$(@F) $(DEL) $(OBJDIR)\$(@F)
 
201
        $(CHK) $(OBJDIR)\$(NLM_NAME)_link.def $(DEL) $(OBJDIR)\$(NLM_NAME)_link.def
 
202
        @echo Generating $@
 
203
        @echo -warnings off >> $@
 
204
        @echo -zerobss >> $@
 
205
        @echo -desc "$(NLM_DESCRIPTION)" >> $@
 
206
        @echo -o $(TARGET_nlm) >> $@
 
207
ifneq "$(FILE_nlm_copyright)" ""
 
208
        @-type $(FILE_nlm_copyright) >> $@
 
209
else
 
210
        @echo -copy "$(NLM_COPYRIGHT)" >> $@
 
211
endif
 
212
ifeq "$(RELEASE)" "debug"
 
213
        @echo -g >> $@
 
214
        @echo -sym internal >> $@
 
215
        @echo -sym codeview4 >> $@
 
216
        @echo -osym $(OBJDIR)\$(NLM_NAME).sym >> $@
 
217
else
 
218
        @echo -sym internal >> $@
 
219
endif
 
220
        @echo -screenname "$(NLM_SCREEN_NAME)" >> $@
 
221
ifneq "$(NLM_VERSION)" ""
 
222
        @echo -nlmversion=$(NLM_VERSION) >> $@
 
223
else
 
224
        @echo -nlmversion=$(VERSION) >> $@
 
225
endif
 
226
        @echo -l $(NWOS) >> $@
 
227
        @echo -l $(AP)/$(OBJDIR) >> $@
 
228
        @echo -l $(APR)/$(OBJDIR) >> $@
 
229
        @echo -l $(APRUTIL)/$(OBJDIR) >> $@
 
230
        @echo -l $(PCRE)/$(OBJDIR) >> $@
 
231
        @echo -l $(HTTPD)/$(OBJDIR) >> $@
 
232
        @echo -l $(SERVER)/$(OBJDIR) >> $@
 
233
        @echo -l $(STDMOD)/$(OBJDIR) >> $@
 
234
        @echo -l $(NWOS)/$(OBJDIR) >> $@
 
235
        @echo -l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/Runtime" >> $@
 
236
        @echo -l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/MSL C++" >> $@
 
237
ifneq "$(IPV6)" ""
 
238
        @echo -l $(NOVELLLIBC)\include\winsock\IPV6 >> $@
 
239
endif
 
240
        @echo -l $(NOVELLLIBC)/imports >> $@
 
241
ifneq "$(LDAPSDK)" ""
 
242
        @echo -l $(LDAPSDK)/lib/nlm >> $@
 
243
endif
 
244
        @echo -l $(APULDAP)/$(OBJDIR) >> $@
 
245
        @echo -l $(XML)/$(OBJDIR) >> $@
 
246
        @echo -nodefaults >> $@
 
247
        @echo -map $(OBJDIR)\$(NLM_NAME).map>> $@
 
248
        @echo -threadname "$(NLM_THREAD_NAME)" >> $@
 
249
ifneq "$(NLM_STACK_SIZE)" ""
 
250
        @echo -stacksize $(subst K,000,$(subst k,K,$(strip $(NLM_STACK_SIZE)))) >> $@
 
251
else
 
252
        @echo -stacksize 64000 >> $@
 
253
endif
 
254
ifneq "$(NLM_ENTRY_SYM)" ""
 
255
        @echo -entry $(NLM_ENTRY_SYM) >> $@
 
256
endif
 
257
ifneq "$(NLM_EXIT_SYM)" ""
 
258
        @echo -exit $(NLM_EXIT_SYM) >> $@
 
259
endif
 
260
ifneq "$(NLM_CHECK_SYM)" ""
 
261
        @echo -check $(NLM_CHECK_SYM) >> $@
 
262
endif
 
263
ifneq "$(NLM_FLAGS)" ""
 
264
        @echo -flags $(NLM_FLAGS) >> $@
 
265
endif
 
266
ifneq "$(strip $(XLFLAGS))" ""
 
267
        @echo $(XLFLAGS) >> $@
 
268
endif
 
269
ifneq "$(strip $(FILES_nlm_objs))" ""
 
270
        @echo $(foreach objfile,$(strip $(FILES_nlm_objs)),$(subst /,\,$(objfile))) >> $@
 
271
endif
 
272
ifneq "$(FILES_nlm_libs)" ""
 
273
        @echo $(foreach libfile, $(notdir $(strip $(FILES_nlm_libs))),-l$(subst /,\,$(libfile))) >> $@
 
274
endif
 
275
        @echo -commandfile $(OBJDIR)\$(NLM_NAME)_link.def >> $@
 
276
ifneq "$(FILE_nlm_msg)" ""
 
277
        @echo Messages $(FILE_nlm_msg) >> $(OBJDIR)\$(NLM_NAME)_link.def
 
278
endif
 
279
ifneq "$(FILE_nlm_hlp)" ""
 
280
        @echo Help $(FILE_nlm_hlp) >> $(OBJDIR)\$(NLM_NAME)_link.def
 
281
endif
 
282
ifneq "$(FILES_nlm_modules)" ""
 
283
        @echo module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(subst /,\,$(module))) >> $(OBJDIR)\$(NLM_NAME)_link.def
 
284
endif
 
285
ifneq "$(FILES_nlm_Ximports)" ""
 
286
        @echo Import $(foreach import,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_Ximports))),$(subst /,\,$(import))) >> $(OBJDIR)\$(NLM_NAME)_link.def
 
287
endif
 
288
ifneq "$(FILES_nlm_exports)" ""
 
289
        @echo Export $(foreach export,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_exports))),$(subst /,\,$(export))) >> $(OBJDIR)\$(NLM_NAME)_link.def
 
290
endif
 
291
 
 
292
# if APACHE_UNIPROC is defined, don't include XDCData
 
293
ifndef APACHE_UNIPROC
 
294
ifneq "$(string $(XDCDATA))" ""
 
295
        @echo XDCData $(XDCDATA) >> $(OBJDIR)\$(NLM_NAME)_link.def
 
296
else
 
297
        @echo XDCData $(NWOS)\apache.xdc >> $(OBJDIR)\$(NLM_NAME)_link.def
 
298
endif
 
299
endif
 
300
 
 
301
else # more than one target so look for individual makefiles.
 
302
 
 
303
# Only include these if NO_LICENSE_FILE isn't set to prevent excessive
 
304
# recursion
 
305
 
 
306
ifndef NO_LICENSE_FILE
 
307
 
 
308
$(OBJDIR)/%.nlm: NWGNU% $(AP_WORK)\build\NWGNUhead.inc $(AP_WORK)\build\NWGNUtail.inc $(AP_WORK)\build\NWGNUenvironment.inc $(CUSTOM_INI) $(VERSION_INC) FORCE
 
309
        @echo Calling $<
 
310
        $(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
 
311
        $(CMD) echo.
 
312
 
 
313
else
 
314
 
 
315
$(TARGET_nlm):
 
316
 
 
317
endif # NO_LICENSE_FILE
 
318
 
 
319
endif
 
320