File: GNUIDLObjectGenerator.pm

package info (click to toggle)
ace 8.0.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 46,932 kB
  • sloc: cpp: 341,621; perl: 31,868; sh: 1,963; python: 529; yacc: 511; xml: 330; lex: 158; lisp: 116; makefile: 85; csh: 20; ansic: 19; tcl: 5
file content (48 lines) | stat: -rw-r--r-- 1,312 bytes parent folder | download | duplicates (3)
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;