blob: a4f0f72b2b787c73965ac74683c0c3fce44acf09 (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#
# Generate .h file from .in file
# Define or undefine features for the WIN32 platform
#
use cauto;
&main;
exit(0);
sub main {
local ($src, $dst);
if (-f "$ARGV[0]" && $ARGV[0] =~ /(.*)\.in$/) {
$src = $ARGV[0];
$dst = $1;
if ($ARGV[1] =~ /(.*)\.h$/) {
$dst = $ARGV[1];
}
&cauto::configure_cauto($src, $dst);
}
else {
if (-f "./cauto.h.in") {
$src = "./cauto.h.in";
$dst = "./cauto.h";
&cauto::configure_cauto($src, $dst);
}
elsif (-f "./c-auto.in") {
$src = "./c-auto.in";
$dst = "./c-auto.h";
&cauto::configure_cauto($src, $dst);
}
if (-f "./config.h.in") {
$src = "./config.h.in";
$dst = "./config.h";
&cauto::configure_cauto($src, $dst);
}
elsif (-f "./config.hin") {
$src = "./config.hin";
$dst = "./config.h";
&cauto::configure_cauto($src, $dst);
}
elsif (-f "./config.in") {
$src = "./config.in";
$dst = "./config.h";
&cauto::configure_cauto($src, $dst);
}
else {
print STDERR "No file to configure found!\n";
}
}
}
|