scstadmin: Fix SCST/SCST.pm path

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6736 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-12-11 20:03:09 +00:00
parent 957b51a997
commit d25d044b3f
2 changed files with 20 additions and 3 deletions

View File

@@ -13,14 +13,16 @@ install install_vendor: all
$(MAKE) -C scst-$(MODULE_VERSION) $@ DESTDIR=$(DESTDIR)
install -d $(DESTDIR)$(SBINDIR)
install -m 755 $(TOOL) $(DESTDIR)$(SBINDIR)
regex="s|%INSTALLSITELIB%|$$(make -sC scst-$(MODULE_VERSION) print-INSTALLSITELIB | grep -v ^make)|"; echo "$${regex}"; sed -i "$${regex}" $(DESTDIR)$(SBINDIR)/$(TOOL)
uninstall:
-rm -f $(DESTDIR)$(SBINDIR)/$(TOOL)
$(MAKE) -C scst-$(MODULE_VERSION) uninstall
perl-module:
@cd ./scst-$(MODULE_VERSION); \
perl Makefile.PL PREFIX=$(PREFIX);
@cd ./scst-$(MODULE_VERSION) && \
perl Makefile.PL PREFIX=$(PREFIX) && \
printf '\nprint-%%:\n\t@echo '"'"'$$($$*)'"'"'\n' >> Makefile
$(MAKE) -C scst-$(MODULE_VERSION)
test:

View File

@@ -242,12 +242,27 @@ Examples:
EndUsage
}
use strict;
use Cwd qw(abs_path);
use File::Basename;
use File::Spec;
use Test;
BEGIN {
my $site_lib = '%INSTALLSITELIB%';
if ($site_lib =~ '^%') {
my $scstadmindir = dirname(abs_path($0));
$site_lib = File::Spec->catdir($scstadmindir, "scst-0.9.10",
"blib", "lib");
}
unshift(@INC, $site_lib);
}
use SCST::SCST 0.9.10;
use Getopt::Long;
use IO::File;
use IO::Dir;
use POSIX;
use strict;
my $_DEF_CONFIG_ = '/etc/scst.conf';