File: configure.pl

package info (click to toggle)
dns-flood-detector 1.20-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 216 kB
  • sloc: ansic: 737; perl: 102; sh: 75; makefile: 50
file content (19 lines) | stat: -rwxr-xr-x 426 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl

use strict;

my $os = shift;

# get target listings
opendir(MAKE_TARGETS,'./makefiles');
my @targets = grep { /Makefile/ && -f './makefiles/'.$_ && s/^Makefile-// } readdir(MAKE_TARGETS);
closedir(MAKE_TARGETS);

# display usage
unless ($os && grep{/$os/}@targets) {print<<EOF;exit(0)}
usage: $0 {@targets}
EOF

# link appropriate target
symlink './makefiles/Makefile-'.$os, 'Makefile';
print "type make.\n";