Ignore:
Timestamp:
21/08/2008 10:59:17 (4 years ago)
Author:
chris
Message:

Build lib/win32.a (even if empty) on all platforms, to help Boxi
linking.

Allow overriding CXXFLAGS from Configure (was broken before).

Use make -q to test whether module dependencies should be rebuilt, more
quietly than before.

Reformat for readability.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/infrastructure/makebuildenv.pl.in

    r2232 r2240  
    4040my %env_flags; 
    4141 
    42 my $windows_include_path = ""; 
    43 if ($target_windows) 
    44 { 
    45         $module_dependency{"lib/common"} = ["lib/win32"]; 
    46         push @implicit_deps, "lib/win32"; 
    47 } 
    48 else 
    49 { 
    50         # $env_flags{'IGNORE_lib/win32'} = 1; 
    51 } 
     42$module_dependency{"lib/common"} = ["lib/win32"]; 
     43push @implicit_deps, "lib/win32"; 
    5244 
    5345# print "Flag: $_\n" for(keys %env_flags); 
     
    502494 
    503495        # make include path 
    504         my $include_paths = $windows_include_path . 
    505                 join(' ',map {'-I../../'.$_} @all_deps_for_module); 
     496        my $include_paths = join(' ',map {'-I../../'.$_} @all_deps_for_module); 
    506497 
    507498        # is target a library? 
     
    531522 
    532523        my $default_cxxflags = '@CXXFLAGS@'; 
    533         my $default_cxxflags =~ s/ -O2//g; 
     524        $default_cxxflags =~ s/ -O2//g; 
    534525 
    535526        my $release_flags = "-O2"; 
     
    551542WINDRES = windres 
    552543 
    553 CXXFLAGS = @CPPFLAGS@ $default_cxxflags @CXXFLAGS_STRICT@ \\ 
     544DEFAULT_CXXFLAGS = @CPPFLAGS@ $default_cxxflags @CXXFLAGS_STRICT@ \\ 
    554545        $include_paths $extra_platform_defines \\ 
    555546        -DBOX_VERSION="\\"$product_version\\"" 
     
    557548 
    558549.ifdef RELEASE 
    559 CXXFLAGS += -DNDEBUG $release_flags 
     550CXXFLAGS = -DNDEBUG $release_flags \$(DEFAULT_CXXFLAGS) 
    560551OUTBASE = ../../release 
    561552OUTDIR = ../../release/$mod 
     
    563554VARIENT = RELEASE 
    564555.else 
    565 CXXFLAGS += -g 
     556CXXFLAGS = -g \$(DEFAULT_CXXFLAGS) 
    566557OUTBASE = ../../debug 
    567558OUTDIR = ../../debug/$mod 
     
    751742                for my $dep (@all_deps_for_module) 
    752743                { 
    753                         $deps_makeinfo .= "\t\t\$(HIDE) (cd ../../$dep; \$(MAKE)$sub_make_options \$(DEPENDMAKEFLAGS) -D NODEPS)\n"; 
    754                 } 
     744                        $deps_makeinfo .= "\t\t\$(HIDE) (cd ../../$dep; \$(MAKE)$sub_make_options -q \$(DEPENDMAKEFLAGS) -D NODEPS || \$(MAKE)$sub_make_options \$(DEPENDMAKEFLAGS) -D NODEPS)\n"; 
     745                } 
     746 
    755747                $deps_makeinfo .= ".\tendif\n.endif\n\n"; 
    756748        } 
     
    841833         
    842834        # and a clean target 
    843         print MAKE "clean:\n\t-rm -rf \$(OUTDIR)/*\n.\tifndef SUBCLEAN\n"; 
     835        print MAKE <<EOF; 
     836clean: 
     837        -rm -rf \$(OUTDIR)/* 
     838.       ifndef SUBCLEAN 
     839EOF 
    844840        for my $dep (@all_deps_for_module) 
    845841        { 
     
    878874                        s/\A\.\s*(ifdef|else|endif|ifndef)/$1/; 
    879875                        s/\A\.\s*include\s+<(.+?)>/include $1/; 
    880                         s/-D\s+(\w+)/$1=1/; 
     876                        s/-D\s+(\w+)/$1=1/g; 
    881877                        print MAKE; 
    882878                } 
Note: See TracChangeset for help on using the changeset viewer.