summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ.T. Conklin <johntconklin@users.noreply.github.com>2004-08-19 06:13:50 +0000
committerJ.T. Conklin <johntconklin@users.noreply.github.com>2004-08-19 06:13:50 +0000
commit728b08a173f10c137db2e111bbb678a0990ffb86 (patch)
treeb9637575387072fce4e1de4102d3a11dffe73e32
parent8fd179d9deaaba1f3eb6ec469c66db0e19504abd (diff)
downloadMPC-728b08a173f10c137db2e111bbb678a0990ffb86.tar.gz
ChangeLogTag: Wed Aug 18 23:08:35 2004 J.T. Conklin <jtc@acorntoolworks.com>
-rw-r--r--ChangeLog12
-rw-r--r--modules/AutomakeWorkspaceCreator.pm73
2 files changed, 82 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6023f0a7..2da1576c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,20 @@
+Wed Aug 18 23:08:35 2004 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * modules/AutomakeWorkspaceCreator.pm:
+
+ Changed to scan the generated project files for the use of
+ $(ACE_ROOT), $(TAO_ROOT), etc. and provide the appropriate
+ definition if they are found. While this behavior is ACE/TAO
+ specific, there isn't much that can be done without something
+ like a workspace template.
+
Wed Aug 18 08:56:01 2004 J.T. Conklin <jtc@acorntoolworks.com>
* templates/automake.mpd:
Changed to use am_includes, rev_avoids, and rev_requires.
- * modules/AutomakeProjectCreator:
+ * modules/AutomakeProjectCreator.pm:
Changed fill_value to understand am_includes, rev_avoids, and
rev_requires. am_includes prepends $(srcdir) to any relative
diff --git a/modules/AutomakeWorkspaceCreator.pm b/modules/AutomakeWorkspaceCreator.pm
index 63cd514f..d5507e93 100644
--- a/modules/AutomakeWorkspaceCreator.pm
+++ b/modules/AutomakeWorkspaceCreator.pm
@@ -138,8 +138,77 @@ sub write_comps {
close($mfh);
}
- ## Print out the Makefile.am. If there are local projects, insert
- ## "." as the first SUBDIR entry.
+ ## Print out the Makefile.am.
+
+ if (@locals) {
+ my($seen_ace_root) = 0;
+ my($seen_tao_root) = 0;
+ my($seen_ace_builddir) = 0;
+ my($seen_tao_builddir) = 0;
+ my($seen_tao_idl) = 0;
+
+ foreach my $local (reverse @locals) {
+ my($pfh) = new FileHandle();
+ if (!open($pfh,$local)) {
+ $self->error("Unable to open $local for reading.");
+ }
+
+ while(<$pfh>) {
+ if (/ACE_ROOT/) {
+ $seen_ace_root = 1;
+ }
+ if (/TAO_ROOT/) {
+ $seen_tao_root = 1;
+ }
+ if (/ACE_BUILDDIR/) {
+ $seen_ace_builddir = 1;
+ }
+ if (/TAO_BUILDDIR/) {
+ $seen_tao_builddir = 1;
+ }
+ if (/TAO_IDL/) {
+ $seen_tao_idl = 1;
+ }
+ }
+
+ close($pfh);
+ }
+
+ if ($seen_ace_root || $seen_ace_builddir ||
+ $seen_tao_root || $seen_tao_builddir) {
+
+ if ($seen_ace_root) {
+ if ($seen_tao_root || $seen_tao_builddir) {
+ print $fh "ACE_ROOT = \$(top_srcdir)/..", $crlf;
+ } else {
+ print $fh "ACE_ROOT = \$(top_srcdir)", $crlf;
+ }
+ }
+ if ($seen_ace_builddir) {
+ if (seen_tao_root || $seen_tao_builddir) {
+ print $fh "ACE_BUILDDIR = \$(top_builddir)/..", $crlf;
+ } else {
+ print $fh "ACE_BUILDDIR = \$(top_builddir)", $crlf;
+ }
+ }
+ if ($seen_tao_root) {
+ print $fh "TAO_ROOT = \$(top_srcdir)", $crlf;
+ }
+ if ($seen_tao_builddir) {
+ print $fh "TAO_BUILDDIR= \$(top_builddir)", $crlf;
+ }
+
+ print $fh $crlf;
+ }
+
+ if ($seen_tao_idl) {
+ print $fh "TAO_IDL = ACE_ROOT=\$(ACE_ROOT) TAO_ROOT=\$(TAO_ROOT) \$(TAO_BUILDDIR)/TAO_IDL/tao_idl", $crlf;
+ print $fh "TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I\$(TAO_ROOT) -I\$(srcdir) -g \$(ACE_BUILDDIR)/apps/gperf/src/gperf", $crlf;
+ print $fh $crlf;
+ }
+ }
+
+ ## If there are local projects, insert "." as the first SUBDIR entry.
if (@dirs) {
print $fh 'SUBDIRS =';
if (@locals) {