1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
|
############################################################-*-Makefile-*-####
# Project Installation and Distribution
##############################################################################
# $Id$
# scala documents
DOCUMENTS_ROOT = $(PROJECT_DOCUMENTDIR)
DOCUMENTS_FILES += $(DOCUMENTS_ROOT)/reference/ScalaReference.pdf
DOCUMENTS_FILES += $(DOCUMENTS_ROOT)/reference/ScalaByExample.pdf
DOCUMENTS_FILES += $(DOCUMENTS_ROOT)/tutorial/ScalaTutorial.pdf
# scala examples
EXAMPLES_ROOT = $(PROJECT_SOURCEDIR)/examples
EXAMPLES_LIST += $(call READLIST, $(PROJECT_LISTDIR)/examples.lst)
EXAMPLES_FILES = $(EXAMPLES_LIST:%=$(EXAMPLES_ROOT)/%)
# emacs scala-mode
EMACS_ROOT = $(PROJECT_SUPPORTDIR)/emacs
EMACS_LIST += $(call READLIST,$(PROJECT_LISTDIR)/emacs.lst)
EMACS_FILES = $(EMACS_LIST:%=$(EMACS_ROOT)/%)
# gedit scala-mode
GEDIT_ROOT = $(PROJECT_SUPPORTDIR)/gedit
GEDIT_LIST += scala.lang
GEDIT_LIST += README
GEDIT_FILES = $(GEDIT_LIST:%=$(GEDIT_ROOT)/%)
# jedit scala-mode
JEDIT_ROOT = $(PROJECT_SUPPORTDIR)/jedit
JEDIT_LIST += modes/scala.xml
JEDIT_LIST += modes/README
JEDIT_LIST += console/commando/scala.xml
JEDIT_LIST += console/commando/scalac.xml
JEDIT_LIST += console/commando/scalaint.xml
JEDIT_LIST += console/commando/scalarun.xml
JEDIT_LIST += console/README
JEDIT_FILES = $(JEDIT_LIST:%=$(JEDIT_ROOT)/%)
# scite scala-mode
SCITE_ROOT = $(PROJECT_SUPPORTDIR)/scite
SCITE_LIST += scala.properties
SCITE_LIST += README
SCITE_FILES = $(SCITE_LIST:%=$(SCITE_ROOT)/%)
# textpad scala-mode
TEXTPAD_ROOT = $(PROJECT_SUPPORTDIR)/textpad
TEXTPAD_LIST += scala.syn
TEXTPAD_LIST += README
TEXTPAD_FILES = $(TEXTPAD_LIST:%=$(TEXTPAD_ROOT)/%)
# ultraedit scala-mode
ULTRAEDIT_ROOT = $(PROJECT_SUPPORTDIR)/ultraedit
ULTRAEDIT_LIST += scala.txt
ULTRAEDIT_LIST += README
ULTRAEDIT_FILES = $(ULTRAEDIT_LIST:%=$(ULTRAEDIT_ROOT)/%)
# xcode scala-mode
XCODE_ROOT = $(PROJECT_SUPPORTDIR)/xcode
XCODE_LIST += README
XCODE_LIST += Specifications/Scala.pbfilespec
XCODE_LIST += Specifications/Scala.pblangspec
XCODE_FILES = $(XCODE_LIST:%=$(XCODE_ROOT)/%)
# scala man pages
MANPAGES_ROOT = $(PROJECT_SUPPORTDIR)/man/man1
MANPAGES_LIST += scala.1
MANPAGES_LIST += scalac.1
MANPAGES_LIST += scaladoc.1
MANPAGES_LIST += scalaint.1
MANPAGES_LIST += scalarun.1
MANPAGES_FILES = $(MANPAGES_LIST:%=$(MANPAGES_ROOT)/%)
# scala test
TEST_ROOT = $(PROJECT_TESTDIR)
TEST_LIST += $(call READLIST,$(PROJECT_LISTDIR)/test.lst)
TEST_FILES = $(TEST_LIST:%=$(TEST_ROOT)/%)
##############################################################################
# beta versions
##############################################################################
INSTALL_ROOT = $(PROJECT_DISTRIBDIR)
INSTALL_NAME = $(PROJECT_NAME)
INSTALL_VERSION := $(shell $(DATE) -u "+%Y%m%d-%H%M%S")
INSTALL_PACKAGE = $(PROJECT_NAME)-$(INSTALL_VERSION)
INSTALL_PREFIX = $(INSTALL_ROOT)/$(INSTALL_PACKAGE)
INSTALL_BINDIR = $(INSTALL_PREFIX)/bin
INSTALL_SHAREDIR = $(INSTALL_PREFIX)/share
INSTALL_MANDIR = $(INSTALL_SHAREDIR)/man
INSTALL_DOCDIR = $(INSTALL_SHAREDIR)/doc/$(INSTALL_PACKAGE)
INSTALL_PACKAGEDIR = $(INSTALL_SHAREDIR)/$(INSTALL_PACKAGE)
INSTALL_LIBDIR = $(INSTALL_PACKAGEDIR)/lib
INSTALL_SRCDIR = $(INSTALL_PACKAGEDIR)/src
INSTALL_SUPPORTDIR = $(INSTALL_PACKAGEDIR)/support
INSTALL_TESTDIR = $(INSTALL_PACKAGEDIR)/test
INSTALL_APIDOCDIR = $(INSTALL_DOCDIR)/api
INSTALL_EXAMPLEDIR = $(INSTALL_DOCDIR)/examples
INSTALL_LIBRARY_JARFILE = $(INSTALL_LIBDIR)/$(LIBRARY_NAME).jar
INSTALL_TOOLS_JARFILE = $(INSTALL_LIBDIR)/$(TOOLS_NAME).jar
INSTALL_FJBG_JARFILE = $(INSTALL_LIBDIR)/fjbg.jar
INSTALL_MSIL_JARFILE = $(INSTALL_LIBDIR)/msil.jar
INSTALL_MSIL_DLLFILE = $(INSTALL_LIBDIR)/scala.dll
install : $(LIBRARY_JAR_ARCHIVE)
install : $(TOOLS_JAR_ARCHIVE)
$(MAKE) -C $(DOCUMENTS_ROOT)/reference
$(MAKE) -C $(DOCUMENTS_ROOT)/tutorial
$(INSTALL) -m 755 -d $(INSTALL_DOCDIR)
$(INSTALL) -m 644 -p $(PROJECT_ROOT)/README $(INSTALL_DOCDIR)
$(INSTALL) -m 644 -p $(PROJECT_ROOT)/LICENSE $(INSTALL_DOCDIR)
$(ECHO) $(INSTALL_VERSION) > $(INSTALL_DOCDIR)/VERSION
$(CHMOD) 644 $(INSTALL_DOCDIR)/VERSION
$(INSTALL) -m 755 -d $(INSTALL_BINDIR)
$(INSTALL) -m 644 -p $(SCRIPTS_TEMPLATE_FILE) $(INSTALL_BINDIR)
@$(make) \
SCRIPTS_PREFIX=$(INSTALL_PREFIX) \
MACRO_VERSION=$(INSTALL_VERSION) \
MACRO_LIBRARY_SOURCES=$(INSTALL_SRCDIR) \
MACRO_LIBRARY_CLASSES=$(INSTALL_LIBRARY_JARFILE) \
MACRO_TOOLS_CLASSES=$(INSTALL_TOOLS_JARFILE) \
MACRO_FJBG_CLASSES=$(INSTALL_FJBG_JARFILE) \
MACRO_MSIL_CLASSES=$(INSTALL_MSIL_JARFILE) \
MACRO_JAVA_CMD=java \
MACRO_JAVA_ARGS= \
MACRO_SCALA_CMD=$(INSTALL_BINDIR)/scala \
MACRO_SCALA_ARGS= \
MACRO_TEST_SRCDIR=$(INSTALL_TESTDIR) \
MACRO_TEST_OBJDIR='/tmp/$$$$SCRIPT-$$$$USER' \
MACRO_TEST_ASSEMBLIES= \
scripts
$(CHMOD) u+w $(INSTALL_BINDIR)/$(SCRIPTS_WRAPPER_NAME)
$(RM) $(INSTALL_BINDIR)/$(SCRIPTS_TEMPLATE_NAME)
$(INSTALL) -m 755 -d $(INSTALL_LIBDIR)
$(INSTALL) -m 644 -p $(LIBRARY_JAR_ARCHIVE) $(INSTALL_LIBRARY_JARFILE)
$(INSTALL) -m 644 -p $(TOOLS_JAR_ARCHIVE) $(INSTALL_TOOLS_JARFILE)
$(INSTALL) -m 644 -p $(FJBG_JARFILE) $(INSTALL_FJBG_JARFILE)
$(INSTALL) -m 644 -p $(MSIL_JARFILE) $(INSTALL_MSIL_JARFILE)
$(INSTALL) -m 644 -p $(MSIL_DLLFILE) $(INSTALL_MSIL_DLLFILE)
$(INSTALL) -m 755 -d $(INSTALL_SRCDIR)
$(strip $(MIRROR) -m 644 -p -C $(LIBRARY_ROOT) $(LIBRARY_LIST:%='%') \
$(INSTALL_SRCDIR)/$(PROJECT_NAME))
$(INSTALL) -m 755 -d $(INSTALL_DOCDIR)
$(INSTALL) -m 644 -p $(DOCUMENTS_FILES) $(INSTALL_DOCDIR)
$(INSTALL) -m 755 -d $(INSTALL_APIDOCDIR)
@$(make) \
target=LIBRARY \
main_SCALADOC=$(INSTALL_BINDIR)/scaladoc \
PROJECT_VERSION=$(INSTALL_VERSION) \
PROJECT_SOURCEDIR=$(INSTALL_SRCDIR) \
LIBRARY_SDC_OUTPUTDIR=$(INSTALL_APIDOCDIR) \
sdc
$(INSTALL) -m 755 -d $(INSTALL_MANDIR)
$(INSTALL) -m 755 -d $(INSTALL_MANDIR)/man1
$(strip $(MIRROR) -m 644 -p -C $(MANPAGES_ROOT) $(MANPAGES_LIST) \
$(INSTALL_MANDIR)/man1)
$(FIND) $(INSTALL_MANDIR) -type f -exec $(GZIP) -f "{}" ";"
$(INSTALL) -m 755 -d $(INSTALL_EXAMPLEDIR)
$(strip $(MIRROR) -m 644 -p -C $(EXAMPLES_ROOT) $(EXAMPLES_LIST) \
$(INSTALL_EXAMPLEDIR))
$(INSTALL) -m 755 -d $(INSTALL_SUPPORTDIR)
$(INSTALL) -m 755 -d $(INSTALL_SUPPORTDIR)/emacs
$(strip $(MIRROR) -m 644 -p -C $(EMACS_ROOT) $(EMACS_LIST) \
$(INSTALL_SUPPORTDIR)/emacs)
$(INSTALL) -m 755 -d $(INSTALL_SUPPORTDIR)/gedit
$(strip $(MIRROR) -m 644 -p -C $(GEDIT_ROOT) $(GEDIT_LIST) \
$(INSTALL_SUPPORTDIR)/gedit)
$(INSTALL) -m 755 -d $(INSTALL_SUPPORTDIR)/jedit
$(strip $(MIRROR) -m 644 -p -C $(JEDIT_ROOT) $(JEDIT_LIST) \
$(INSTALL_SUPPORTDIR)/jedit)
$(INSTALL) -m 755 -d $(INSTALL_SUPPORTDIR)/scite
$(strip $(MIRROR) -m 644 -p -C $(SCITE_ROOT) $(SCITE_LIST) \
$(INSTALL_SUPPORTDIR)/scite)
$(INSTALL) -m 755 -d $(INSTALL_SUPPORTDIR)/textpad
$(strip $(MIRROR) -m 644 -p -C $(TEXTPAD_ROOT) $(TEXTPAD_LIST) \
$(INSTALL_SUPPORTDIR)/textpad)
$(INSTALL) -m 755 -d $(INSTALL_SUPPORTDIR)/ultraedit
$(strip $(MIRROR) -m 644 -p -C $(ULTRAEDIT_ROOT) $(ULTRAEDIT_LIST) \
$(INSTALL_SUPPORTDIR)/ultraedit)
$(INSTALL) -m 755 -d $(INSTALL_SUPPORTDIR)/xcode
$(strip $(MIRROR) -m 644 -p -C $(XCODE_ROOT) $(XCODE_LIST) \
$(INSTALL_SUPPORTDIR)/xcode)
$(INSTALL) -m 755 -d $(INSTALL_TESTDIR)
$(strip $(MIRROR) -m 644 -p -C $(TEST_ROOT) $(TEST_LIST) \
$(INSTALL_TESTDIR))
$(strip $(MIRROR) -m 644 -p -C $(TEST_ROOT) \
$(shell cd $(TEST_ROOT); ls $(TEST_LIST:%.scala=%.check) 2>/dev/null) \
$(INSTALL_TESTDIR))
$(strip $(MIRROR) -m 644 -p -C $(TEST_ROOT) \
$(shell cd $(TEST_ROOT); ls $(TEST_LIST:%.scala=%.flags) 2>/dev/null) \
$(INSTALL_TESTDIR))
$(strip $(MIRROR) -m 644 -p -C $(TEST_ROOT) \
$(shell cd $(TEST_ROOT); ls $(TEST_LIST:%.scala=%.args) 2>/dev/null) \
$(INSTALL_TESTDIR))
$(strip $(MIRROR) -m 644 -p -C $(TEST_ROOT) \
$(shell cd $(TEST_ROOT); ls $(TEST_LIST:%.scala=%.dtd) 2>/dev/null) \
$(INSTALL_TESTDIR))
$(strip $(MIRROR) -m 644 -p -C $(TEST_ROOT) \
$(shell cd $(TEST_ROOT); ls $(TEST_LIST:%.scala=%.namespace) 2>/dev/null) \
$(INSTALL_TESTDIR))
$(strip $(MIRROR) -m 644 -p -C $(TEST_ROOT) \
$(shell cd $(TEST_ROOT); ls $(TEST_LIST:%.scala=%.xml) 2>/dev/null) \
$(INSTALL_TESTDIR))
install-windows : install
@if [ ! -d "$(INSTALL_PREFIX)" ]; then \
$(ECHO) "Could not find UNIX install '$(INSTALL_PREFIX)'"; \
exit 1; \
fi
$(UNIX2DOS) $(INSTALL_DOCDIR)/README
$(UNIX2DOS) $(INSTALL_DOCDIR)/LICENSE
$(UNIX2DOS) $(INSTALL_DOCDIR)/VERSION
$(TOUCH) $(INSTALL_DOCDIR)/VERSION-$(INSTALL_VERSION)
@root=`cd "$(INSTALL_PREFIX)"; pwd`; \
for name in "" $(SCRIPTS_ALIASES_NAMES); do \
if [ -z "$$name" ]; then continue; fi; \
case "$$name" in scala-info* ) continue;; esac; \
case "$$name" in scalatest* ) continue;; esac; \
case "$$name" in scalanstest* ) continue;; esac; \
$(ECHO) -n "Generating $$name.bat ... "; \
srcfile="$(PROJECT_SUPPORTDIR)/windows/scala_wrapper"; \
nixfile="$(INSTALL_PREFIX)/bin/$$name"; \
winfile="$(INSTALL_PREFIX)/bin/$$name.bat"; \
nixexec=`SCALA_JAVA_CMD="echo java" SCALA_CLASSPATH=\"%CLASSPATH%\" $$nixfile`; \
winexec="$$nixexec"; \
winexec=`echo "$$winexec" | sed -es"#$$root#\"%SCALA_HOME%\"#g"`; \
winexec=`echo "$$winexec" | sed -es"#/share/$(INSTALL_PACKAGE)##g"`; \
winexec=`echo "$$winexec" | tr '/' '\\\\' | tr ':' ';'`; \
winexec=`echo "$$winexec" | sed -es"#Xbootclasspath.a;#Xbootclasspath/a:#g"`; \
$(RM) -f "$$winfile"; \
( \
$(CAT) "$$srcfile-header.bat"; \
$(ECHO) "set VERSION=$(INSTALL_VERSION)"; \
$(ECHO) "set COMMAND=$$winexec"; \
$(CAT) "$$srcfile-footer.bat"; \
) | $(UNIX2DOS) >> "$$winfile"; \
$(ECHO) "done"; \
done; \
for name in "" $(SCRIPTS_ALIASES_NAMES); do \
if [ -z "$$name" ]; then continue; fi; \
nixfile="$(INSTALL_PREFIX)/bin/$$name"; \
$(RM) "$$nixfile"; \
done
$(RM) $(INSTALL_PREFIX)/bin/.scala_wrapper
$(FIND) $(INSTALL_SRCDIR) -type f -exec $(UNIX2DOS) "{}" ";"
$(FIND) $(INSTALL_APIDOCDIR) -type f -exec $(UNIX2DOS) "{}" ";"
$(FIND) $(INSTALL_EXAMPLEDIR) -type f -exec $(UNIX2DOS) "{}" ";"
$(FIND) $(INSTALL_SUPPORTDIR) -type f -exec $(UNIX2DOS) "{}" ";"
$(RM) -r $(INSTALL_TESTDIR)
$(MV) $(INSTALL_PACKAGEDIR)/* $(INSTALL_PREFIX)
$(INSTALL) -m 755 -d $(INSTALL_PREFIX)/doc
$(MV) $(INSTALL_DOCDIR)/api $(INSTALL_PREFIX)/doc
$(MV) $(INSTALL_DOCDIR)/*.pdf $(INSTALL_PREFIX)/doc
$(MV) $(INSTALL_DOCDIR)/* $(INSTALL_PREFIX)
$(RM) -r $(INSTALL_SHAREDIR)
install-addons :
$(RM) -r $(DISTRIB_ARCHIVE).addons
$(INSTALL) -d $(DISTRIB_ARCHIVE).addons
$(INSTALL) -d $(DISTRIB_ARCHIVE).addons/doc
$(INSTALL) $(DOCUMENTS_ROOT)/reference/ScalaRationale.pdf \
$(DISTRIB_ARCHIVE).addons/doc
$(INSTALL) $(DOCUMENTS_ROOT)/reference/ProgrammingInScala.pdf \
$(DISTRIB_ARCHIVE).addons/doc
.PHONY : install
.PHONY : install-windows
.PHONY : install-addons
##############################################################################
IA_CONFIG_PREFIX = $(PROJECT_CONFIGDIR)/ia
IA_CONFIG_IMAGESDIR = $(IA_CONFIG_PREFIX)/images
IA_CONFIG_LOCALESDIR = $(IA_CONFIG_PREFIX)/locales
IA_CONFIG_CUSTOMCODEDIR = $(IA_CONFIG_PREFIX)/CustomCode
IA_XSLFILE = $(IA_CONFIG_PREFIX)/setversion.xsl
IA_CUSTOMFILE = custom
IA_LICENSEFILE = LICENSE
IA_SPLASHFILE = $(IA_CONFIG_IMAGESDIR)/Splash.png
IA_UNIX_PROJECTFILE = $(IA_CONFIG_PREFIX)/$(PROJECT_NAME)_unix.iap_xml
IA_WIN32_PROJECTFILE = $(IA_CONFIG_PREFIX)/$(PROJECT_NAME)_win32.iap_xml
IA_BUILD_PREFIX = /tmp/IA_Build_$(PROJECT_NAME)
IA_BUILD_IMAGESDIR = $(IA_BUILD_PREFIX)/images
IA_BUILD_CUSTOMCODEDIR = $(IA_BUILD_PREFIX)/CustomCode
IA_BUILD_LOCALESDIR = $(IA_BUILD_PREFIX)/$(PROJECT_NAME)locales
IA_BUILD_ARCHIVE_TGZ = $(IA_BUILD_PREFIX)/$(PROJECT_NAME).tar.gz
IA_BUILD_ARCHIVE_ZIP = $(IA_BUILD_PREFIX)/$(PROJECT_NAME).zip
IA_BUILD_PROJECTFILE = $(IA_BUILD_PREFIX)/$(PROJECT_NAME).iap_xml
IA_BUILD_SPLASHFILE = $(IA_BUILD_IMAGESDIR)/`$(BASENAME) $(IA_SPLASHFILE)`
IA_BUILD_OUTPUTDIR = $(IA_BUILD_PREFIX)/$(PROJECT_NAME)_Build_Output
IA_INSTALL_PREFIX = $(INSTALL_PREFIX).ia
CONVERT_FLAGS += -gravity southeast -pointsize 12 -fill red
CONVERT_FLAGS += -family Helvetica
CONVERT_FLAGS += -draw "text 4,4 'v$(INSTALL_VERSION)'"
XSLTPROC_FLAGS += --stringparam version "$(INSTALL_VERSION)"
XSLTPROC_FLAGS += $(IA_XSLFILE)
ia-build-common :
$(RM) -r $(IA_BUILD_PREFIX)
$(INSTALL) -m 755 -d $(IA_BUILD_PREFIX)
$(INSTALL) -m 755 -d $(IA_BUILD_IMAGESDIR)
@for file in "" `$(FIND) $(IA_CONFIG_IMAGESDIR)/* -type f`; do \
if [ -z "$$file" ]; then continue; fi; \
$(INSTALL) -m 644 -p "$$file" $(IA_BUILD_IMAGESDIR); \
done
$(CONVERT) $(CONVERT_FLAGS) $(IA_SPLASHFILE) $(IA_BUILD_SPLASHFILE)
ia-build-unix :
$(INSTALL) -m 755 -d $(IA_BUILD_LOCALESDIR)
@for locale in "" `ls -d $(IA_CONFIG_LOCALESDIR)/?? | $(XARGS) -n 1 $(BASENAME)`; do \
if [ -z "$$locale" ]; then continue; fi; \
$(INSTALL) -m 644 -p $(IA_CONFIG_LOCALESDIR)/"$$locale"/$(IA_CUSTOMFILE)_unix \
$(IA_BUILD_LOCALESDIR)/$(IA_CUSTOMFILE)"_$$locale"; \
$(INSTALL) -m 644 -p $(IA_CONFIG_LOCALESDIR)/"$$locale"/$(IA_LICENSEFILE).html \
$(IA_BUILD_PREFIX)/$(IA_LICENSEFILE)"_$$locale".html; \
done
$(XSLTPROC) $(XSLTPROC_FLAGS) $(IA_UNIX_PROJECTFILE) > $(IA_BUILD_PROJECTFILE)
$(TAR) xzf $(INSTALL_PREFIX).tar.gz -C $(IA_BUILD_PREFIX)
$(strip cd $(IA_BUILD_PREFIX)/$(PROJECT_NAME)-$(INSTALL_VERSION); \
$(TAR) czf ../$(PROJECT_NAME).tar.gz .)
$(RM) -r $(IA_BUILD_PREFIX)/$(PROJECT_NAME)-$(INSTALL_VERSION)
$(IA) $(IA_BUILD_PREFIX)/$(notdir $(IA_BUILD_PROJECTFILE))
$(INSTALL) -m 755 -d $(IA_INSTALL_PREFIX)
$(strip $(TAR) cf - -C $(IA_BUILD_OUTPUTDIR) Web_Installers/InstData |\
$(TAR) xf - -C $(IA_INSTALL_PREFIX))
$(CHMOD) 644 $(IA_BUILD_OUTPUTDIR)/Web_Installers/install.htm
$(strip $(CP) -a $(IA_BUILD_OUTPUTDIR)/Web_Installers/install.htm \
$(IA_INSTALL_PREFIX)/Web_Installers/install-unix.htm)
ia-build-windows :
$(INSTALL) -m 755 -d $(IA_BUILD_CUSTOMCODEDIR)
@for file in "" `$(FIND) $(IA_CONFIG_CUSTOMCODEDIR)/*.jar -type f`; do \
if [ -z "$$file" ]; then continue; fi; \
$(INSTALL) -m 644 -p "$$file" $(IA_BUILD_CUSTOMCODEDIR); \
done
$(INSTALL) -m 755 -d $(IA_BUILD_LOCALESDIR)
@for locale in "" `ls -d $(IA_CONFIG_LOCALESDIR)/?? | $(XARGS) -n 1 $(BASENAME)`; do \
if [ -z "$$locale" ]; then continue; fi; \
$(INSTALL) -m 644 -p $(IA_CONFIG_LOCALESDIR)/"$$locale"/$(IA_CUSTOMFILE)_win32 \
$(IA_BUILD_LOCALESDIR)/$(IA_CUSTOMFILE)"_$$locale"; \
$(INSTALL) -m 644 -p $(IA_CONFIG_LOCALESDIR)/"$$locale"/$(IA_LICENSEFILE).html \
$(IA_BUILD_PREFIX)/$(IA_LICENSEFILE)"_$$locale".html; \
done
$(INSTALL) -m 644 -p $(IA_CONFIG_PREFIX)/tools.zip $(IA_BUILD_PREFIX)
$(XSLTPROC) $(XSLTPROC_FLAGS) $(IA_WIN32_PROJECTFILE) > $(IA_BUILD_PROJECTFILE)
# $(UNZIP) -q $(INSTALL_PREFIX).zip -d $(IA_BUILD_PREFIX)
$(UNZIP) -q $(DISTRIB_ARCHIVE).zip -d $(IA_BUILD_PREFIX)
$(strip cd $(IA_BUILD_PREFIX)/$(PROJECT_NAME)-$(INSTALL_VERSION); \
$(ZIP) -q -r ../$(PROJECT_NAME).zip .)
$(RM) -r $(IA_BUILD_PREFIX)/$(PROJECT_NAME)-$(INSTALL_VERSION)
$(IA) $(IA_BUILD_PREFIX)/$(notdir $(IA_BUILD_PROJECTFILE))
$(INSTALL) -m 755 -d $(IA_INSTALL_PREFIX)
$(strip $(TAR) cf - -C $(IA_BUILD_OUTPUTDIR) Web_Installers/InstData |\
$(TAR) xf - -C $(IA_INSTALL_PREFIX))
$(CHMOD) 644 $(IA_BUILD_OUTPUTDIR)/Web_Installers/install.htm
$(strip $(CP) -a $(IA_BUILD_OUTPUTDIR)/Web_Installers/install.htm \
$(IA_INSTALL_PREFIX)/Web_Installers/install-windows.htm)
ia-build-all : ia-build-common
ia-build-all : ia-build-unix
ia-build-all : ia-build-windows
ia-build-all :
$(CHMOD) -R a+w $(IA_BUILD_PREFIX)
.PHONY : ia-build-all
.PHONY : ia-build-common
.PHONY : ia-build-unix
.PHONY : ia-build-windows
##############################################################################
IZPACK_BUILD_PREFIX = /tmp/IzPack_Build_$(PROJECT_NAME)
IZPACK_BUILD_IMAGESDIR = $(IZPACK_BUILD_PREFIX)/images
IZPACK_BUILD_LOCALESDIR = $(IZPACK_BUILD_PREFIX)/locales
IZPACK_BUILD_PDFDIR = $(IZPACK_BUILD_PREFIX)/pdf
IZPACK_BUILD_UNIXDIR = $(IZPACK_BUILD_PREFIX)/unix
IZPACK_BUILD_WINDIR = $(IZPACK_BUILD_PREFIX)/windows
IZPACK_CONFIG_PREFIX = $(PROJECT_CONFIGDIR)/izpack
IZPACK_OUTPUT_FILE = $(DISTRIB_ROOT)/install_$(PROJECT_NAME)-$(INSTALL_VERSION).jar
IZPACK_SPLASHFILE = $(IA_SPLASHFILE)
IZPACK_BUILD_FILE = $(IZPACK_BUILD_PREFIX)/izpack_scala.xml
IZPACK_BUILD_SPLASHFILE = $(IZPACK_BUILD_IMAGESDIR)/`$(BASENAME) $(IZPACK_SPLASHFILE)`
izpack-build-all : $(PROJECT_DISTRIBDIR)/$(INSTALL_PACKAGE).zip
izpack-build-all : $(PROJECT_DISTRIBDIR)/$(INSTALL_PACKAGE).tar.gz
izpack-build-all :
$(RM) -r $(IZPACK_BUILD_PREFIX)
$(INSTALL) -m 755 -d $(IZPACK_BUILD_LOCALESDIR)
@for locale in "" `ls -d $(IA_CONFIG_LOCALESDIR)/?? | $(XARGS) -n 1 $(BASENAME)`; do \
if [ -z "$$locale" ]; then continue; fi; \
$(INSTALL) -m 644 -p $(IA_CONFIG_LOCALESDIR)/"$$locale"/$(IA_LICENSEFILE).html \
$(IZPACK_BUILD_LOCALESDIR)/$(IA_LICENSEFILE)"_$$locale".html; \
done
$(INSTALL) -m 644 -p $(IZPACK_CONFIG_PREFIX)/locales/*.html $(IZPACK_BUILD_LOCALESDIR)
$(INSTALL) -m 755 -d $(IZPACK_BUILD_IMAGESDIR)
$(INSTALL) -m 644 -p $(IZPACK_CONFIG_PREFIX)/images/*.png $(IZPACK_BUILD_IMAGESDIR)
$(CONVERT) $(CONVERT_FLAGS) $(IZPACK_SPLASHFILE) $(IZPACK_BUILD_SPLASHFILE)
$(INSTALL) -m 755 -d $(IZPACK_BUILD_UNIXDIR)
$(TAR) xzf $(INSTALL_PREFIX).tar.gz -C $(IZPACK_BUILD_UNIXDIR)
$(strip cd $(IZPACK_BUILD_UNIXDIR)/$(PROJECT_NAME)-$(INSTALL_VERSION); \
$(RM) -r share/$(PROJECT_NAME)-$(INSTALL_VERSION)/lib; \
$(RM) -r share/doc/$(PROJECT_NAME)-$(INSTALL_VERSION)/*.pdf; \
$(MV) * ..)
$(RM) -r $(IZPACK_BUILD_UNIXDIR)/$(PROJECT_NAME)-$(INSTALL_VERSION)
$(INSTALL) -m 755 -d $(IZPACK_BUILD_WINDIR)
$(UNZIP) -q $(DISTRIB_ARCHIVE).zip -d $(IZPACK_BUILD_WINDIR)
$(strip cd $(IZPACK_BUILD_WINDIR)/$(PROJECT_NAME)-$(INSTALL_VERSION); \
$(MV) * ..)
$(RM) -r $(IZPACK_BUILD_WINDIR)/$(PROJECT_NAME)-$(INSTALL_VERSION)
$(MV) $(IZPACK_BUILD_WINDIR)/lib $(IZPACK_BUILD_PREFIX)
$(INSTALL) -m 755 -d $(IZPACK_BUILD_PDFDIR)
$(MV) $(IZPACK_BUILD_WINDIR)/doc/*.pdf $(IZPACK_BUILD_PDFDIR)
$(INSTALL) -m 644 -p $(IZPACK_CONFIG_PREFIX)/*.xml $(IZPACK_BUILD_PREFIX)
$(INSTALL) -m 700 -p $(IZPACK_CONFIG_PREFIX)/*.sh $(IZPACK_BUILD_PREFIX)
$(IZPACK) $(call CYGWIN_FILE,$(IZPACK_BUILD_FILE)) \
-b $(call CYGWIN_FILE,$(IZPACK_BUILD_PREFIX)) \
-o $(call CYGWIN_FILE,$(IZPACK_OUTPUT_FILE)) -k standard
.PHONY : izpack-build-all
##############################################################################
DISTRIB_ROOT = $(PROJECT_DISTRIBDIR)
DISTRIB_PACKAGE = $(INSTALL_PACKAGE)
DISTRIB_ARCHIVE = $(DISTRIB_ROOT)/$(DISTRIB_PACKAGE)
DISTRIB_GENMD5 = cd $(dir $(1)); $(MD5SUM) $(notdir $(1)) > $(notdir $(1)).md5
distrib : distrib-build-all
$(RM) -rf $(INSTALL_PREFIX)
distrib-build-all : distrib-build-unix
distrib-build-all : distrib-build-windows
distrib-build-all : distrib-build-ia
distrib-build-all : distrib-build-addons
distrib-build-unix : install
$(RM) $(DISTRIB_ARCHIVE).tar
$(RM) $(DISTRIB_ARCHIVE).tar.gz
$(RM) $(DISTRIB_ARCHIVE).tar.bz2
$(strip $(TAR) cf $(DISTRIB_ARCHIVE).tar -C $(dir $(INSTALL_PREFIX)) \
$(notdir $(INSTALL_PREFIX)))
$(BZIP2) --best -c $(DISTRIB_ARCHIVE).tar > $(DISTRIB_ARCHIVE).tar.bz2
$(GZIP) --best -c $(DISTRIB_ARCHIVE).tar > $(DISTRIB_ARCHIVE).tar.gz
$(call DISTRIB_GENMD5,$(DISTRIB_ARCHIVE).tar.bz2)
$(call DISTRIB_GENMD5,$(DISTRIB_ARCHIVE).tar.gz)
$(RM) $(DISTRIB_ARCHIVE).tar
distrib-build-windows : install-windows
@$(call RUN,cd $(dir $(INSTALL_PREFIX))); \
$(call RUN,$(RM) $(DISTRIB_PACKAGE).zip); \
$(call RUN,$(ZIP) -q -r $(DISTRIB_PACKAGE).zip \
$(notdir $(INSTALL_PREFIX)))
@archive=$(dir $(INSTALL_PREFIX))/$(DISTRIB_PACKAGE).zip; \
if [ ! $(DISTRIB_ARCHIVE).zip -ef $$archive ]; then \
$(call RUN,$(RM) $(DISTRIB_ARCHIVE).zip); \
$(call RUN,$(CP) $(dir $(INSTALL_PREFIX))/$(DISTRIB_PACKAGE).zip \
$(DISTRIB_ARCHIVE).zip); \
fi
$(call DISTRIB_GENMD5,$(DISTRIB_ARCHIVE).zip)
distrib-build-ia : ia-build-all
distrib-build-izpack : izpack-build-all
distrib-build-addons : install-addons
distrib-izpack : distrib-build-izpack
distrib-official : version-update
@$(make) -C doc/tutorial distclean
@$(make) -C doc/reference distclean
@$(make) distclean
@$(make) all
@$(make) -C doc/reference all
@$(make) -C doc/tutorial all
@$(make) test
@$(make) distrib INSTALL_VERSION='$$(PROJECT_VERSION)'
# $(CVS) tag "release-$(subst .,_,$(PROJECT_VERSION))" $(PROJECT_ROOT)
@$(make) version-increment
.PHONY : distrib
.PHONY : distrib-build-all
.PHONY : distrib-build-unix
.PHONY : distrib-build-windows
.PHONY : distrib-build-ia
.PHONY : distrib-build-izpack
.PHONY : distrib-build-website
.PHONY : distrib-izpack
.PHONY : distrib-official
##############################################################################
|