summaryrefslogtreecommitdiff
path: root/bin/DependencyGenerator/GNUDependencyWriter.pm
blob: a0f526befb96430e75025c4906139e8d368a7d45 (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
package GNUDependencyWriter;

# ************************************************************
# Description   : Generates GNU Makefile dependencies.
# Author        : Chad Elliott
# Create Date   : 2/10/2002
# ************************************************************

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

use strict;
use DependencyWriter;

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

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

sub process {
  my($objects) = $_[1];
  my($files)   = $_[2];

  ## Sort the dependencies to make them reproducible
  return '$(sort '. join(' ', @{$objects}). "): \\\n  "
    . join(" \\\n  ", sort @$files) . "\n";
}


1;