Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added -d option to util/install and also made the -m option optional.…

… fixed compatibility issue on Solaris with lua-cjson: there is no isinf on Solaris 11.
  • Loading branch information...
commit 3aedf4d8e55935537bf5b2040a12a80a86730ec9 1 parent 32ef993
@agentzh agentzh authored
Showing with 15 additions and 12 deletions.
  1. +1 −1  util/configure
  2. +14 −11 util/install
View
2  util/configure
@@ -553,7 +553,7 @@ _EOC_
"LUA_LIB_DIR=$lualib_prefix";
if ($on_solaris) {
- $extra_opts .= " INSTALL=$root_dir/build/install";
+ $extra_opts .= " INSTALL=$root_dir/build/install CFLAGS=\"-g -O3 -Wall -pedantic -D'isinf(x)=0'\"";
}
if ($platform eq 'macosx') {
View
25 util/install
@@ -6,16 +6,15 @@ use warnings;
use Getopt::Std qw(getopts);
my %opts;
-getopts("m:", \%opts) or usage();
+getopts("dm:", \%opts) or usage();
my $mode = $opts{m};
-if (!defined $mode) {
- die "No -m option specified.\n";
+if ($opts{d}) {
+ shell("mkdir -p @ARGV");
+ exit;
}
-my $mod = $opts{m};
-
if (@ARGV < 2) {
usage();
}
@@ -46,8 +45,10 @@ if (!-d $target_dir) {
shell("cp @src $dst");
if (-f $dst) {
- chmod oct($mode), $dst or
- die "failed to change mode of $dst to $mode.\n";
+ if (defined $mode) {
+ chmod oct($mode), $dst or
+ die "failed to change mode of $dst to $mode.\n";
+ }
exit;
}
@@ -62,13 +63,15 @@ for my $src (@src) {
$name = $src;
}
- my $target = "$target_dir/$name";
- chmod oct($mode), $target or
- die "failed to change mode of $target to $mode.\n";
+ if (defined $mode) {
+ my $target = "$target_dir/$name";
+ chmod oct($mode), $target or
+ die "failed to change mode of $target to $mode.\n";
+ }
}
sub usage {
- die "Usage: install -m <attrs> <src>... <dst>\n";
+ die "Usage: install [-d] [-m <attrs>] <src>... <dst>\n";
}
sub shell {
Please sign in to comment.
Something went wrong with that request. Please try again.