~ubuntu-branches/ubuntu/hardy/net-snmp/hardy-updates

« back to all changes in this revision

Viewing changes to perl/default_store/gen

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-12-08 14:59:50 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20071208145950-u1tykhpw56nyzqik
Tags: 5.4.1~dfsg-4ubuntu1
* Merge from debian unstable.
* Remaining Ubuntu changes:
  - Remove stop links from rc0 and rc6
  - Munge Maintainer field as per spec.
* Ubuntu changes dropped:
  - Symlink common files between the packages, CDBS ought to handle that
    for us automatically.
* The latest Debian changes has dropped history from the changelog. Slot in
  the Ubuntu changes as best I can. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
system("grep 'define NETSNMP_DS_' ../../include/net-snmp/library/default_store.h > default_store.h");
4
4
#gcc -E ../../include/net-snmp/library/default_store.h | grep -v default_store.h >> default_store.h
5
 
system("h2xs -n NetSNMP::default_store -O default_store.h");
 
5
system("h2xs -b 5.5.0 -n NetSNMP::default_store -O default_store.h");
6
6
 
7
7
open(ORIG,"default_store.xs");
8
 
open(NEW,"NetSNMP/default_store/default_store.xs");
 
8
open(NEW1,"NetSNMP-default_store/fallback/const-c.inc");
 
9
open(NEW2,"NetSNMP-default_store/fallback/const-xs.inc");
9
10
open(OUT,">default_store_new.xs");
10
11
 
11
12
# get up to the include from the original file
14
15
    last if (/include <net-snmp\/library\/default_store.h/);
15
16
}
16
17
 
17
 
# skip up to the include from the original file
18
 
while(<NEW>) {
19
 
    last if (/include <default_store.h>/);
20
 
}
21
 
 
22
18
# include the entire new file
23
 
print OUT <NEW>;
 
19
print OUT "\n\n/* autogenerated by \"gen\" from const-c.inc */\n\n";
 
20
print OUT <NEW1>;
 
21
print OUT "\n\n/* autogenerated by \"gen\" from const-xs.inc */\n\n";
 
22
print OUT "MODULE = NetSNMP::default_store         PACKAGE = NetSNMP::default_store\n\n";
 
23
 
 
24
print OUT <NEW2>;
 
25
 
 
26
#print OUT "\n\n/* autogenerated by \"gen\" from tail of old .xs file */\n\n";
 
27
print OUT "\n\n\n";
24
28
 
25
29
# skip past the constant portion of the old file
26
30
while (<ORIG>) {
122
126
#
123
127
# remove the temp files.
124
128
#
125
 
system("rm -rf NetSNMP");
 
129
system("rm -rf NetSNMP-default_store");
126
130
unlink("default_store.h");
127
131