aboutsummaryrefslogtreecommitdiff
path: root/Makefile.pl
diff options
context:
space:
mode:
authorAndrey Ponomarenko <aponomarenko@rosalab.ru>2012-11-12 16:15:07 +0400
committerAndrey Ponomarenko <aponomarenko@rosalab.ru>2012-11-12 16:15:07 +0400
commit07aea0703ddcc68b96ff2e0ca53a742d2e9c6f9b (patch)
treee5e53b18fd1386f1bf5370ee2645ce99dcca9d42 /Makefile.pl
parent9927e33079b748463e883b96c4759f43f4d5de67 (diff)
downloadabi-compliance-checker-07aea0703ddcc68b96ff2e0ca53a742d2e9c6f9b.tar.gz
Adapted to Mac OS X 10.8 and other fixes.
Diffstat (limited to 'Makefile.pl')
-rwxr-xr-xMakefile.pl37
1 files changed, 23 insertions, 14 deletions
diff --git a/Makefile.pl b/Makefile.pl
index 392083d..e07ad6c 100755
--- a/Makefile.pl
+++ b/Makefile.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
###########################################################################
# Makefile for ABI Compliance Checker
-# Install/remove the tool for GNU/Linux and FreeBSD
+# Install/remove the tool for GNU/Linux, FreeBSD and Mac OS X
#
# Copyright (C) 2009-2010 The Linux Foundation
# Copyright (C) 2009-2011 Institute for System Programming, RAS
@@ -72,7 +72,8 @@ EXTRA OPTIONS:
supported.
\n";
-if(not @ARGV) {
+if(not @ARGV)
+{
print $HELP_MSG;
exit(0);
}
@@ -90,17 +91,19 @@ GetOptions(
sub scenario()
{
- if($Help) {
+ if($Help)
+ {
print $HELP_MSG;
exit(0);
}
- if($Config{"osname"}!~/linux|freebsd|openbsd|netbsd/)
- { # MS Windows, Mac OS X
+ if($Config{"osname"}!~/linux|freebsd|openbsd|netbsd|macos|darwin|rhapsody/)
+ {
print STDERR "The tool is ready-to-use without the need to install.\n";
- print STDERR "This Makefile is for GNU/Linux and BSD systems.\n";
+ print STDERR "This Makefile is for GNU/Linux, FreeBSD and Mac OS X.\n";
exit(1);
}
- if(not $Install and not $Update and not $Remove) {
+ if(not $Install and not $Update and not $Remove)
+ {
print STDERR "ERROR: command is not selected (-install, -update or -remove)\n";
exit(1);
}
@@ -121,27 +124,32 @@ sub scenario()
if($DESTDIR ne "/") {
$DESTDIR=~s/[\/]+\Z//g;
}
- if($DESTDIR!~/\A\//) {
+ if($DESTDIR!~/\A\//)
+ {
print STDERR "ERROR: destdir is not absolute path\n";
exit(1);
}
- if(not -d $DESTDIR) {
+ if(not -d $DESTDIR)
+ {
print STDERR "ERROR: you should create destdir directory first\n";
exit(1);
}
$PREFIX = $DESTDIR.$PREFIX;
- if(not -d $PREFIX) {
+ if(not -d $PREFIX)
+ {
print STDERR "ERROR: you should create installation directory first (destdir + prefix):\n mkdir -p $PREFIX\n";
exit(1);
}
}
else
{
- if($PREFIX!~/\A\//) {
+ if($PREFIX!~/\A\//)
+ {
print STDERR "ERROR: prefix is not absolute path\n";
exit(1);
}
- if(not -d $PREFIX) {
+ if(not -d $PREFIX)
+ {
print STDERR "ERROR: you should create prefix directory first\n";
exit(1);
}
@@ -154,7 +162,8 @@ sub scenario()
my $MODULES_PATH = "$PREFIX/share/$TOOL_SNAME";
my $REL_PATH = "../share/$TOOL_SNAME";
- if(not -w $PREFIX) {
+ if(not -w $PREFIX)
+ {
print STDERR "ERROR: you should be root\n";
exit(1);
}
@@ -220,7 +229,7 @@ sub copyDir($$)
foreach my $Path (sort keys(%Files))
{
if($Config{"osname"}!~/win/ and $Path=~/Targets\/(windows|symbian)/) {
- next;
+ next;
}
my $Inst = $Path;
$Inst=~s/\A\Q$ARCHIVE_DIR\E/$To/;