Merge pull request #2306 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / examples / Notify / MC / TkMonitor / external_idl.pl
blob651ebdc977b2c714c82fae753d7c9f0740527bfa
1 eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
2 & eval 'exec perl -w -S $0 $argv:q'
3 if 0;
5 # ******************************************************************
6 # Author: Chad Elliott
7 # Date: 7/17/2007
8 # Description: A script to generate the Notify Service Monitor modules
9 # ******************************************************************
11 # ******************************************************************
12 # Pragma Section
13 # ******************************************************************
15 use strict;
16 use File::Path;
18 # ******************************************************************
19 # Main Section
20 # ******************************************************************
22 if (!defined $ENV{OPALORB_ROOT}) {
23 print STDERR "Please set the OPALORB_ROOT environment variable ",
24 "to the full path of opalORB\n";
25 exit(1);
28 my $rm;
29 my @includes;
30 for(my $i = 0; $i <= $#ARGV; $i++) {
31 if ($ARGV[$i] eq '-r') {
32 $rm = $i + 1;
33 last;
35 else {
36 push(@includes, $ARGV[$i]);
40 if ($rm) {
41 for(my $i = $rm; $i <= $#ARGV; $i++) {
42 rmtree($ARGV[$i]);
44 exit(0);
47 if (!defined $includes[0]) {
48 if (defined $ENV{NOTIFY_ROOT}) {
49 push(@includes, $ENV{NOTIFY_ROOT});
51 elsif (defined $ENV{TAO_ROOT}) {
52 push(@includes, $ENV{TAO_ROOT}, "$ENV{TAO_ROOT}/orbsvcs/orbsvcs");
56 if (!defined $includes[0]) {
57 print STDERR "Please provide the full path ",
58 "to the Notify Service IDL files\n";
59 exit(1);
62 foreach my $i ('Notify/MonitorControl/NotificationServiceMC.idl',
63 'Notify/MonitorControlExt/NotifyMonitoringExt.idl') {
64 my $root;
65 my $cmd = "$ENV{OPALORB_ROOT}/idl/idl.pl --client";
66 foreach my $include (@includes) {
67 $cmd .= " --include $include --include $include/..";
68 if (-r "$include/$i") {
69 $cmd .= " $include/$i";
72 system($cmd);