blob: 3b01864bda2ceec49480e23349498d33ad30f174 (
plain)
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
|
#
# This script is intended to be run in the top directory
# with: tclsh84 buildperl.tcl
#
#
# Create a perl build directory and copy the relevant
# files in it.
#
set wd [pwd]
set files {t Zinc.xs Zinc.pm Makefile.PL demos README Zinc}
set buildDir buildperl
puts "Creating temporary build structure for Tkzinc perl variant"
if { [file exists $buildDir] } {
file delete -force $buildDir
}
file mkdir $buildDir
foreach f $files {
file copy -force Perl/$f $buildDir
}
foreach f [glob -nocomplain libtess/*.c libtess/*.h generic/*.c generic/*.h win/*.c debian/changelog debian/copyright] {
file copy -force $f $buildDir
}
puts "Compiling the perl variant"
set make make
if { [lindex $tcl_platform(os) 0] eq "Windows" } {
set make nmake
}
cd buildperl
catch {exec perl Makefile.PL} result
puts $result
catch {exec $make} result
puts $result
cd $wd
|