Subversion Repositories DevTools

Rev

Rev 363 | Rev 369 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 363 Rev 367
Line 642... Line 642...
642
    $file = Require( "$::GBE_CONFIG/TOOLSET", $ScmToolset, "Toolset definition " );
642
    $file = Require( "$::GBE_CONFIG/TOOLSET", $ScmToolset, "Toolset definition " );
643
    push( @ScmDepends, "$file" );
643
    push( @ScmDepends, "$file" );
644
 
644
 
645
#.. Package definitions
645
#.. Package definitions
646
#
646
#
647
#   a)  Firstly the static buildlib.pl generated search paths, which
647
#   Global DPACKAGE definitions, which may pull in $ScmTarget specific definitions.
648
#       are $ScmPlatform specific.
-
 
649
#
648
#
650
#   b)  Secondly the global DPACKAGE definitions, which may pull in
-
 
651
#       $ScmTarget specific definitions.
-
 
652
#
-
 
653
    if ( -e "$ScmRoot/$ScmInterface/$ScmPlatform.rul" )
-
 
654
    {
-
 
655
        Defines( "$ScmRoot/$ScmInterface", "$ScmPlatform.rul" );
-
 
656
    }
-
 
657
 
649
 
658
    MakeIf::PackageLoad( $ScmPlatform );        # DPACKAGE's (if any)
650
    MakeIf::PackageLoad( $ScmPlatform );        # DPACKAGE's (if any)
659
 
651
 
660
 
652
 
661
#.. Package extensions
653
#.. Package extensions
Line 8353... Line 8345...
8353
#
8345
#
8354
PWD             := \$(CURDIR)
8346
PWD             := \$(CURDIR)
8355
export PWD
8347
export PWD
8356
 
8348
 
8357
#
8349
#
8358
#   NOSCMDEPEND - Used to remove dependency checking of build files
-
 
8359
#                 Used internally by the build system
-
 
8360
#   NODEPEND    - Used to suppress generated dependency file checking
8350
#   NODEPEND    - Used to suppress generated dependency file checking
8361
#                 Mostly done in jmake.pl
8351
#                 Mostly done in jmake.pl
8362
#   EXPERT      - Used to suppress dependency on this makefile
8352
#   EXPERT      - Used to suppress dependency on this makefile
8363
#
8353
#
8364
EOF
8354
EOF
8365
 
8355
 
8366
MakePrint( "NOSCMDEPEND\t?= " . ($ScmExpert ? '1' : '0' ) . "\n" );
-
 
8367
MakePrint( "EXPERT\t\t?= " . ($ScmExpert ? '1' : '0' ) . "\n" );
8356
MakePrint( "EXPERT\t\t?= " . ($ScmExpert ? '1' : '0' ) . "\n" );
8368
MakePrint( "NODEPEND\t?= 0\n" );
8357
MakePrint( "NODEPEND\t?= 0\n" );
8369
 
8358
 
8370
print MAKEFILE <<EOF;
8359
print MAKEFILE <<EOF;
8371
 
8360
 
Line 8373... Line 8362...
8373
#   SCM_MAKEFILE - The name of the file to depend upon
8362
#   SCM_MAKEFILE - The name of the file to depend upon
8374
#                  Supressed in EXPERT mode
8363
#                  Supressed in EXPERT mode
8375
#
8364
#
8376
ifneq (\$(EXPERT),0)
8365
ifneq (\$(EXPERT),0)
8377
SCM_MAKEFILE	:=
8366
SCM_MAKEFILE	:=
8378
NOSCMDEPEND	:= 1
-
 
8379
else
8367
else
8380
SCM_MAKEFILE	:= $Makefile
8368
SCM_MAKEFILE	:= $Makefile
8381
endif
8369
endif
8382
EOF
8370
EOF
8383
 
8371
 
Line 8593... Line 8581...
8593
 
8581
 
8594
#-------------------------------------------------------------------------------
8582
#-------------------------------------------------------------------------------
8595
#   
8583
#   
8596
#
8584
#
8597
    MakeHeader ("Include Search Paths",
8585
    MakeHeader ("Include Search Paths",
-
 
8586
                "Package Include Paths for header files and libraries" );
-
 
8587
 
-
 
8588
    MakeDefEntry( 'PINCDIRS', '=', '# includes');
-
 
8589
    MakeDefEntry( 'PLIBDIRS', '=', '# libraries');
-
 
8590
 
-
 
8591
    for my $package (@{$::ScmBuildPkgRules{$ScmPlatform} })
-
 
8592
    {
-
 
8593
        #
-
 
8594
        #   Skip the pseudo package that encapsulates the interface
-
 
8595
        #   directory. Currently the makefiles do this in a different
-
 
8596
        #   manner - to be resolved
-
 
8597
        #
-
 
8598
        #   Just comment out the lines so that the data is visible
-
 
8599
        #   Its a hint to make use of the data
-
 
8600
        #
-
 
8601
        my $prefix = '';
-
 
8602
        $prefix = '# ' if ( $package->{'TYPE'} eq 'interface' );
-
 
8603
        $prefix = '# ' if ( $package->{'TYPE'} eq 'build' );
-
 
8604
 
-
 
8605
 
-
 
8606
        my $name = $package->{'NAME'} . '/' . $package->{'VERSION'};
-
 
8607
        my $base = $package->{'ROOT'};
-
 
8608
 
-
 
8609
        MakeHeader ("Source: $name");
-
 
8610
 
-
 
8611
        #
-
 
8612
        #   List include and library directories
-
 
8613
        #   Note: Need the True Path for windows.
-
 
8614
        #       Some makefile functions (wildcard) only work as expected
-
 
8615
        #       if the case of the pathname is correct. Really only a problem
-
 
8616
        #       with badly formed legecy packages where the Windows user
-
 
8617
        #       guessed at the package format.
-
 
8618
        #
-
 
8619
        #       The conversion to a TruePath is done when ScmBuildPkgRules
-
 
8620
        #       is created. Create one, use many time.
-
 
8621
        #
-
 
8622
        #
-
 
8623
        for my $type (qw (PINCDIRS PLIBDIRS) )
-
 
8624
        {
-
 
8625
            for my $path ( @{$package->{$type}} )
-
 
8626
            {
-
 
8627
                MakeDefEntry ( "$prefix$type", "+=", $base . $path);
-
 
8628
            }
-
 
8629
        }
-
 
8630
    }
-
 
8631
 
-
 
8632
#-------------------------------------------------------------------------------
-
 
8633
#   
-
 
8634
#
-
 
8635
    MakeHeader ("Include Search Paths",
8598
                "Local Include Paths" );
8636
                "Local Include Paths",
-
 
8637
                " LINKDIRS - Local include search path (short)",
-
 
8638
                " INCDIRS  - Include search path (complete)",
-
 
8639
                " NODEPDIRS - ",
-
 
8640
                " SRCDIRS - ",
-
 
8641
                " LIBDIRS - Library search path",
-
 
8642
 
-
 
8643
                );
8599
 
8644
 
8600
    # Include search path
8645
    # Include search path
8601
    #
8646
    #
8602
    #   user-local
8647
    #   user-local
8603
    #   local/
8648
    #   local
8604
    #           see above
8649
    #   interface
8605
    #   interface/
8650
    #       BuildPkgArchive
8606
    #           see above
8651
    #       LinkPkgArchive
8607
    #   user-global
8652
    #   user-global
8608
    #
8653
    #
8609
 
8654
 
8610
    MakeDefEntry ( "\nLINCDIRS",    "=", \@L_INCDIRS );     # .. Local
8655
    MakeDefEntry ( "\nLINCDIRS",    "= ", \@L_INCDIRS );     # .. Local
8611
    MakeDefEntry ( "LINCDIRS",      "+=", MakePaths( '$(INCDIR_LOCAL)' ));     # .. Sandbox interface
8656
    MakeDefEntry ( "LINCDIRS",      "+=", MakePaths( '$(INCDIR_LOCAL)' ));     # .. Sandbox interface
8612
    MakeDefEntry ( "LINCDIRS",      "+=", MakePaths( '$(INCDIR_INTERFACE)' )); # .. Sandbox interface
8657
    MakeDefEntry ( "LINCDIRS",      "+=", MakePaths( '$(INCDIR_INTERFACE)' )); # .. Sandbox interface
8613
    MakeDefEntry ( "LINCDIRS",      "+=", \@G_INCDIRS );    # .. Global
8658
    MakeDefEntry ( "LINCDIRS",      "+=", \@G_INCDIRS );    # .. Global
8614
 
8659
 
8615
    MakeDefEntry   ( "INCDIRS",  "= ",  '$(LINCDIRS)' );
8660
    MakeDefEntry ( "INCDIRS",  "= ", '$(LINCDIRS)' );               # Local
8616
    MakeIfDefEntry ( "PINCDIRS", "INCDIRS", "+=", '$(PINCDIRS)' );
8661
    MakeDefEntry ( "INCDIRS",  "+=", '$(PINCDIRS)' );               # Package
8617
    MakeDefEntry   ( "LINCDIRS",    "+=", \@S_INCDIRS );    # .. System
8662
    MakeDefEntry ( "LINCDIRS", "+=", \@S_INCDIRS );                 # System
8618
 
8663
 
8619
    # Source search path
8664
    # Source search path
8620
 
8665
 
8621
    MakeDefEntry( "\nNODEPDIRS",        "=", \@NODEPDIRS );
8666
    MakeDefEntry( "\nNODEPDIRS",        "=", \@NODEPDIRS );
8622
 
8667
 
8623
    MakeDefEntry( "\nSRCDIRS",          "=" , [ @L_SRCDIRS, @G_SRCDIRS ] );
8668
    MakeDefEntry( "\nSRCDIRS","= "  , [ @L_SRCDIRS, @G_SRCDIRS ] ); # Local
8624
    MakeIfDefEntry ( "PINCDIRS", "SRCDIRS", "+= ", '$(PINCDIRS)' );
8669
    MakeDefEntry ( "SRCDIRS", "+=" , '$(PINCDIRS)' );               # Package
8625
    MakeDefEntry   ( "SRCDIRS",    "+=", \@S_INCDIRS );    # .. System
8670
    MakeDefEntry ( "SRCDIRS", "+=" , \@S_INCDIRS );                 # System
8626
 
8671
 
8627
    # Library search path
8672
    # Library search path
8628
    #
8673
    #
8629
    #   user-local
8674
    #   user-local
8630
    #   local/
8675
    #   local
8631
    #           see above
8676
    #   interface
8632
    #   interface/
8677
    #       BuildPkgArchive
8633
    #           see above
8678
    #       LinkPkgArchive
8634
    #   user-global
8679
    #   user-global
8635
 
8680
 
8636
    MakeDefEntry( "\nLIBDIRS",  "=",  '$(LIBDIR)' );                    # User Local
8681
    MakeDefEntry( "\nLIBDIRS",  "= ", '$(LIBDIR)' );                    # User Local
8637
    MakeDefEntry( "LIBDIRS",    "+=", \@L_LIBDIRS );                    # Local
8682
    MakeDefEntry( "LIBDIRS",    "+=", \@L_LIBDIRS );                    # Local
8638
    MakeDefEntry( "LIBDIRS",    "+=", MakePaths( '$(LIBDIR_LOCAL)' ));  # Sandbox/interface
8683
    MakeDefEntry( "LIBDIRS",    "+=", MakePaths( '$(LIBDIR_LOCAL)' ));  # Sandbox/interface
8639
    MakeDefEntry( "LIBDIRS",    "+=", MakePaths( '$(LIBDIR_INTERFACE)' ));
8684
    MakeDefEntry( "LIBDIRS",    "+=", MakePaths( '$(LIBDIR_INTERFACE)' ));
8640
    MakeDefEntry( "LIBDIRS",    "+=", \@G_LIBDIRS );                    # Global
8685
    MakeDefEntry( "LIBDIRS",    "+=", \@G_LIBDIRS );                    # Global
8641
    MakeIfDefEntry ( "PLIBDIRS", "LIBDIRS", "+= ", '$(PLIBDIRS)' );
8686
    MakeDefEntry( "LIBDIRS",    "+=", '$(PLIBDIRS)' );                  # Package
8642
    MakeDefEntry( "LIBDIRS",    "+=", \@S_LIBDIRS );                    # System
8687
    MakeDefEntry( "LIBDIRS",    "+=", \@S_LIBDIRS );                    # System
8643
 
8688
 
8644
#-------------------------------------------------------------------------------
8689
#-------------------------------------------------------------------------------
8645
#
8690
#
8646
#   Subdir creation and deletion
8691
#   Subdir creation and deletion
Line 9813... Line 9858...
9813
 
9858
 
9814
#--------- Toolset Rules -------------------------------------------------------
9859
#--------- Toolset Rules -------------------------------------------------------
9815
    MakeHeader ("Toolset Rules");
9860
    MakeHeader ("Toolset Rules");
9816
    MakePrintList ( \@TOOLSETRULES );
9861
    MakePrintList ( \@TOOLSETRULES );
9817
 
9862
 
9818
#-------------------------------------------------------------------------------
-
 
9819
#   Makefile targets
-
 
9820
#
-
 
9821
MakeHeader ("Makefile targets",
-
 
9822
            "These targets are not used by JATS",
-
 
9823
            "They can only used when the makefile is used directly",
-
 
9824
            "This is not the intended use of this makefile",
-
 
9825
           );
-
 
9826
 
-
 
9827
#
-
 
9828
#   Examine %INC and extract included files within JATS
-
 
9829
#   These will be added to the list of dependent files
-
 
9830
#
-
 
9831
foreach  (  values %INC)
-
 
9832
{
-
 
9833
    next if ( m/Makefile.*\.cfg$/ );    # Skip my config
-
 
9834
    if ( ( m/^\./)          ||
-
 
9835
         ( m/^$::GBE_CORE/) ||
-
 
9836
         ( m/^$::GBE_BIN/)  ||
-
 
9837
         ( m/^$::GBE_PERL/) ||
-
 
9838
         ( m/^$::GBE_TOOLS/) )
-
 
9839
    {
-
 
9840
        UniquePush (\@ScmDepends, $_ )
-
 
9841
    }
-
 
9842
}
-
 
9843
 
-
 
9844
MakeDefEntry    ( "GBE_DEPENDS", "=" );
-
 
9845
MakeIfZeroEntry ( "NOSCMDEPEND", "GBE_DEPENDS", "+=", \@ScmDepends );
-
 
9846
 
-
 
9847
    print MAKEFILE <<EOF;
-
 
9848
 
-
 
9849
\$(GBE_PLATFORM).mk:	\$(GBE_DEPENDS)
-
 
9850
	\@echo One or more JATS source or internal files have changed, "rebuild" required
-
 
9851
	\@for i in \$? ; do echo "      Changed: \$\$i"; done
-
 
9852
	\@exit 10
-
 
9853
 
-
 
9854
EOF
-
 
9855
 
-
 
9856
#--------- Maketags ------------------------------------------------------------
9863
#--------- Maketags ------------------------------------------------------------
9857
 
9864
 
9858
    Maketag( "make_init",           @INITS );
9865
    Maketag( "make_init",           @INITS );
9859
    Maketag( "make_dir",            @mkdirdep );
9866
    Maketag( "make_dir",            @mkdirdep );
9860
    Maketag( "generate",            @generatedep || @projectgendep || @USERGENERATED || ($ScmToolsetGenerate != 0) );
9867
    Maketag( "generate",            @generatedep || @projectgendep || @USERGENERATED || ($ScmToolsetGenerate != 0) );