blob: 1ee1de47c97502cc800c4f44add7a67769aa791c (
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
|
#!/usr/bin/perl
# The yhttpd Project (2003)
#
# This script sets up some variables in src/glob.h
use strict;
use scripts::modules::file;
my $file = 'src/glob.h';
my $gmake = `which gmake`;
my @glob = fopen($file);
chomp($gmake);
print "-> Setting values in $file\n";
my $modified = 0;
foreach (@glob)
{
if (/^(#define GMAKE) "(.*)"/)
{
if ($2 ne "$gmake \\0")
{
s/^$1 "$2"/#define GMAKE "$gmake \\0"/;
print " -> Set $gmake\n";
fwrite($file,@glob);
last;
}
}
}
|