1#!/usr/local/bin/perl -w
2# -*- perl -*-
3
4#
5# $Id: Makefile.PL,v 1.4 2004/12/12 20:32:55 eserte Exp $
6# Author: Slaven Rezic
7#
8# Copyright (C) 2001 Slaven Rezic. All rights reserved.
9# This program is free software; you can redistribute it and/or
10# modify it under the same terms as Perl itself.
11#
12# Mail: slaven@rezic.de
13# WWW:  http://bbbike.sourceforge.net
14#
15
16use Inline::MakeMaker;
17
18use Config;
19use Cwd;
20
21my $thisdir = getcwd();
22chdir("../..");
23my $root = getcwd();
24chdir($thisdir);
25
26my $inlinedistpm = "CNetFileDist.pm";
27my $inlinepm     = "CNetFile.pm";
28
29if (! -e $inlinedistpm) {
30    open(FH, ">> $inlinedistpm") or die $!;
31    close FH;
32    utime 0,0, $inlinedistpm;
33}
34
35WriteInlineMakefile
36  (
37   'NAME'	   => 'StrassenNetz::CNetFile',
38   'VERSION_FROM'  => 'CNetFile.pm',
39   'AUTHOR'        => 'Slaven Rezic (slaven@rezic.de)',
40  );
41
42sub MY::install {
43    my $rule = "";
44    if ($] >= 5.006) {
45	$rule .= <<EOF;
46install:	all
47	@\$(MOD_INSTALL) \\
48		\$(INST_LIB) $root/lib \\
49		\$(INST_ARCHLIB) $root/lib/$Config{'version'}/$Config{'archname'} \\
50
51EOF
52    } else {
53	$rule .= <<EOF;
54install:	all
55	@\$(MOD_INSTALL) \\
56		\$(INST_LIB) $root/lib \\
57		\$(INST_ARCHLIB) $root/lib/$Config{'archname'} \\
58
59EOF
60    }
61
62    $rule .= <<EOF;
63$inlinedistpm:	$inlinepm
64	\$(PERL) ../inline2dist.pl \$(NAME)
65
66EOF
67
68    $rule;
69}
70
71__END__
72