summaryrefslogtreecommitdiff
path: root/modules/IARWorkspaceCreator.pm
diff options
context:
space:
mode:
authorChad Elliott <elliottc@objectcomputing.com>2019-04-18 17:21:25 -0500
committerChad Elliott <elliottc@objectcomputing.com>2019-04-18 17:21:25 -0500
commit599f423d5e764338f89ef7c49f6a4363d0b2e700 (patch)
tree3b97ec5fa9cdd1b649105c96a63c8368c4af3cb1 /modules/IARWorkspaceCreator.pm
parent68055d4af49d965c3f16aad9283048e9ac76386a (diff)
downloadMPC-599f423d5e764338f89ef7c49f6a4363d0b2e700.tar.gz
Thu Apr 18 22:18:20 UTC 2019 Chad Elliott <elliott_c@ociweb.com>
* docs/README: * docs/USAGE: * docs/templates/iar.txt: * modules/IARProjectCreator.pm: * modules/IARWorkspaceCreator.pm: * templates/iar.mpd: * templates/iar.mpt: Added an initial, simplistic IAR workspace/project generator. There will be more changes to fully suport this IDE.
Diffstat (limited to 'modules/IARWorkspaceCreator.pm')
-rw-r--r--modules/IARWorkspaceCreator.pm70
1 files changed, 70 insertions, 0 deletions
diff --git a/modules/IARWorkspaceCreator.pm b/modules/IARWorkspaceCreator.pm
new file mode 100644
index 00000000..5f339c6b
--- /dev/null
+++ b/modules/IARWorkspaceCreator.pm
@@ -0,0 +1,70 @@
+package IARWorkspaceCreator;
+
+# ************************************************************
+# Description : The IAR Embedded Workbench IDE Workspace Creator
+# Author : Chad Elliott
+# Create Date : 4/18/2019
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use IARProjectCreator;
+use WinWorkspaceBase;
+use WorkspaceCreator;
+
+use vars qw(@ISA);
+@ISA = qw(WinWorkspaceBase WorkspaceCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+
+sub compare_output {
+ #my $self = shift;
+ return 1;
+}
+
+
+sub workspace_file_extension {
+ #my $self = shift;
+ return '.eww';
+}
+
+
+sub pre_workspace {
+ my($self, $fh) = @_;
+ my $crlf = $self->crlf();
+
+ print $fh "<?xml version=\"1.0\" encoding=\"UTF-8\"?>$crlf",
+ "<workspace>$crlf";
+}
+
+
+sub write_comps {
+ my($self, $fh) = @_;
+ my $crlf = $self->crlf();
+
+ print $fh ' <!-- ', $self->get_workspace_name(), ' - ',
+ $self->create_command_line_string($0, @ARGV),
+ ' -->', $crlf;
+ foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) {
+ print $fh " <project>$crlf",
+ " <path>\$WS_DIR\$\\", $self->slash_to_backslash($project),
+ "</path>$crlf",
+ " </project>$crlf";
+ }
+}
+
+
+sub post_workspace {
+ my($self, $fh) = @_;
+ print $fh '</workspace>' . $self->crlf();
+}
+
+
+1;