File: build-module.sh

package info (click to toggle)
libsyntax-highlight-engine-simple-languages-perl 1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 188 kB
  • ctags: 12
  • sloc: perl: 403; sh: 46; makefile: 14
file content (31 lines) | stat: -rw-r--r-- 767 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

PERL=$(which perl)
MAKE=$(which make)
PERL5LIB="$DESTDIR/usr/share/perl5/"
PERL="$PERL -I$PERL5LIB"

if [ -d $1 ]; 
then
    echo "=========================================================================="
    echo "Make $1"
    echo "PERL5LIB = $PERL5LIB"
    echo "DESTDIR = $DESTDIR"
    echo "=========================================================================="
else
    echo "directory $1 does not exist"
    exit 1
fi
cd $1
if [ -r Build.PL ];
then
    $PERL Build.PL installdirs=vendor
    $PERL Build
    $PERL Build test
    $PERL Build install destdir=$DESTDIR
else
    PERL5LIB=$PERL5LIB $PERL Makefile.PL INSTALLDIRS=vendor --skipdeps
    PERL5LIB=$PERL5LIB $MAKE
    PERL5LIB=$PERL5LIB $MAKE test
    $MAKE install DESTDIR=$DESTDIR
fi