~statik/ubuntu/maverick/erlang/erlang-merge-testing

« back to all changes in this revision

Viewing changes to Makefile.in

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-05-01 10:14:38 UTC
  • mfrom: (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090501101438-6qlr6rsdxgyzrg2z
Tags: 1:13.b-dfsg-2
* Cleaned up patches: removed unneeded patch which helped to support
  different SCTP library versions, made sure that changes for m68k
  architecture applied only when building on this architecture.
* Removed duplicated information from binary packages descriptions.
* Don't require libsctp-dev build-dependency on solaris-i386 architecture
  which allows to build Erlang on Nexenta (thanks to Tim Spriggs for
  the suggestion).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# ``The contents of this file are subject to the Erlang Public License,
 
1
#
 
2
# %CopyrightBegin%
 
3
 
4
# Copyright Ericsson AB 1998-2009. All Rights Reserved.
 
5
 
6
# The contents of this file are subject to the Erlang Public License,
2
7
# Version 1.1, (the "License"); you may not use this file except in
3
8
# compliance with the License. You should have received a copy of the
4
9
# Erlang Public License along with this software. If not, it can be
5
 
# retrieved via the world wide web at http://www.erlang.org/.
 
10
# retrieved online at http://www.erlang.org/.
6
11
7
12
# Software distributed under the License is distributed on an "AS IS"
8
13
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
9
14
# the License for the specific language governing rights and limitations
10
15
# under the License.
11
16
12
 
# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
13
 
# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
14
 
# AB. All Rights Reserved.''
15
 
16
 
#     $Id$
17
 
#
 
17
# %CopyrightEnd%
 
18
 
18
19
# Toplevel makefile for building the Erlang system
19
20
#
20
21
 
281
282
        ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
282
283
            $(MAKE) opt BUILD_ALL=true
283
284
 
 
285
 
 
286
preloaded:
 
287
        cd erts/preloaded/src && \
 
288
        ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
 
289
                $(MAKE) opt BUILD_ALL=true      
 
290
 
284
291
dep depend:
285
292
        cd erts/emulator && ERL_TOP=$(ERL_TOP) $(MAKE) generate depend
286
293
        cd erts/lib_src && ERL_TOP=$(ERL_TOP) $(MAKE) depend
291
298
# ----------------------------------------------------------------------
292
299
# Bootstraps... 
293
300
# ----------------------------------------------------------------------
294
 
 
 
301
ifeq ($(TARGET),win32)
295
302
bootstrap_setup: check_recreate_primary_bootstrap
296
 
ifeq ($(TARGET),win32)
297
303
        @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erl.exe \
298
304
                $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc.exe \
299
305
                $(BOOTSTRAP_ROOT)/bootstrap/bin/erl.ini \
305
311
        @cp $(ERL_TOP)/bin/$(TARGET)/erl.exe \
306
312
                $(BOOTSTRAP_ROOT)/bootstrap/bin/erl.exe
307
313
else
308
 
        @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erl \
309
 
                $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc
 
314
bootstrap_setup: check_recreate_primary_bootstrap $(BOOTSTRAP_ROOT)/bootstrap/bin/erl $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc
 
315
 
 
316
$(BOOTSTRAP_ROOT)/bootstrap/bin/erl:  $(ERL_TOP)/erts/etc/unix/erl.src.src
 
317
        @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erl 
310
318
        @sed    -e "s;%FINAL_ROOTDIR%;$(BOOTSTRAP_ROOT)/bootstrap;"   \
311
319
                -e "s;\$$ROOTDIR/erts-.*/bin;$(ERL_TOP)/bin/$(TARGET);"    \
312
320
                -e "s;EMU=.*;EMU=beam$(TYPEMARKER);" \
313
321
                $(ERL_TOP)/erts/etc/unix/erl.src.src > \
314
322
                        $(BOOTSTRAP_ROOT)/bootstrap/bin/erl
 
323
        @chmod 755 $(BOOTSTRAP_ROOT)/bootstrap/bin/erl
 
324
 
 
325
$(BOOTSTRAP_ROOT)/bootstrap/bin/erlc:  $(ERL_TOP)/bin/$(TARGET)/erlc
 
326
        @rm -f  $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc
315
327
        @cp $(ERL_TOP)/bin/$(TARGET)/erlc $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc
316
 
        @chmod 755 $(BOOTSTRAP_ROOT)/bootstrap/bin/erl \
317
 
                $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc
 
328
        @chmod 755 $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc
318
329
endif
319
330
 
320
331
secondary_bootstrap_build:
325
336
secondary_bootstrap_copy:
326
337
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe ; fi
327
338
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe/ebin ; fi
328
 
        if test -f lib/hipe/ebin/hipe.beam ; then cp lib/hipe/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe/ebin; fi
 
339
        for x in lib/hipe/ebin/*.beam; do \
 
340
                BN=`basename $$x`; \
 
341
                TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/hipe/ebin/$$BN; \
 
342
                test -f  $$TF && \
 
343
                test '!' -z "`find $$x -newer $$TF -print`" && \
 
344
                        cp $$x $$TF; \
 
345
                test '!' -f $$TF && \
 
346
                        cp $$x $$TF; \
 
347
                true; \
 
348
        done
 
349
#       if test -f lib/hipe/ebin/hipe.beam ; then cp lib/hipe/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe/ebin; fi
329
350
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools ; fi
330
351
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin ; fi
331
352
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include ; fi
332
 
        cp lib/parsetools/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin
333
 
        cp -f lib/parsetools/include/*.hrl $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include
 
353
        for x in lib/parsetools/ebin/*.beam; do \
 
354
                BN=`basename $$x`; \
 
355
                TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin/$$BN; \
 
356
                test -f  $$TF && \
 
357
                test '!' -z "`find $$x -newer $$TF -print`" && \
 
358
                        cp $$x $$TF; \
 
359
                test '!' -f $$TF && \
 
360
                        cp $$x $$TF; \
 
361
                true; \
 
362
        done
 
363
#       cp lib/parsetools/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin
 
364
        for x in lib/parsetools/include/*.hrl; do \
 
365
                BN=`basename $$x`; \
 
366
                TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include/$$BN; \
 
367
                test -f  $$TF && \
 
368
                test '!' -z "`find $$x -newer $$TF -print`" && \
 
369
                        cp $$x $$TF; \
 
370
                test '!' -f $$TF && \
 
371
                        cp $$x $$TF; \
 
372
                true; \
 
373
        done
 
374
#       cp -f lib/parsetools/include/*.hrl $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include
334
375
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1 ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1 ; fi
335
376
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/ebin ; fi
336
377
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src ; fi
337
 
        cp lib/asn1/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/ebin
338
 
        cp -f lib/asn1/src/*.erl lib/asn1/src/*.hrl $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src
 
378
        for x in lib/asn1/ebin/*.beam; do \
 
379
                BN=`basename $$x`; \
 
380
                TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/ebin/$$BN; \
 
381
                test -f  $$TF && \
 
382
                test '!' -z "`find $$x -newer $$TF -print`" && \
 
383
                        cp $$x $$TF; \
 
384
                test '!' -f $$TF && \
 
385
                        cp $$x $$TF; \
 
386
                true; \
 
387
        done
 
388
#       cp lib/asn1/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/ebin
 
389
        for x in lib/asn1/src/*.[eh]rl; do \
 
390
                BN=`basename $$x`; \
 
391
                TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src/$$BN; \
 
392
                test -f  $$TF && \
 
393
                test '!' -z "`find $$x -newer $$TF -print`" && \
 
394
                        cp $$x $$TF; \
 
395
                test '!' -f $$TF && \
 
396
                        cp $$x $$TF; \
 
397
                true; \
 
398
        done
 
399
#       cp -f lib/asn1/src/*.erl lib/asn1/src/*.hrl $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src
339
400
 
340
401
tertiary_bootstrap_build:
341
402
        cd lib && \
346
407
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp ; fi
347
408
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/ebin ; fi
348
409
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/include ; fi
349
 
        cp lib/snmp/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/ebin
 
410
        for x in lib/snmp/ebin/*.beam; do \
 
411
                BN=`basename $$x`; \
 
412
                TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/ebin/$$BN; \
 
413
                test -f  $$TF && \
 
414
                test '!' -z "`find $$x -newer $$TF -print`" && \
 
415
                        cp $$x $$TF; \
 
416
                test '!' -f $$TF && \
 
417
                        cp $$x $$TF; \
 
418
                true; \
 
419
        done
 
420
#       cp lib/snmp/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/ebin
350
421
 
351
422
fourth_bootstrap_build:
352
423
        cd lib && \
360
431
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/ic ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/ic ; fi
361
432
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin ; fi
362
433
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include ; fi
363
 
        cp lib/ic/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin
364
 
        cp -f lib/ic/include/*.idl lib/ic/include/*.h $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include
365
 
        cp lib/sasl/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/ebin
 
434
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx ; fi
 
435
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/ebin ; fi
 
436
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include ; fi
 
437
        for x in lib/ic/ebin/*.beam; do \
 
438
                BN=`basename $$x`; \
 
439
                TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin/$$BN; \
 
440
                test -f  $$TF && \
 
441
                test '!' -z "`find $$x -newer $$TF -print`" && \
 
442
                        cp $$x $$TF; \
 
443
                test '!' -f $$TF && \
 
444
                        cp $$x $$TF; \
 
445
                true; \
 
446
        done
 
447
#       cp lib/ic/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin
 
448
        for x in lib/ic/include/*.idl; do \
 
449
                BN=`basename $$x`; \
 
450
                TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include/$$BN; \
 
451
                test -f  $$TF && \
 
452
                test '!' -z "`find $$x -newer $$TF -print`" && \
 
453
                        cp $$x $$TF; \
 
454
                test '!' -f $$TF && \
 
455
                        cp $$x $$TF; \
 
456
                true; \
 
457
        done
 
458
        for x in lib/ic/include/*.h; do \
 
459
                BN=`basename $$x`; \
 
460
                TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include/$$BN; \
 
461
                test -f  $$TF && \
 
462
                test '!' -z "`find $$x -newer $$TF -print`" && \
 
463
                        cp $$x $$TF; \
 
464
                test '!' -f $$TF && \
 
465
                        cp $$x $$TF; \
 
466
                true; \
 
467
        done
 
468
#       cp -f lib/ic/include/*.idl lib/ic/include/*.h $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include
 
469
        for x in lib/sasl/ebin/*.beam; do \
 
470
                BN=`basename $$x`; \
 
471
                TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/ebin/$$BN; \
 
472
                test -f  $$TF && \
 
473
                test '!' -z "`find $$x -newer $$TF -print`" && \
 
474
                        cp $$x $$TF; \
 
475
                test '!' -f $$TF && \
 
476
                        cp $$x $$TF; \
 
477
                true; \
 
478
        done
 
479
#       cp lib/sasl/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/ebin
366
480
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools ; fi
367
481
        if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin ; fi
368
 
        cp lib/syntax_tools/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin
 
482
        for x in lib/syntax_tools/ebin/*.beam; do \
 
483
                BN=`basename $$x`; \
 
484
                TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin/$$BN; \
 
485
                test -f  $$TF && \
 
486
                test '!' -z "`find $$x -newer $$TF -print`" && \
 
487
                        cp $$x $$TF; \
 
488
                test '!' -f $$TF && \
 
489
                        cp $$x $$TF; \
 
490
                true; \
 
491
        done
 
492
        for x in lib/wx/include/*.hrl; do \
 
493
                BN=`basename $$x`; \
 
494
                TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include/$$BN; \
 
495
                test -f  $$TF && \
 
496
                test '!' -z "`find $$x -newer $$TF -print`" && \
 
497
                        cp $$x $$TF; \
 
498
                test '!' -f $$TF && \
 
499
                        cp $$x $$TF; \
 
500
                true; \
 
501
        done
 
502
 
 
503
#       cp lib/syntax_tools/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin
369
504
 
370
505
.PHONY: check_recreate_primary_bootstrap recreate_primary_bootstrap
371
506
 
404
539
 
405
540
# These modules should stay in the kernel directory to make building
406
541
# of the emulator possible
407
 
KERNEL_PRELOAD    = otp_ring0 init erl_prim_loader prim_inet prim_file zlib prim_zip erlang
408
542
 
409
543
.PHONY: primary_bootstrap                                               \
410
544
        primary_bootstrap_check_make                                    \
423
557
                $(MAKE) TESTROOT=$(BOOTSTRAP_TOP) \
424
558
                BOOTSTRAP_TOP=$(BOOTSTRAP_TOP) \
425
559
                primary_bootstrap_copy
426
 
        cd lib/kernel/src && \
427
 
                $(MAKE) ERLC_FLAGS='-pa $(BOOTSTRAP_COMPILER)/ebin' \
428
 
                $(KERNEL_PRELOAD:%=../ebin/%.beam)
429
560
        cd $(ERL_TOP)/erts/start_scripts && \
430
561
                $(MAKE) TESTROOT=$(BOOTSTRAP_TOP) \
431
562
                BOOTSTRAP_TOP=$(BOOTSTRAP_TOP) bootstrap_scripts
500
631
 
501
632
# To remove modules left by the bootstrap building, but leave (restore)
502
633
# the modules in kernel which are needed for an emulator build
 
634
KERNEL_PRELOAD    = otp_ring0 init erl_prim_loader prim_inet prim_file zlib prim_zip erlang
503
635
KERNEL_PRELOAD_BEAMS=$(KERNEL_PRELOAD:%=$(BOOTSTRAP_TOP)/lib/kernel/ebin/%.beam)
504
636
 
505
637
# Creates "erl" and "erlc" scripts in bin/erl which uses the libraries in lib
540
672
        percept_test                            \
541
673
        pman_test                               \
542
674
        public_key_test                         \
 
675
        reltool_test                            \
543
676
        sasl_test                               \
544
677
        snmp_test                               \
545
678
        runtime_tools_test                      \
546
679
        stdlib_test                             \
547
680
        system_test                             \
548
 
        test_server_test
 
681
        test_server_test                        \
 
682
        wx_test
549
683
 
550
684
# Tests that can *not* be run on VxWorks
551
685
ifneq ($(findstring vxworks,$(TARGET)),vxworks)