~ubuntu-branches/ubuntu/gutsy/net-snmp/gutsy-security

« back to all changes in this revision

Viewing changes to perl/make-perl-makefiles

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2004-09-13 12:06:21 UTC
  • Revision ID: james.westby@ubuntu.com-20040913120621-g952ntonlleihcvm
Tags: upstream-5.1.1
ImportĀ upstreamĀ versionĀ 5.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
open(I, "Makefile.subs.pl");
 
4
@stuff = <I>;
 
5
 
 
6
foreach my $i (@ARGV) {
 
7
    print "updating $i\n";
 
8
    open(I, $i);
 
9
    open(O,">$i.new");
 
10
    while(<I>) {
 
11
        # start replacement here
 
12
        last if /common subroutines -- DO NOT EDIT/;
 
13
        print O;
 
14
    }
 
15
    print O "# common subroutines -- DO NOT EDIT.\n";
 
16
    print O "# They are imported from the Makefile.subs.pl file\n";
 
17
    print O @stuff;
 
18
    rename($i,"$i.bak");
 
19
    rename("$i.new", "$i");
 
20
    close(I);
 
21
    close(O);
 
22
}