-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.pl
executable file
·52 lines (41 loc) · 1.28 KB
/
build.pl
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/perl -w
#
# Example build class. Copy this file to the equivalent place in your
# plugin or contrib and edit.
#
# Read the comments at the top of lib/TWiki/Contrib/Build.pm for
# details of how the build process works, and what files you
# have to provide and where.
#
# Requires the environment variable TWIKI_LIBS (a colon-separated path
# list) to be set to point at the build system and any required dependencies.
# Usage: ./build.pl [-n] [-v] [target]
# where [target] is the optional build target (build, test,
# install, release, uninstall), test is the default.
# Two command-line options are supported:
# -n Don't actually do anything, just print commands
# -v Be verbose
#
# Standard preamble
BEGIN {
unshift @INC, split( /:/, $ENV{TWIKI_LIBS} );
}
use TWiki::Contrib::Build;
# Declare our build package
package BuildBuild;
use base qw( TWiki::Contrib::Build );
sub new {
my $class = shift;
return bless( $class->SUPER::new( "ImgTag", "Build" ), $class );
}
# Example: Override the build target
sub target_build {
my $this = shift;
$this->SUPER::target_build();
# Do other build stuff here
}
package main;
# Create the build object
$build = new BuildBuild();
# Build the target on the command line, or the default target
$build->build($build->{target});