summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2002-06-26 17:17:19 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2002-06-26 17:17:19 +0000
commitd3489222eb33ddae076e450b996d63016228fa0c (patch)
treeedfbda2eaf9120d615e7dc105d4ffd163b87c7a5
parentba3dab277c3bb0820c73485ae7e94848c944db81 (diff)
downloadATCD-d3489222eb33ddae076e450b996d63016228fa0c.tar.gz
Splitting the exe project into dynamic and static projects
-rw-r--r--bin/MakeProjectCreator/modules/BorlandProjectCreator.pm2
-rw-r--r--bin/MakeProjectCreator/modules/Driver.pm10
-rw-r--r--bin/MakeProjectCreator/modules/GHSProjectCreator.pm2
-rw-r--r--bin/MakeProjectCreator/modules/GNUProjectCreator.pm2
-rw-r--r--bin/MakeProjectCreator/modules/NMakeProjectCreator.pm2
-rw-r--r--bin/MakeProjectCreator/modules/ProjectCreator.pm54
-rw-r--r--bin/MakeProjectCreator/modules/VC6ProjectCreator.pm30
-rw-r--r--bin/MakeProjectCreator/modules/VC7ProjectCreator.pm2
-rw-r--r--bin/MakeProjectCreator/templates/vc6dspdllexe.mpt28
-rw-r--r--bin/MakeProjectCreator/templates/vc6dspexe.mpt50
-rw-r--r--bin/MakeProjectCreator/templates/vc6dsplibexe.mpt32
11 files changed, 135 insertions, 79 deletions
diff --git a/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm b/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm
index 5f6e4c55121..4732e2d075b 100644
--- a/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm
@@ -42,7 +42,7 @@ sub project_file_name {
}
-sub get_exe_template_input_file {
+sub get_dll_exe_template_input_file {
my($self) = shift;
return "borexe";
}
diff --git a/bin/MakeProjectCreator/modules/Driver.pm b/bin/MakeProjectCreator/modules/Driver.pm
index 9244ea22ecd..70a6888d07f 100644
--- a/bin/MakeProjectCreator/modules/Driver.pm
+++ b/bin/MakeProjectCreator/modules/Driver.pm
@@ -42,7 +42,7 @@ sub usageAndExit {
print STDERR "$base v$self->{'version'}\n" .
"Usage: $base [-global <file>] [-include <directory>]\n" .
(" " x (length($base) + 8)) . "[-template <file>] " .
- "[-ti <dll | exe | lib>:<file>]\n" .
+ "[-ti <dll | lib | dll_exe | lib_exe>:<file>]\n" .
(" " x (length($base) + 8)) . "[-type <";
my($t) = $self->{'types'};
my(@keys) = sort keys %$t;
@@ -62,7 +62,7 @@ sub usageAndExit {
" option can be used multiple times to add directories.\n" .
" -ti Specifies the template input file (with no extension)\n" .
" for the specific type as shown above\n" .
-" (ex. -ti exe:vc8exe)\n" .
+" (ex. -ti dll_exe:vc8exe)\n" .
" -type Specifies the type of project file to generate. This\n" .
" option can be used multiple times to generate multiple\n" .
" types.\n";
@@ -75,8 +75,8 @@ sub completion_command {
my($self) = shift;
my($str) = "complete $self->{'name'} " .
"'c/-/(global include type template ti)/' " .
- "'c/dll:/f/' 'c/exe:/f/' 'c/lib:/f/' " .
- "'n/-ti/(dll exe lib)/:' 'n/-type/(";
+ "'c/dll:/f/' 'c/dll_exe:/f/' 'c/lib_exe:/f/' 'c/lib:/f/' " .
+ "'n/-ti/(dll lib dll_exe lib_exe)/:' 'n/-type/(";
my($t) = $self->{'types'};
my(@keys) = sort keys %$t;
for(my $i = 0; $i <= $#keys; $i++) {
@@ -165,7 +165,7 @@ sub run {
$self->usageAndExit("-ti requires a template input argument");
}
else {
- if ($tmpi =~ /(dll|exe|lib):(.*)/) {
+ if ($tmpi =~ /(dll|lib|dll_exe|lib_exe):(.*)/) {
my($key) = $1;
my($name) = $2;
$ti{$key} = $name;
diff --git a/bin/MakeProjectCreator/modules/GHSProjectCreator.pm b/bin/MakeProjectCreator/modules/GHSProjectCreator.pm
index cfe795e56c5..6c92b13d6b2 100644
--- a/bin/MakeProjectCreator/modules/GHSProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/GHSProjectCreator.pm
@@ -27,7 +27,7 @@ sub project_file_name {
}
-sub get_exe_template_input_file {
+sub get_dll_exe_template_input_file {
my($self) = shift;
return "ghsexe";
}
diff --git a/bin/MakeProjectCreator/modules/GNUProjectCreator.pm b/bin/MakeProjectCreator/modules/GNUProjectCreator.pm
index c0a4ca2bdd0..ee28c86920a 100644
--- a/bin/MakeProjectCreator/modules/GNUProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/GNUProjectCreator.pm
@@ -134,7 +134,7 @@ sub project_file_name {
}
-sub get_exe_template_input_file {
+sub get_dll_exe_template_input_file {
my($self) = shift;
return "gnuexe";
}
diff --git a/bin/MakeProjectCreator/modules/NMakeProjectCreator.pm b/bin/MakeProjectCreator/modules/NMakeProjectCreator.pm
index b51fedc9bc8..f784182571a 100644
--- a/bin/MakeProjectCreator/modules/NMakeProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/NMakeProjectCreator.pm
@@ -71,7 +71,7 @@ sub project_file_name {
}
-sub get_exe_template_input_file {
+sub get_dll_exe_template_input_file {
my($self) = shift;
return "nmakeexe";
}
diff --git a/bin/MakeProjectCreator/modules/ProjectCreator.pm b/bin/MakeProjectCreator/modules/ProjectCreator.pm
index fea315c3875..6ebacd4bbed 100644
--- a/bin/MakeProjectCreator/modules/ProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/ProjectCreator.pm
@@ -76,7 +76,8 @@ sub new {
$self->{'project_info'} = [];
$self->{'reading_global'} = 0;
$self->{'reading_parent'} = [];
- $self->{'exe_template_input'} = undef;
+ $self->{'dexe_template_input'} = undef;
+ $self->{'lexe_template_input'} = undef;
$self->{'lib_template_input'} = undef;
$self->{'dll_template_input'} = undef;
$self->{'idl_defaulted'} = 0;
@@ -423,19 +424,33 @@ sub read_template_input {
my($override) = 0;
if ($self->exe_target()) {
- $tag = 'exe_template_input';
- if (!defined $self->{$tag}) {
- if (defined $$ti{'exe'}) {
- $file = $$ti{'exe'};
- $override = 1;
+ if ($self->{'writing_type'} == 1) {
+ $tag = 'lexe_template_input';
+ if (!defined $self->{$tag}) {
+ if (defined $$ti{'lib_exe'}) {
+ $file = $$ti{'lib_exe'};
+ $override = 1;
+ }
+ else {
+ $file = $self->get_lib_exe_template_input_file();
+ }
}
- else {
- $file = $self->get_exe_template_input_file();
+ }
+ else {
+ $tag = 'dexe_template_input';
+ if (!defined $self->{$tag}) {
+ if (defined $$ti{'dll_exe'}) {
+ $file = $$ti{'dll_exe'};
+ $override = 1;
+ }
+ else {
+ $file = $self->get_dll_exe_template_input_file();
+ }
}
}
}
else {
- if ($self->{'writing_type'}) {
+ if ($self->{'writing_type'} == 1) {
$tag = 'lib_template_input';
if (!defined $self->{$tag}) {
if (defined $$ti{'lib'}) {
@@ -1040,7 +1055,7 @@ sub write_project {
($status, $error) = $self->write_output_file($name);
if ($status &&
- $self->separate_static_project() && $self->lib_target()) {
+ $self->separate_static_project()) {
## Set the project name back to what it originally was
$self->process_assignment('project_name', $prjname);
$name = $self->static_project_file_name();
@@ -1110,15 +1125,20 @@ sub get_template_input {
my($self) = shift;
if ($self->lib_target()) {
- if ($self->{'writing_type'}) {
+ if ($self->{'writing_type'} == 1) {
return $self->{'lib_template_input'};
}
else {
return $self->{'dll_template_input'};
}
}
-
- return $self->{'exe_template_input'};
+
+ if ($self->{'writing_type'} == 1) {
+ return $self->{'lexe_template_input'};
+ }
+ else {
+ return $self->{'dexe_template_input'};
+ }
}
@@ -1250,7 +1270,13 @@ sub override_exclude_component_extensions {
}
-sub get_exe_template_input_file {
+sub get_dll_exe_template_input_file {
+ my($self) = shift;
+ return undef;
+}
+
+
+sub get_lib_exe_template_input_file {
my($self) = shift;
return undef;
}
diff --git a/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm b/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm
index 28fb282ba85..13ff1bea5f5 100644
--- a/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm
@@ -33,6 +33,15 @@ sub get_type_append {
$type = " DLL";
}
}
+ else {
+ ## Set the type_append preserving whitespace
+ if ($self->get_writing_type() == 1) {
+ $type = " Static EXE";
+ }
+ else {
+ $type = " EXE";
+ }
+ }
return $type;
}
@@ -44,12 +53,17 @@ sub translate_value {
if ($key eq 'depends' && $val ne "") {
my($arr) = $self->create_array($val);
- my($app) = "";
+ my($app) = "DLL";
$val = "";
## Only write dependencies for non-static projects
- if ($self->get_writing_type() == 0) {
- $app = "DLL";
+ ## and static exe projects
+ my($wt) = $self->get_writing_type();
+ if ($wt == 0 || $self->exe_target()) {
+ if ($wt == 1) {
+ $app = "LIB";
+ }
+
foreach my $entry (@$arr) {
$val .= "\"$entry $app\" ";
}
@@ -139,9 +153,15 @@ sub override_exclude_component_extensions {
}
-sub get_exe_template_input_file {
+sub get_dll_exe_template_input_file {
+ my($self) = shift;
+ return "vc6dspdllexe";
+}
+
+
+sub get_lib_exe_template_input_file {
my($self) = shift;
- return "vc6dspexe";
+ return "vc6dsplibexe";
}
diff --git a/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm b/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm
index 939ce810bb0..c18ba892951 100644
--- a/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm
@@ -96,7 +96,7 @@ sub project_file_name {
}
-sub get_exe_template_input_file {
+sub get_dll_exe_template_input_file {
my($self) = shift;
return "vc7exe";
}
diff --git a/bin/MakeProjectCreator/templates/vc6dspdllexe.mpt b/bin/MakeProjectCreator/templates/vc6dspdllexe.mpt
new file mode 100644
index 00000000000..9f9926f0463
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/vc6dspdllexe.mpt
@@ -0,0 +1,28 @@
+type_description = "Console Application"
+type_code = 0x0103
+configurations = Release Debug
+type_is_binary = 1
+common_defines = WIN32 _CONSOLE
+subsystem = console
+pch_defines = ACE_USING_PCH
+ssl_libs = libeay32 ssleay32
+
+Release {
+ use_debug_libraries = 0
+ compile_flags = /W3 /GX /O2 /MD
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ output_dir = Release
+ intermediate_dir = Release
+ debug_switch =
+}
+
+Debug {
+ use_debug_libraries = 1
+ compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy
+ defines = _DEBUG
+ compile_flags_removed = /YX
+ intermediate_dir = Debug
+ lib_modifier = d
+}
+
diff --git a/bin/MakeProjectCreator/templates/vc6dspexe.mpt b/bin/MakeProjectCreator/templates/vc6dspexe.mpt
deleted file mode 100644
index 8785d7a896b..00000000000
--- a/bin/MakeProjectCreator/templates/vc6dspexe.mpt
+++ /dev/null
@@ -1,50 +0,0 @@
-type_description = "Console Application"
-type_code = 0x0103
-configurations = Release Debug "Static Release" "Static Debug"
-type_is_binary = 1
-common_defines = WIN32 _CONSOLE
-subsystem = console
-pch_defines = ACE_USING_PCH
-ssl_libs = libeay32 ssleay32
-
-Release {
- use_debug_libraries = 0
- compile_flags = /W3 /GX /O2 /MD
- defines = NDEBUG
- compile_flags_removed = /YX
- output_dir = Release
- intermediate_dir = Release
- debug_switch =
-}
-
-Debug {
- use_debug_libraries = 1
- compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy
- defines = _DEBUG
- compile_flags_removed = /YX
- intermediate_dir = Debug
- lib_modifier = d
-}
-
-Static Release {
- use_debug_libraries = 0
- compile_flags = /W3 /GX /O2 /MD
- defines = NDEBUG
- compile_flags_removed = /YX
- lib_modifier = s
- need_libflags = 1
- output_dir = Static_Release
- intermediate_dir = Static_Release
- debug_switch =
-}
-
-Static Debug {
- use_debug_libraries = 1
- compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy
- defines = _DEBUG
- compile_flags_removed = /YX
- lib_modifier = sd
- need_libflags = 1
- output_dir = Static_Debug
- intermediate_dir = Static_Debug
-}
diff --git a/bin/MakeProjectCreator/templates/vc6dsplibexe.mpt b/bin/MakeProjectCreator/templates/vc6dsplibexe.mpt
new file mode 100644
index 00000000000..977f4441004
--- /dev/null
+++ b/bin/MakeProjectCreator/templates/vc6dsplibexe.mpt
@@ -0,0 +1,32 @@
+type_description = "Console Application"
+type_code = 0x0103
+configurations = "Static Release" "Static Debug"
+default_configuration = "Static Debug"
+type_is_binary = 1
+common_defines = WIN32 _CONSOLE
+subsystem = console
+pch_defines = ACE_USING_PCH
+ssl_libs = libeay32 ssleay32
+
+Static Release {
+ use_debug_libraries = 0
+ compile_flags = /W3 /GX /O2 /MD
+ defines = NDEBUG
+ compile_flags_removed = /YX
+ lib_modifier = s
+ need_libflags = 1
+ output_dir = Static_Release
+ intermediate_dir = Static_Release
+ debug_switch =
+}
+
+Static Debug {
+ use_debug_libraries = 1
+ compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy
+ defines = _DEBUG
+ compile_flags_removed = /YX
+ lib_modifier = sd
+ need_libflags = 1
+ output_dir = Static_Debug
+ intermediate_dir = Static_Debug
+}