summaryrefslogtreecommitdiff
path: root/ACE/bin/DependencyGenerator/GNUIDLObjectGenerator.pm
blob: c3167d7694b160ddfaf46c9a8c24ffd2186ab43a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package GNUIDLObjectGenerator;

# ************************************************************
# Description   : Generates object files for GNU IDL Makefiles.
# Author        : Chip Jones
# Create Date   : 11/01/2011
# ************************************************************

# ************************************************************
# Pragmas
# ************************************************************

use strict;
use File::Spec;
use ObjectGenerator;

use vars qw(@ISA);
@ISA = qw(ObjectGenerator);

# ************************************************************
# Constants
# ************************************************************
my $prefix = '$(IDL_GEN_FILES_DIR)/';
my @suffixes = qw/
    $(IDL_CLIENT_HDR_EXT)
    $(IDL_CLIENT_INL_EXT)
    $(IDL_CLIENT_SRC_EXT)
    $(IDL_SERVER_HDR_EXT)
    $(IDL_SERVER_SRC_EXT)
    $(IDL_SERVER_THDR_EXT)
    $(IDL_SERVER_TINL_EXT)
    $(IDL_SERVER_TSRC_EXT)
    /;

# ************************************************************
# Subroutine Section
# ************************************************************

sub process {
  my($noext) = $_[1];
  $noext =~ s/\.[^\.]+$//o;
  $noext =~ s/.+\/// if $noext =~ /\.\.\//;
  my($vol, $dir, $file) = File::Spec->splitpath($noext);
  my @list = map "$prefix$file$_", @suffixes;
  return \@list;
}

1;