diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2005-06-21 17:04:19 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2005-06-21 17:04:19 +0000 |
commit | 0f01ae19ecb75e0d4ffbe16e2f333bfacc60864d (patch) | |
tree | 35fb36ae61d1593e5afe2438e5ab9348afbb8ce2 | |
parent | 5d82f699b6efd7f2396feebeea64578cee0ccceb (diff) | |
download | MPC-0f01ae19ecb75e0d4ffbe16e2f333bfacc60864d.tar.gz |
ChangeLogTag: Tue Jun 21 11:55:38 2005 Chad Elliott <elliott_c@ociweb.com>
29 files changed, 126 insertions, 35 deletions
@@ -1,3 +1,66 @@ +Tue Jun 21 11:55:38 2005 Chad Elliott <elliott_c@ociweb.com> + + * modules/BMakeProjectCreator.pm: + + Double ampersand, &&, means something special to Borland Make. + So, we override the get_and_symbol method to return a string that + Borland Make can handle. + + * modules/BMakeWorkspaceCreator.pm: + + Added -$(MAKEFLAGS) to each sub-make call so that options passed + to the original make are propagated down. Thanks to Johnny for + informing me know about this. + + * modules/MakeProjectBase.pm: + + Added an environment variable *for testing purposes only* that + forces Make based projects to be sorted. + + * modules/ProjectCreator.pm: + + If we are to sort files, the output files (used with custom_types + in templates) need to be sorted. + + * modules/TemplateParser.pm: + + Attempt to preserve the original order of template variables when + the values of the template variables refer to scoped template + variables. This isn't always possible, but in most cases it is. + + * prj_install.pl: + + Added pidl_files to the list of default installed files. + + * templates/bmake.mpd: + * templates/bmakecommon.mpt: + + Support multiple compilers (cbx and bcc) from within a single + makefile. + + * templates/em3vcpdll.mpt: + * templates/em3vcpdllexe.mpt: + * templates/em3vcplib.mpt: + * templates/em3vcplibexe.mpt: + * templates/nmakedll.mpt: + * templates/nmakeexe.mpt: + * templates/vc6dspdll.mpt: + * templates/vc6dspdllexe.mpt: + * templates/vc6dsplib.mpt: + * templates/vc6dsplibexe.mpt: + * templates/vc7csharp.mpt: + * templates/vc7dll.mpt: + * templates/vc7exe.mpt: + * templates/vc7lib.mpt: + * templates/vc7libexe.mpt: + * templates/vc7vb.mpt: + * templates/vc8dll.mpt: + * templates/vc8exe.mpt: + * templates/vc8lib.mpt: + * templates/vc8libexe.mpt: + + Alphabetically sort 'configurations' and 'platforms'. + Mon Jun 20 20:53:50 2005 Chad Elliott <elliott_c@ociweb.com> * modules/ProjectCreator.pm: diff --git a/modules/BMakeProjectCreator.pm b/modules/BMakeProjectCreator.pm index b1e26d4b..cd5a2141 100644 --- a/modules/BMakeProjectCreator.pm +++ b/modules/BMakeProjectCreator.pm @@ -52,6 +52,11 @@ sub fill_value { } +sub get_and_symbol { + #my($self) = shift; + return '&$(__TRICK_BORLAND_MAKE__)&'; +} + sub project_file_extension { #my($self) = shift; return '.bmak'; diff --git a/modules/BMakeWorkspaceCreator.pm b/modules/BMakeWorkspaceCreator.pm index 94d52978..9644be7f 100644 --- a/modules/BMakeWorkspaceCreator.pm +++ b/modules/BMakeWorkspaceCreator.pm @@ -107,7 +107,8 @@ sub write_project_targets { } print $fh ($chdir ? "\t\@cd $dir$crlf" : ''), - "\t\$(MAKE) -f ", basename($project), " $target$crlf", + "\t\$(MAKE) -\$(MAKEFLAGS) -f ", basename($project), + " $target$crlf", ($chdir ? "\t\@cd $back$crlf" : ''); } } diff --git a/modules/MakeProjectBase.pm b/modules/MakeProjectBase.pm index 621dc10a..c70aeced 100644 --- a/modules/MakeProjectBase.pm +++ b/modules/MakeProjectBase.pm @@ -24,7 +24,12 @@ sub dollar_special { sub sort_files { #my($self) = shift; - return 0; + if (defined $ENV{MPC_ALWAYS_SORT}) { + return 1; + } + else { + return 0; + } } diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm index 011656f5..3b284f05 100644 --- a/modules/ProjectCreator.pm +++ b/modules/ProjectCreator.pm @@ -3332,6 +3332,10 @@ sub get_custom_value { } } } + + if ($self->{'sort_files'}) { + @outputs = sort { $self->file_sorter($a, $b) } @outputs; + } $self->{'custom_output_files'}->{$input} = \@outputs; } } diff --git a/modules/TemplateParser.pm b/modules/TemplateParser.pm index f29f878c..0b81989b 100644 --- a/modules/TemplateParser.pm +++ b/modules/TemplateParser.pm @@ -452,12 +452,19 @@ sub process_foreach { $mixed |= $mixed{$values[$i]}; } if ($mixed) { - @values = (); + my(@nvalues) = (); foreach my $key (sort keys %mixed) { if ($mixed{$key}) { - push(@values, $key); + push(@nvalues, $key); } } + + ## Set the new values only if they are different + ## from the original (except for order). + my(@sorted) = sort(@values); + if (@sorted != @nvalues) { + @values = @nvalues; + } } for(my $i = 0; $i <= $#values; ++$i) { diff --git a/prj_install.pl b/prj_install.pl index 8f7bffec..82bc01dc 100755 --- a/prj_install.pl +++ b/prj_install.pl @@ -28,6 +28,7 @@ $version =~ s/.*\s+(\d+[\.\d]+)\s+.*/$1/; my(%defaults) = ('header_files' => 1, 'idl_files' => 1, 'inline_files' => 1, + 'pidl_files' => 1, 'template_files' => 1, ); diff --git a/templates/bmake.mpd b/templates/bmake.mpd index 4bb9bc8b..8ca221d9 100644 --- a/templates/bmake.mpd +++ b/templates/bmake.mpd @@ -32,8 +32,8 @@ UNICODE_DIR = Unicode\\ UC_MAIN = w !endif -INTERMEDIATE = $(CFG_DIR)$(UNICODE_DIR)<%noextension(project_name)%> <%foreach(compilers)%> +<%fornotlast("!ifdef")%><%forlast("!else #")%> <%uc(compiler)%> OBJ_EXT = <%obj_ext%> DLL_EXT = <%dll_ext%> LIB_EXT = <%lib_ext%> @@ -49,6 +49,9 @@ EXEFLAGS = <%exeflags%> WARNFLAGS = <%warnflags%> CCFLAGS = <%ccflags%><%if(compile_flags)%> <%compile_flags%><%endif%> <%endfor%> +!endif + +INTERMEDIATE = $(CFG_DIR)$(UNICODE_DIR)<%noextension(project_name)%> <%if(exename)%> NAME = <%exename%>$(EXEMODIFIER) <%else%> diff --git a/templates/bmakecommon.mpt b/templates/bmakecommon.mpt index b5eaaba5..edd566e4 100644 --- a/templates/bmakecommon.mpt +++ b/templates/bmakecommon.mpt @@ -3,12 +3,14 @@ conditional_include "common" -configurations = Debug Release -compilers = bcc -common_defines = WIN32 _WINDOWS _NO_VCL -common_libs = import32$(LIB_EXT) cw32mti.lib ws2_32.lib -common_flags = -a8 -unicode_flags = -WU +// If there are more than two compilers, +// then the template needs to be modified to support that +compilers = cbx bcc +configurations = Debug Release +common_defines = WIN32 _WINDOWS _NO_VCL +common_libs = import32$(LIB_EXT) cw32mti.lib ws2_32.lib +common_flags = -a8 +unicode_flags = -WU bcc { obj_ext = .obj diff --git a/templates/em3vcpdll.mpt b/templates/em3vcpdll.mpt index afe74454..d5dbbb8e 100644 --- a/templates/em3vcpdll.mpt +++ b/templates/em3vcpdll.mpt @@ -5,8 +5,8 @@ conditional_include "common" conditional_include "windowscommon" type_description = "Dynamic-Link Library" -configurations = Release Debug -platforms = "WCE ARM" "WCE ARMV4" "WCE x86" "WCE emulator" +configurations = Debug Release +platforms = "WCE ARM" "WCE ARMV4" "WCE emulator" "WCE x86" default_configuration = Debug default_platform = "WCE ARM" common_defines = UNICODE _UNICODE diff --git a/templates/em3vcpdllexe.mpt b/templates/em3vcpdllexe.mpt index 8e35f80b..66907635 100644 --- a/templates/em3vcpdllexe.mpt +++ b/templates/em3vcpdllexe.mpt @@ -5,10 +5,10 @@ conditional_include "common" conditional_include "windowscommon" type_description = Application -platforms = "WCE ARM" "WCE ARMV4" "WCE x86" "WCE emulator" +platforms = "WCE ARM" "WCE ARMV4" "WCE emulator" "WCE x86" default_configuration = Debug default_platform = "WCE ARM" -configurations = Release Debug +configurations = Debug Release common_defines = UNICODE _UNICODE stack = use_exe_modifier = diff --git a/templates/em3vcplib.mpt b/templates/em3vcplib.mpt index d72ad60f..4d34dd9f 100644 --- a/templates/em3vcplib.mpt +++ b/templates/em3vcplib.mpt @@ -5,10 +5,10 @@ conditional_include "common" conditional_include "windowscommon" type_description = "Static Library" -platforms = "WCE ARM" "WCE ARMV4" "WCE x86" "WCE emulator" +platforms = "WCE ARM" "WCE ARMV4" "WCE emulator" "WCE x86" default_configuration = Debug default_platform = "WCE ARM" -configurations = Release Debug +configurations = Debug Release common_defines = UNICODE _UNICODE stack = unicode = 1 diff --git a/templates/em3vcplibexe.mpt b/templates/em3vcplibexe.mpt index ffd343f0..617155eb 100644 --- a/templates/em3vcplibexe.mpt +++ b/templates/em3vcplibexe.mpt @@ -5,10 +5,10 @@ conditional_include "common" conditional_include "windowscommon" type_description = Application -platforms = "WCE ARM" "WCE ARMV4" "WCE x86" "WCE emulator" +platforms = "WCE ARM" "WCE ARMV4" "WCE emulator" "WCE x86" default_configuration = Debug default_platform = "WCE ARM" -configurations = Release Debug +configurations = Debug Release common_defines = UNICODE _UNICODE stack = use_exe_modifier = diff --git a/templates/nmakedll.mpt b/templates/nmakedll.mpt index 68a7f3a3..8b04e1f0 100644 --- a/templates/nmakedll.mpt +++ b/templates/nmakedll.mpt @@ -4,7 +4,7 @@ conditional_include "common" conditional_include "windowscommon" -configurations = Release Debug "Static Release" "Static Debug" +configurations = Debug Release "Static Debug" "Static Release" platforms = Win32 default_configuration = Debug common_defines = WIN32 _WINDOWS diff --git a/templates/nmakeexe.mpt b/templates/nmakeexe.mpt index 5952183f..3e4dde0d 100644 --- a/templates/nmakeexe.mpt +++ b/templates/nmakeexe.mpt @@ -6,7 +6,7 @@ conditional_include "windowscommon" type_description = "Console Application" type_code = 0x0103 -configurations = Release Debug "Static Release" "Static Debug" +configurations = Debug Release "Static Debug" "Static Release" platforms = Win32 default_configuration = Debug common_defines = WIN32 _CONSOLE diff --git a/templates/vc6dspdll.mpt b/templates/vc6dspdll.mpt index c4beef02..5c51dd24 100644 --- a/templates/vc6dspdll.mpt +++ b/templates/vc6dspdll.mpt @@ -7,7 +7,7 @@ conditional_include "windowscommon" type_description = "Dynamic-Link Library" type_code = 0x0102 -configurations = Release Debug +configurations = Debug Release common_defines = WIN32 _WINDOWS use_lib_modifier = 1 diff --git a/templates/vc6dspdllexe.mpt b/templates/vc6dspdllexe.mpt index fe75b1ea..87b8f7ea 100644 --- a/templates/vc6dspdllexe.mpt +++ b/templates/vc6dspdllexe.mpt @@ -7,7 +7,7 @@ conditional_include "windowscommon" type_description = "Console Application" type_code = 0x0103 -configurations = Release Debug +configurations = Debug Release common_defines = WIN32 _CONSOLE subsystem = console use_exe_modifier = diff --git a/templates/vc6dsplib.mpt b/templates/vc6dsplib.mpt index 620fc831..4a20bade 100644 --- a/templates/vc6dsplib.mpt +++ b/templates/vc6dsplib.mpt @@ -7,7 +7,7 @@ conditional_include "windowscommon" type_description = "Static Library" type_code = 0x0104 -configurations = Release Debug +configurations = Debug Release common_defines = WIN32 _WINDOWS use_lib_modifier = 1 diff --git a/templates/vc6dsplibexe.mpt b/templates/vc6dsplibexe.mpt index 76e2235c..6fd7349e 100644 --- a/templates/vc6dsplibexe.mpt +++ b/templates/vc6dsplibexe.mpt @@ -7,7 +7,7 @@ conditional_include "windowscommon" type_description = "Console Application" type_code = 0x0103 -configurations = Release Debug +configurations = Debug Release default_configuration = Debug common_defines = WIN32 _CONSOLE subsystem = console diff --git a/templates/vc7csharp.mpt b/templates/vc7csharp.mpt index 48361172..c5e46cd6 100644 --- a/templates/vc7csharp.mpt +++ b/templates/vc7csharp.mpt @@ -4,7 +4,7 @@ conditional_include "common" conditional_include "windowscommon" -configurations = Release Debug +configurations = Debug Release common_defines = TRACE Release { diff --git a/templates/vc7dll.mpt b/templates/vc7dll.mpt index 46b254e1..d877e775 100644 --- a/templates/vc7dll.mpt +++ b/templates/vc7dll.mpt @@ -4,7 +4,7 @@ conditional_include "common" conditional_include "windowscommon" -configurations = Release Debug +configurations = Debug Release common_defines = WIN32 _WINDOWS use_lib_modifier = 1 diff --git a/templates/vc7exe.mpt b/templates/vc7exe.mpt index e0fba338..cde8655f 100644 --- a/templates/vc7exe.mpt +++ b/templates/vc7exe.mpt @@ -4,7 +4,7 @@ conditional_include "common" conditional_include "windowscommon" -configurations = Release Debug +configurations = Debug Release common_defines = WIN32 _CONSOLE configuration_type = 1 subsystem = 1 diff --git a/templates/vc7lib.mpt b/templates/vc7lib.mpt index f9e968f3..d3062d81 100644 --- a/templates/vc7lib.mpt +++ b/templates/vc7lib.mpt @@ -4,7 +4,7 @@ conditional_include "common" conditional_include "windowscommon" -configurations = Release Debug +configurations = Debug Release common_defines = WIN32 _WINDOWS configuration_type = 4 use_lib_modifier = 1 diff --git a/templates/vc7libexe.mpt b/templates/vc7libexe.mpt index bdebe360..8dddc9e8 100644 --- a/templates/vc7libexe.mpt +++ b/templates/vc7libexe.mpt @@ -4,7 +4,7 @@ conditional_include "common" conditional_include "windowscommon" -configurations = Release Debug +configurations = Debug Release common_defines = WIN32 _CONSOLE configuration_type = 1 subsystem = 1 diff --git a/templates/vc7vb.mpt b/templates/vc7vb.mpt index 4377ac47..43ad6358 100644 --- a/templates/vc7vb.mpt +++ b/templates/vc7vb.mpt @@ -4,7 +4,7 @@ conditional_include "common" conditional_include "windowscommon" -configurations = Release Debug +configurations = Debug Release common_defines = Release { diff --git a/templates/vc8dll.mpt b/templates/vc8dll.mpt index 1ec9a17d..79e400f2 100644 --- a/templates/vc8dll.mpt +++ b/templates/vc8dll.mpt @@ -4,7 +4,7 @@ conditional_include "common" conditional_include "windowscommon" -configurations = Release Debug +configurations = Debug Release common_defines = WIN32 _WINDOWS _CRT_SECURE_NO_DEPRECATE ConfigurationType = 2 use_lib_modifier = 1 diff --git a/templates/vc8exe.mpt b/templates/vc8exe.mpt index 795bf0e9..2a208403 100644 --- a/templates/vc8exe.mpt +++ b/templates/vc8exe.mpt @@ -4,7 +4,7 @@ conditional_include "common" conditional_include "windowscommon" -configurations = Release Debug +configurations = Debug Release common_defines = WIN32 _CONSOLE _CRT_SECURE_NO_DEPRECATE ConfigurationType = 1 SubSystem = 1 diff --git a/templates/vc8lib.mpt b/templates/vc8lib.mpt index 25340446..14f922d2 100644 --- a/templates/vc8lib.mpt +++ b/templates/vc8lib.mpt @@ -4,7 +4,7 @@ conditional_include "common" conditional_include "windowscommon" -configurations = Release Debug +configurations = Debug Release common_defines = WIN32 _WINDOWS _CRT_SECURE_NO_DEPRECATE ConfigurationType = 4 use_lib_modifier = 1 diff --git a/templates/vc8libexe.mpt b/templates/vc8libexe.mpt index 3d491fdd..4c26b43c 100644 --- a/templates/vc8libexe.mpt +++ b/templates/vc8libexe.mpt @@ -4,7 +4,7 @@ conditional_include "common" conditional_include "windowscommon" -configurations = Release Debug +configurations = Debug Release common_defines = WIN32 _CONSOLE _CRT_SECURE_NO_DEPRECATE ConfigurationType = 1 SubSystem = 1 |