2011-01-12 10:48:18 -06:00
|
|
|
#!@PERL@ -w # -*- Mode: perl; tab-width: 4; indent-tabs-mode: nil; -*-
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
2003-01-20 08:00:18 -06:00
|
|
|
# Program: set_soenv.in
|
2002-08-27 05:31:48 -05:00
|
|
|
# Author: Willem van Dorp, Ross Nicholson, Oisin Boydell - Sun Microsystems, Ireland.
|
|
|
|
#
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
# Description:
|
2010-10-14 02:53:40 -05:00
|
|
|
# set_soenv generates a file that contains all necessary
|
2003-03-19 09:03:25 -06:00
|
|
|
# environment variables for the build proces of OpenOffice
|
2011-05-06 16:25:55 -05:00
|
|
|
# on Linux, NetBSD, Solaris, Windows, Mac OS X and iOS.
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# Program steps.
|
|
|
|
#
|
|
|
|
# I. Checking the command-line arguments.
|
|
|
|
# IIa. Declaring variables for the system commands, etc.
|
|
|
|
# IIb. Declaring the environment variables.
|
|
|
|
# III. Initialising the variables for the system commands, etc.
|
|
|
|
# IV. Print out some important messages etc.
|
|
|
|
# V. Initialising the environment variables.
|
|
|
|
# VI. Open the output file.
|
|
|
|
# VII. Writing the data to the output file.
|
|
|
|
# VIII. Closing output file.
|
|
|
|
# IX. Sourcing the output file.
|
|
|
|
# X. Set up the build environment.
|
|
|
|
# XI. Moving the output file to the build home directory.
|
|
|
|
#
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
use strict; # pragma
|
|
|
|
use File::Basename;
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
#--------------------------------------------------------
|
|
|
|
# IIa. Declaring variables for the system commands, etc.
|
|
|
|
#--------------------------------------------------------
|
|
|
|
#
|
2010-11-02 03:38:48 -05:00
|
|
|
my ( $outfile, $bootfile, $newline, $comment,
|
2010-11-02 03:40:48 -05:00
|
|
|
$compiler, $ds, $ps,
|
|
|
|
$wps, $cur_dir, $par_dir, $I, $L, $tmp, $MINGW,
|
2008-03-05 09:37:05 -06:00
|
|
|
$USE_MINGW, $platform,
|
2011-02-08 21:21:48 -06:00
|
|
|
$cygwinver, $empty, $no_ant, $no_gcc_include,
|
2010-11-02 03:38:48 -05:00
|
|
|
$no_gxx_include, $warnfile, $Warning, $result, $unsetvars, $exportvars, $win_format_var, $perl_os, @mingw_lib_include_paths, $mingw_lib_include_path);
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#-------------------------------------------------
|
|
|
|
# IIb. Declaring environment values (constants).
|
|
|
|
#-------------------------------------------------
|
|
|
|
#
|
|
|
|
# Platform independent constant values.
|
2011-05-14 14:29:20 -05:00
|
|
|
my ( $CALL_CDECL, $COMMON_OUTDIR,
|
2010-10-14 02:53:40 -05:00
|
|
|
$common_build, $NO_REC_RES, $SO3, $SOLAR_JAVA,
|
2011-05-14 14:43:13 -05:00
|
|
|
$SOLAR_PLUGIN, $UPDATER, $VCL,
|
2008-01-28 06:38:24 -06:00
|
|
|
$CC, $CXX,
|
2011-05-14 14:38:27 -05:00
|
|
|
$ENABLEUNICODE, $NO_BSYMBOLIC);
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# Platform dependent constant values.
|
2011-05-14 14:55:09 -05:00
|
|
|
my ( $COM, $ARCH, $CPU, $CPUNAME, $GLIBC, $GUI, $GUIBASE,
|
2008-01-28 06:38:24 -06:00
|
|
|
$GVER, $OS, $OSVERSION, $OUTPATH, $INPATH, $PATH_SEPERATOR,
|
2011-05-14 15:14:05 -05:00
|
|
|
$DYNAMIC_CRT, $use_shl_versions, $JRELIBDIR,
|
2009-02-19 05:42:47 -06:00
|
|
|
$JRETOOLKITDIR, $JRETHREADDIR,
|
2007-12-12 08:37:11 -06:00
|
|
|
$FLIPCMD );
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#-------------------------------------------
|
|
|
|
# IIc. Declaring the environment variables.
|
|
|
|
#-------------------------------------------
|
|
|
|
#
|
|
|
|
# Help variables.
|
2010-09-17 06:21:21 -05:00
|
|
|
my ( $USR, $ETC, $BIN, $LIB, $LIB64, $INC, $INCLUDE, $DEV, $OPT, $LOCAL, $SOLENV, $SOLVER, $CONFIG, $DEFIMGS,
|
2002-08-27 05:31:48 -05:00
|
|
|
$USR_BIN, $USR_LIB, $USR_LOCAL, $USR_CCS, $JAVA_BIN, $JAVA_LIB, $JAVA_INCLUDE,
|
2010-01-12 11:49:59 -06:00
|
|
|
$SOLARENVINC, $USR_DT, $USR_OPENWIN, $XLIB, $XINC,
|
2011-04-28 15:45:20 -05:00
|
|
|
$CYGWIN_PATH, $language, @languages, $ASM_PATH, $NSIS_PATH, $PERL_PATH, $CL_X64 );
|
2002-08-27 05:31:48 -05:00
|
|
|
|
|
|
|
# Environment variables.
|
2010-01-12 11:49:59 -06:00
|
|
|
my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $JDK, $JAVAFLAGS, $OOO_SHELL,
|
2011-04-28 15:45:20 -05:00
|
|
|
$L10N_MODULE, $WITH_POOR_HELP_LOCALIZATIONS,
|
2011-03-17 10:06:07 -05:00
|
|
|
$UPD, $WORK_STAMP, $gb_REPOS, $BUILD_TYPE,
|
2011-03-08 19:43:29 -06:00
|
|
|
$SOLARSRC, $DEVROOT, $SOLARVER, $SOLARVERSION, $WORKDIR, $OUTDIR, $SOLARENV, $SOLARDEFIMG,
|
2008-01-28 06:38:24 -06:00
|
|
|
$DMAKEROOT, $CLASSPATH, $XCLASSPATH, $COMPATH,
|
2011-04-15 06:59:52 -05:00
|
|
|
$MSPDB_PATH, $MIDL_PATH, $CSC_PATH, $SHOWINCLUDES_PREFIX,
|
2011-03-31 06:48:56 -05:00
|
|
|
$PATH, $SOLAREXTRAINC, $SOLAREXTRALIB, $SOLARLIB, $JAVALIB,
|
2011-05-14 16:37:04 -05:00
|
|
|
$SOLARINC, $FRAMEWORKSHOME, $COMEX, $PERL,
|
2011-05-16 07:52:26 -05:00
|
|
|
$COMP_ENV, $ILIB, $JAVAHOME, $WINDOWS_SDK_HOME, $DIRECTXSDK_LIB, $DOTNET_FRAMEWORK_HOME,
|
2010-10-21 07:22:09 -05:00
|
|
|
$USE_DIRECTX5, $ATL_LIB, $ATL_INCLUDE, $MFC_LIB, $MFC_INCLUDE, $TMPDIR,
|
2007-11-12 01:36:01 -06:00
|
|
|
$COMMON_BUILD_TOOLS, $WIN_GREP, $WIN_FIND, $WIN_LS,
|
2011-02-08 21:21:48 -06:00
|
|
|
$WIN_GNUCOPY, $WIN_TOUCH, $MOZILLA_VERSION, $MOZILLA_TOOLKIT, $PREBUILD_MOZAB, $MOZILLABUILD,
|
2011-05-23 02:24:04 -05:00
|
|
|
$PROEXT, $TARFILE_LOCATION, $GNUMAKE,
|
2010-11-05 18:30:03 -05:00
|
|
|
$PYTHON, $SYSTEM_PYTHON, $SYSTEM_MOZILLA, $EPM_FLAGS);
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#-------------------------------------------
|
|
|
|
# IId. Declaring the aliases.
|
|
|
|
#-------------------------------------------
|
|
|
|
#
|
2007-05-09 07:27:09 -05:00
|
|
|
my ( $dmake, $build, $build_client, $nmake, $mkout, $deliver, $zipdep );
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
|
|
|
|
#-------------------------------------------------------------
|
|
|
|
# IIIa. Initialising constants.
|
|
|
|
#-------------------------------------------------------------
|
|
|
|
#
|
2008-03-05 09:37:05 -06:00
|
|
|
# $platform is needed for PathFormat()
|
2007-12-12 08:37:11 -06:00
|
|
|
#
|
2011-05-13 12:36:31 -05:00
|
|
|
$platform = '@host@';
|
2007-12-12 08:37:11 -06:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
$UPD = '@UPD@'; # the project's UPD
|
|
|
|
$newline = "\n"; # Perl newline character
|
|
|
|
$ds = "/"; # directory separator
|
|
|
|
$ps = ":"; # path separator
|
2007-12-12 08:37:11 -06:00
|
|
|
$wps = ":"; # path separator, will be set to ';' for windows later.
|
2002-08-27 05:31:48 -05:00
|
|
|
$cur_dir = "."; # current directory
|
|
|
|
$par_dir = ".."; # parrent directory
|
|
|
|
$I = " -I"; # include search path
|
|
|
|
$L = " -L"; # library search path
|
|
|
|
$empty = ""; # used as argument
|
|
|
|
$warnfile = "warn"; # logfile configure warnings.
|
|
|
|
$Warning = ""; # container for warning messages
|
2004-09-08 09:24:19 -05:00
|
|
|
$SYSTEM_PYTHON = '@SYSTEM_PYTHON@';
|
2010-11-05 18:30:03 -05:00
|
|
|
if ($SYSTEM_PYTHON eq "NO") {
|
|
|
|
$PYTHON = "python";
|
|
|
|
}
|
2005-03-30 04:38:22 -06:00
|
|
|
$SYSTEM_MOZILLA = '@SYSTEM_MOZILLA@';
|
2005-01-25 09:55:07 -06:00
|
|
|
$JDK = '@JDK@';
|
2008-08-19 06:03:39 -05:00
|
|
|
$JAVAFLAGS = '@JAVAFLAGS@';
|
2010-12-20 07:37:58 -06:00
|
|
|
$MINGW = '@WITH_MINGW@'; # use MinGW for Windows build
|
2007-03-27 04:20:09 -05:00
|
|
|
$USE_MINGW = '@USE_MINGW@'; # use MinGW in cygwin or pure-mingw
|
2011-04-06 04:19:15 -05:00
|
|
|
$CC = '@CC@'; # C compiler
|
|
|
|
$CXX = '@CXX@'; # C++ compiler
|
2005-03-01 10:17:28 -06:00
|
|
|
$MOZILLA_VERSION = '@MOZILLA_VERSION@'; # mozilla version to use to build mozilla
|
|
|
|
$MOZILLA_TOOLKIT = '@MOZILLA_TOOLKIT@'; # GUI toolkit to use to build mozilla
|
2007-12-12 08:37:11 -06:00
|
|
|
$FLIPCMD = ""; # Flip '/' to '\' wrapper (only for winnt)
|
2004-09-08 09:24:19 -05:00
|
|
|
$GLIBC = ""; # Whether the platform uses glibc
|
|
|
|
$PROEXT = "@PROEXT@";
|
2007-11-02 09:23:26 -05:00
|
|
|
$EPM_FLAGS = "";
|
2010-11-05 15:07:56 -05:00
|
|
|
$CL_X64 = '@CL_X64@';
|
2011-05-23 02:24:04 -05:00
|
|
|
$GNUMAKE = "@GNUMAKE@";
|
2002-08-27 05:31:48 -05:00
|
|
|
|
|
|
|
#
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# IV. Initialise the warning container and print a note to the user.
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Add the configure (pre-requisite) warnings to the warning container
|
|
|
|
# , $Warning.
|
|
|
|
AddWarning( "configure", "" );
|
|
|
|
#
|
2010-10-14 02:53:40 -05:00
|
|
|
print ("Setting up the environment for building LibreOffice $newline");
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#--------------------------------------------------
|
|
|
|
# V. Setting the environment variables/values.
|
|
|
|
#--------------------------------------------------
|
|
|
|
#
|
|
|
|
# A. Checking the platform first.
|
|
|
|
#
|
|
|
|
# get perls idea for OS
|
|
|
|
# needed to differentiate cygwin/native perl on windows
|
|
|
|
$perl_os = $^O;
|
|
|
|
|
|
|
|
#
|
|
|
|
# B. Gathering information from the system.
|
|
|
|
#
|
|
|
|
# 1. Path
|
|
|
|
$oldPATH = $ENV{"PATH"};
|
|
|
|
chomp( $oldPATH ); # cut off new line
|
|
|
|
#
|
|
|
|
# C. Setting the constant values.
|
|
|
|
#
|
|
|
|
# Setting platform independent constant values.
|
2010-10-14 02:53:40 -05:00
|
|
|
# NB: Language options now set at 'ToFile' stage.
|
2002-08-27 05:31:48 -05:00
|
|
|
$CALL_CDECL = "TRUE";
|
|
|
|
$COMMON_OUTDIR = "";
|
|
|
|
$common_build = "";
|
|
|
|
$NO_REC_RES = "TRUE";
|
|
|
|
$SO3 = "TRUE";
|
2003-08-18 08:54:11 -05:00
|
|
|
$SOLAR_JAVA = "@SOLAR_JAVA@";
|
2002-08-27 05:31:48 -05:00
|
|
|
$SOLAR_PLUGIN = "TRUE";
|
|
|
|
$UPDATER = "YES";
|
|
|
|
$VCL = "TRUE";
|
|
|
|
$ENABLEUNICODE = "TRUE";
|
|
|
|
$NO_BSYMBOLIC = "TRUE";
|
2003-06-12 04:16:12 -05:00
|
|
|
$comment = "#"; # UNIX script comment character
|
2010-01-15 07:55:12 -06:00
|
|
|
$TARFILE_LOCATION = "@TARFILE_LOCATION@"; # where to find tarballs with external sources
|
2002-10-22 07:24:17 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
# Setting platform dependent constant values.
|
2010-10-14 02:53:40 -05:00
|
|
|
if ( $platform =~ m/solaris/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ print "Setting Solaris specific values... ";
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/^i[3456]86/)
|
2010-10-14 02:53:40 -05:00
|
|
|
{
|
2005-01-18 07:55:37 -06:00
|
|
|
if ( $CC =~ "gcc") {
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "SolarisX86GccEnv.Set.sh";
|
2005-01-18 07:55:37 -06:00
|
|
|
$OUTPATH = "unxsogi";
|
|
|
|
} else {
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "SolarisX86Env.Set.sh";
|
2005-01-18 07:55:37 -06:00
|
|
|
$OUTPATH = "unxsoli4";
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
$CPU = "I";
|
|
|
|
$CPUNAME = "INTEL";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
2011-03-28 05:34:17 -05:00
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."xawt";
|
2002-08-27 05:31:48 -05:00
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
|
|
|
|
|
2003-08-18 08:54:11 -05:00
|
|
|
}
|
|
|
|
else
|
2005-01-18 07:55:37 -06:00
|
|
|
{
|
|
|
|
if ( $CC =~ "gcc") {
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "SolarisSparcGccEnv.Set.sh";
|
2005-01-18 07:55:37 -06:00
|
|
|
$OUTPATH = "unxsogs";
|
|
|
|
} else {
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "SolarisSparcEnv.Set.sh";
|
2005-01-18 07:55:37 -06:00
|
|
|
$OUTPATH = "unxsols4";
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
$CPU = "S";
|
|
|
|
$CPUNAME = "SPARC";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc";
|
2011-03-28 05:34:17 -05:00
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc".$ds."xawt";
|
2002-08-27 05:31:48 -05:00
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc".$ds."native_threads";
|
2003-08-18 08:54:11 -05:00
|
|
|
}
|
2005-01-18 07:55:37 -06:00
|
|
|
|
2011-04-08 06:15:23 -05:00
|
|
|
$COM = "GCC";
|
2010-10-14 02:53:40 -05:00
|
|
|
$COMPATH = '@COMPATH@';
|
2003-08-18 08:54:11 -05:00
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
$OS = "SOLARIS";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2010-10-14 02:53:40 -05:00
|
|
|
elsif ( $platform =~ m/netbsd/ )
|
2004-02-25 06:50:35 -06:00
|
|
|
{
|
2010-10-14 02:53:40 -05:00
|
|
|
#Set platform specific values:
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/^i[3456]86/)
|
2007-01-03 04:33:57 -06:00
|
|
|
{ print "Setting NetBSD x86 specific values... ";
|
2004-02-25 06:50:35 -06:00
|
|
|
$CPU = "I";
|
|
|
|
$CPUNAME = "INTEL";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
|
|
|
|
}
|
2010-12-07 03:40:42 -06:00
|
|
|
elsif ($platform =~ m/^x86_64/)
|
|
|
|
{ print "Setting NetBSD x86-64 specific values... ";
|
|
|
|
$CPU = "X";
|
|
|
|
$CPUNAME = "X86_64";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."native_threads";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/^sparc/)
|
2004-02-25 06:50:35 -06:00
|
|
|
{ print "Setting NetBSD Sparc specific values... ";
|
|
|
|
$CPU = "S";
|
|
|
|
$CPUNAME = "SPARC";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc".$ds."native_threads";
|
|
|
|
}
|
2005-07-14 07:45:49 -05:00
|
|
|
elsif ($platform =~ m/powerpc/)
|
2004-02-25 06:50:35 -06:00
|
|
|
{ print "Setting NetBSD PPC specific values... ";
|
|
|
|
$CPU = "P";
|
|
|
|
$CPUNAME = "POWERPC";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."classic";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."native_threads";
|
|
|
|
}
|
|
|
|
else
|
2005-03-07 10:28:47 -06:00
|
|
|
{ print "Unsupported NetBSD architecture: $platform \n";
|
2004-02-25 06:50:35 -06:00
|
|
|
exit 1;
|
|
|
|
}
|
|
|
|
# General NetBSD settings:
|
|
|
|
$COM = "GCC";
|
2010-10-14 02:53:40 -05:00
|
|
|
$COMPATH = '@COMPATH@';
|
2004-02-25 06:50:35 -06:00
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$OS = "NETBSD";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
2011-05-22 03:04:20 -05:00
|
|
|
$OUTPATH = "unxnbsd";
|
2011-05-22 03:29:41 -05:00
|
|
|
$outfile = "NetBSDEnv.Set.sh";
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
2004-02-25 06:50:35 -06:00
|
|
|
}
|
2010-10-14 02:53:40 -05:00
|
|
|
elsif ( $platform =~ m/kfreebsd/ )
|
2010-04-16 04:53:57 -05:00
|
|
|
{
|
|
|
|
# General GNU/kFreeBSD settings:
|
|
|
|
$COM = "GCC";
|
2010-10-14 02:53:40 -05:00
|
|
|
$COMPATH = '@COMPATH@';
|
2010-04-16 04:53:57 -05:00
|
|
|
$GLIBC = "2REDHAT60";
|
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$OS = "LINUX";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
|
|
|
|
2010-10-14 02:53:40 -05:00
|
|
|
#Set platform specific values:
|
2010-04-16 04:53:57 -05:00
|
|
|
if ($platform =~ m/^i[3456]86/)
|
|
|
|
{ print "Setting GNU/kFreeBSD x86 specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "GNUkFreeBSDX86Env.Set.sh";
|
2010-04-16 04:53:57 -05:00
|
|
|
$CPU = "I";
|
|
|
|
$CPUNAME = "INTEL";
|
|
|
|
$OUTPATH = "unxkfgi6";
|
2010-10-14 02:53:40 -05:00
|
|
|
|
2010-04-16 04:53:57 -05:00
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
|
|
|
|
|
|
|
|
}
|
|
|
|
elsif ($platform =~ m/^x86_64/)
|
|
|
|
{ print "Setting GNU/kFreeBSD x86-64 specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "GNUkFreeBSDX86-64Env.Set.sh";
|
2010-04-16 04:53:57 -05:00
|
|
|
$CPU = "X";
|
|
|
|
$CPUNAME = "X86_64";
|
|
|
|
$OUTPATH = "unxkfgx6";
|
|
|
|
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."server";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."native_threads";
|
|
|
|
}
|
|
|
|
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
}
|
2010-10-14 02:53:40 -05:00
|
|
|
elsif ( $platform =~ m/freebsd/ )
|
2011-05-14 14:55:09 -05:00
|
|
|
{ $COM = "GCC";
|
2010-10-14 02:53:40 -05:00
|
|
|
$COMPATH = '@COMPATH@';
|
2002-08-27 05:31:48 -05:00
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$OS = "FREEBSD";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
|
|
|
$OSVERSION = '@OSVERSION@';
|
2006-07-19 03:36:28 -05:00
|
|
|
if ($platform =~ m/^amd64/)
|
|
|
|
{ my ( $JAVA_OS );
|
|
|
|
print "Setting FreeBSD AMD64 specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "FreeBSDAMDEnv.Set.sh";
|
2006-07-19 03:36:28 -05:00
|
|
|
$CPU = "X";
|
|
|
|
$CPUNAME = "X86_64";
|
|
|
|
$OUTPATH = "unxfbsdx";
|
|
|
|
$JAVA_OS = '@JAVA_HOME@';
|
|
|
|
$JAVA_OS =~ s/.*\///;
|
|
|
|
if ($JAVA_OS =~ m/^linux/)
|
|
|
|
{ $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."server";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."native_threads";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
elsif ($platform =~ m/^i386/)
|
2007-01-03 04:33:57 -06:00
|
|
|
{ print "Setting FreeBSD x86 specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "FreeBSDX86Env.Set.sh";
|
2006-07-19 03:36:28 -05:00
|
|
|
$CPU = "I";
|
|
|
|
$CPUNAME = "INTEL";
|
|
|
|
$OUTPATH = "unxfbsdi";
|
2002-08-27 05:31:48 -05:00
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
|
2003-06-12 04:16:12 -05:00
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
|
2006-07-19 03:36:28 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{ print "Unsupported FreeBSD architecture: $platform \n";
|
|
|
|
exit 1;
|
|
|
|
}
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
2010-10-14 02:53:40 -05:00
|
|
|
}
|
2010-11-03 18:43:13 -05:00
|
|
|
elsif ( $platform =~ m/openbsd/ )
|
2011-05-14 14:55:09 -05:00
|
|
|
{ $COM = "GCC";
|
2010-11-03 18:43:13 -05:00
|
|
|
$COMPATH = '@COMPATH@';
|
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$OS = "OPENBSD";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
|
|
|
$OSVERSION = '@OSVERSION@';
|
|
|
|
$OUTPATH = "unxobsd";
|
|
|
|
$outfile = "OpenBSDEnv.Set.sh";
|
2011-05-19 05:26:44 -05:00
|
|
|
if ($platform =~ m/^(amd64|x86_64)/)
|
2010-11-03 18:43:13 -05:00
|
|
|
{
|
|
|
|
print "Setting OpenBSD AMD64 specific values... ";
|
|
|
|
$CPU = "X";
|
|
|
|
$CPUNAME = "X86_64";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."server";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."native_threads";
|
|
|
|
}
|
|
|
|
elsif ($platform =~ m/^i386/)
|
|
|
|
{ print "Setting OpenBSD x86 specific values... ";
|
|
|
|
$CPU = "I";
|
|
|
|
$CPUNAME = "INTEL";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ print "Unsupported OpenBSD architecture: $platform \n";
|
|
|
|
exit 1;
|
|
|
|
}
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
}
|
2010-10-14 02:53:40 -05:00
|
|
|
elsif ( $platform =~ m/linux/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
2005-02-24 07:44:57 -06:00
|
|
|
# General Linux settings:
|
|
|
|
$COM = "GCC";
|
2010-10-14 02:53:40 -05:00
|
|
|
$COMPATH = '@COMPATH@';
|
2005-02-24 07:44:57 -06:00
|
|
|
$GLIBC = "2REDHAT60";
|
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$OS = "LINUX";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
|
|
|
|
2010-10-14 02:53:40 -05:00
|
|
|
#Set platform specific values:
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/^i[3456]86/)
|
2007-01-03 04:33:57 -06:00
|
|
|
{ print "Setting Linux x86 specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "LinuxX86Env.Set.sh";
|
2002-08-27 05:31:48 -05:00
|
|
|
$CPU = "I";
|
|
|
|
$CPUNAME = "INTEL";
|
2010-10-14 02:53:40 -05:00
|
|
|
|
2005-08-18 02:21:30 -05:00
|
|
|
if ($JDK =~ m/^[Ii][Bb][Mm]/)
|
|
|
|
{ $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."bin";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."bin".$ds."classic";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."bin"; }
|
|
|
|
|
2005-10-25 05:24:20 -05:00
|
|
|
elsif ($JDK =~ m/^[Bb][Ee][Aa]/)
|
|
|
|
{ $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."jrockit";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads"; }
|
|
|
|
|
2010-10-14 02:53:40 -05:00
|
|
|
else {
|
2002-08-27 05:31:48 -05:00
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
2009-01-21 11:47:03 -06:00
|
|
|
# has both server and client
|
2002-08-27 05:31:48 -05:00
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
|
2005-08-18 02:21:30 -05:00
|
|
|
}
|
|
|
|
|
2009-10-01 04:16:17 -05:00
|
|
|
$OUTPATH = "unxlngi6";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/^x86_64/)
|
2004-02-04 08:08:23 -06:00
|
|
|
{ print "Setting Linux x86-64 specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "LinuxX86-64Env.Set.sh";
|
2004-02-04 08:08:23 -06:00
|
|
|
$CPU = "X";
|
|
|
|
$CPUNAME = "X86_64";
|
2005-10-05 05:37:08 -05:00
|
|
|
$OUTPATH = "unxlngx6";
|
2004-02-04 08:08:23 -06:00
|
|
|
# Blackdown.org JDK porting project uses `amd64' and `server' in JDK 1.4.2 RC1
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64";
|
2009-01-21 11:47:03 -06:00
|
|
|
# has both server and client
|
2004-02-04 08:08:23 -06:00
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."server";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."native_threads";
|
|
|
|
}
|
2008-02-27 03:03:23 -06:00
|
|
|
elsif ($platform =~ m/^ia64/)
|
|
|
|
{ print "Setting Linux ia64 specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "LinuxIA64Env.Set.sh";
|
2008-02-27 03:03:23 -06:00
|
|
|
$CPU = "A";
|
|
|
|
$CPUNAME = "IA64";
|
|
|
|
$OUTPATH = "unxlnga";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ia64";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ia64".$ds."server";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ia64".$ds."native_threads";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/^sparc/)
|
2010-10-14 02:53:40 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
{ print "Setting Linux Sparc specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "LinuxSparcEnv.Set.sh";
|
2002-08-27 05:31:48 -05:00
|
|
|
$CPU = "S";
|
|
|
|
$CPUNAME = "SPARC";
|
|
|
|
$OUTPATH = "unxlngs";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc";
|
2009-01-21 11:47:03 -06:00
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc".$ds."server";
|
2002-08-27 05:31:48 -05:00
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc".$ds."native_threads";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/^powerpc/)
|
2007-06-18 10:36:33 -05:00
|
|
|
{
|
|
|
|
if (($platform =~ m/^powerpc64/) && ('@SIZEOF_LONG@' eq '8')) {
|
|
|
|
print "Setting Linux PPC64 specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "LinuxPPC64Env.Set.sh";
|
2007-06-18 10:36:33 -05:00
|
|
|
$OUTPATH = "unxlngppc64";
|
|
|
|
$CPUNAME = "POWERPC64";
|
|
|
|
|
|
|
|
if ( $JDK eq "gcj" ) {
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc64";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc64".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc64".$ds."native_threads";
|
|
|
|
}
|
2011-03-01 08:09:00 -06:00
|
|
|
# OpenJDK
|
|
|
|
elsif ($JDK =~ m/sun/) {
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc64";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc64".$ds."server";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc64".$ds."native_threads";
|
|
|
|
}
|
2007-06-18 10:36:33 -05:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
print "Setting Linux PPC specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "LinuxPPCEnv.Set.sh";
|
2007-06-18 10:36:33 -05:00
|
|
|
$OUTPATH = "unxlngppc";
|
|
|
|
$CPUNAME = "POWERPC";
|
|
|
|
|
|
|
|
if ( $JDK eq "gcj" ) {
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."client";
|
2007-10-04 02:12:49 -05:00
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."native_threads"; }
|
|
|
|
elsif ($JDK =~ m/^[Ii][Bb][Mm]/)
|
2009-01-21 11:47:03 -06:00
|
|
|
{ $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."classic";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc";
|
2008-12-09 06:31:00 -06:00
|
|
|
}
|
2009-01-21 11:47:03 -06:00
|
|
|
# OpenJDK
|
|
|
|
elsif ($JDK =~ m/sun/) {
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc";
|
2009-03-24 10:06:55 -05:00
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."server";
|
2009-01-21 11:47:03 -06:00
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."native_threads";
|
|
|
|
}
|
2007-06-18 10:36:33 -05:00
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
$CPU = "P";
|
2007-06-18 10:36:33 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/^s390/)
|
2008-04-03 10:49:47 -05:00
|
|
|
{
|
|
|
|
if (($platform =~ m/^s390x/) && ('@SIZEOF_LONG@' eq '8')) {
|
|
|
|
print "Setting Linux zSeries specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "LinuxS390XEnv.Set.sh";
|
2008-04-03 10:49:47 -05:00
|
|
|
$CPUNAME = "S390X";
|
|
|
|
$ARCH = "s390x";
|
|
|
|
$OUTPATH = "unxlngs390x";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
print "Setting Linux S/390 specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "LinuxS390Env.Set.sh";
|
2008-04-03 10:49:47 -05:00
|
|
|
$CPUNAME = "S390";
|
|
|
|
$ARCH = "s390";
|
|
|
|
$OUTPATH = "unxlngs390";
|
|
|
|
}
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds.$ARCH;
|
2009-01-21 11:47:03 -06:00
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds.$ARCH.$ds."server";
|
2008-04-03 10:49:47 -05:00
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds.$ARCH.$ds."native_threads";
|
2003-01-20 08:00:18 -06:00
|
|
|
$CPU = "3";
|
|
|
|
}
|
2008-06-30 09:06:07 -05:00
|
|
|
elsif ($platform =~ m/^m68k/)
|
|
|
|
{ print "Setting Linux m68k specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "LinuxM68KEnv.Set.sh";
|
2008-06-30 09:06:07 -05:00
|
|
|
$CPU = "6";
|
|
|
|
$CPUNAME = "M68K";
|
|
|
|
$OUTPATH = "unxlngm68k";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."m68k";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."m68k".$ds."server";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."m68k".$ds."native_threads";
|
|
|
|
}
|
2009-11-19 09:41:16 -06:00
|
|
|
elsif ($platform =~ m/^hppa/)
|
|
|
|
{ print "Setting Linux hppa specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "LinuxHPPAEnv.Set.sh";
|
2009-11-19 09:41:16 -06:00
|
|
|
$CPU = "H";
|
|
|
|
$CPUNAME = "HPPA";
|
|
|
|
$OUTPATH = "unxlnghppa";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."hppa";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."hppa".$ds."server";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."hppa".$ds."native_threads";
|
|
|
|
$EPM_FLAGS = "-a hppa";
|
|
|
|
}
|
2010-10-14 02:53:40 -05:00
|
|
|
elsif ($platform =~ m/^alpha/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ print "Setting Linux Alpha specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "LinuxAlphaEnv.Set.sh";
|
2010-03-15 11:02:56 -05:00
|
|
|
$CPU = "L";
|
|
|
|
$CPUNAME = "AXP";
|
|
|
|
$OUTPATH = "unxlngaxp";
|
2002-08-27 05:31:48 -05:00
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha";
|
2009-01-21 11:47:03 -06:00
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha".$ds."server";
|
2002-08-27 05:31:48 -05:00
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha".$ds."native_threads";
|
|
|
|
}
|
2007-11-26 11:04:00 -06:00
|
|
|
elsif ($platform =~ m/^arm.*?l-/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ print "Setting Linux ARM specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "LinuxARMEnv.Set.sh";
|
2002-08-27 05:31:48 -05:00
|
|
|
$CPU = "R";
|
|
|
|
$CPUNAME = "ARM";
|
|
|
|
$OUTPATH = "unxlngr";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."arm";
|
2009-01-21 11:47:03 -06:00
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."arm".$ds."server";
|
2002-08-27 05:31:48 -05:00
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."arm".$ds."native_threads";
|
2007-11-26 11:04:00 -06:00
|
|
|
$EPM_FLAGS = "-a arm";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2011-05-14 19:54:06 -05:00
|
|
|
elsif ($platform =~ m/^arm.*-androideabi/)
|
|
|
|
{ print "Setting Android ARM specific values... ";
|
2011-05-15 16:51:42 -05:00
|
|
|
$GUIBASE = "android";
|
2011-05-15 09:23:00 -05:00
|
|
|
$OS = "ANDROID";
|
2011-05-14 19:54:06 -05:00
|
|
|
$outfile = "AndroidARMEnv.Set.sh";
|
|
|
|
$CPU = "R";
|
|
|
|
$CPUNAME = "ARM";
|
|
|
|
$OUTPATH = "unxandr";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."arm";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."arm".$ds."server";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."arm".$ds."native_threads";
|
|
|
|
$EPM_FLAGS = "-a arm";
|
|
|
|
}
|
2007-11-02 09:23:26 -05:00
|
|
|
elsif ($platform =~ m/^mips/)
|
|
|
|
{ print "Setting Linux MIPS specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "LinuxMIPSEnv.Set.sh";
|
2007-11-02 09:23:26 -05:00
|
|
|
$CPU = "M";
|
|
|
|
$CPUNAME = "GODSON";
|
|
|
|
$OUTPATH = "unxlngmips";
|
|
|
|
|
|
|
|
if ('@SIZEOF_LONG@' eq '8') {
|
|
|
|
if ('@WORDS_BIGENDIAN@' ne 'yes') {
|
|
|
|
$EPM_FLAGS = "-a mips64el";
|
|
|
|
if ( $JDK eq "gcj" ) {
|
|
|
|
$ARCH = "mips64el";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$ARCH = "mips64";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if ('@WORDS_BIGENDIAN@' ne 'yes') {
|
|
|
|
$EPM_FLAGS = "-a mipsel";
|
2009-03-17 08:46:42 -05:00
|
|
|
if ( $JDK =~ m/sun/ && -d "@JAVA_HOME@".$ds."jre".$ds."lib".$ds."mips32" ) {
|
|
|
|
$ARCH = "mips32"; # Lemote
|
|
|
|
} else {
|
|
|
|
$ARCH = "mipsel";
|
|
|
|
}
|
2007-11-02 09:23:26 -05:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$ARCH = "mips";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."lib".$ds.$ARCH;
|
2009-03-17 08:46:42 -05:00
|
|
|
if ( $JDK =~ m/sun/ && -d "@JAVA_HOME@".$ds."jre".$ds."lib".$ds."mips32" ) {
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."lib".$ds.$ARCH.$ds."client"; # Lemote
|
|
|
|
} else {
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."lib".$ds.$ARCH.$ds."server";
|
2010-10-14 02:53:40 -05:00
|
|
|
}
|
2007-11-02 09:23:26 -05:00
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."lib".$ds.$ARCH.$ds."native_threads";
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
|
2005-02-24 07:44:57 -06:00
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2011-05-16 10:46:27 -05:00
|
|
|
elsif ( $platform =~ m/cygwin|mingw32/ )
|
2007-12-12 08:37:11 -06:00
|
|
|
{
|
|
|
|
$MSPDB_PATH = PathFormat('@MSPDB_PATH@');
|
|
|
|
$MIDL_PATH = PathFormat('@MIDL_PATH@');
|
|
|
|
$CSC_PATH = PathFormat('@CSC_PATH@');
|
2011-04-15 06:59:52 -05:00
|
|
|
$SHOWINCLUDES_PREFIX = '@SHOWINCLUDES_PREFIX@';
|
2011-05-16 07:52:26 -05:00
|
|
|
$WINDOWS_SDK_HOME = PathFormat('@WINDOWS_SDK_HOME@');
|
2007-12-12 08:37:11 -06:00
|
|
|
$DIRECTXSDK_LIB = PathFormat('@DIRECTXSDK_LIB@');
|
2007-11-12 01:36:01 -06:00
|
|
|
$USE_DIRECTX5 = "";
|
2011-05-13 04:16:12 -05:00
|
|
|
$DOTNET_FRAMEWORK_HOME = PathFormat('@DOTNET_FRAMEWORK_HOME@');
|
2002-08-27 05:31:48 -05:00
|
|
|
$CPUNAME = "INTEL";
|
2011-01-16 12:45:18 -06:00
|
|
|
$CPUNAME = "X86_64" if $CL_X64;
|
2002-08-27 05:31:48 -05:00
|
|
|
$CPU = "I";
|
2011-01-16 12:45:18 -06:00
|
|
|
$CPU = "X" if $CL_X64;
|
2002-08-27 05:31:48 -05:00
|
|
|
$GUI = "WNT";
|
|
|
|
$GUIBASE = "WIN";
|
|
|
|
$GVER = "NT351";
|
|
|
|
$OS = "WNT";
|
|
|
|
$DYNAMIC_CRT = "TRUE";
|
|
|
|
$use_shl_versions = "TRUE";
|
2011-05-16 10:46:27 -05:00
|
|
|
$wps = ';' if '@build_os@' eq 'cygwin'; # Windows style path seperator
|
2003-06-12 04:16:12 -05:00
|
|
|
if ( $MINGW eq "yes" )
|
2011-05-16 10:46:27 -05:00
|
|
|
{ print "Setting Windows (MinGW) specific values... ";
|
|
|
|
# At the moment this implies the use of tcsh
|
|
|
|
# WTF does that mean?
|
2008-03-05 09:37:05 -06:00
|
|
|
$FLIPCMD = "slfl.pl";
|
2011-05-16 18:22:19 -05:00
|
|
|
$PATH_SEPERATOR = ';';
|
|
|
|
$PATH_SEPERATOR = ':' if '@build_os@' ne 'cygwin';
|
2011-05-14 19:33:38 -05:00
|
|
|
$outfile = "WindowsMinGWEnv.Set.sh";
|
2010-01-24 03:56:44 -06:00
|
|
|
$COMPATH = PathFormat('@COMPATH@/bin');
|
|
|
|
$COMPATH =~ s/\/bin$//i;
|
2002-08-27 05:31:48 -05:00
|
|
|
$COM = "GCC";
|
|
|
|
$OUTPATH = "wntgcci";
|
2011-05-16 10:46:27 -05:00
|
|
|
$OUTPATH = "wntgccx" if $platform =~ m/^x86_64/;
|
2002-08-27 05:31:48 -05:00
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
2011-05-16 07:52:26 -05:00
|
|
|
$ATL_INCLUDE = '$SOLARVER'.$ds.'$INPATH'.$ds."inc".$ds."external".$ds."mingw".$ds."include".$ds."atl". " ".'$WINDOWS_SDK_HOME'.$ds."include".$ds."atl";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2003-06-12 04:16:12 -05:00
|
|
|
else # The MSVC section starts here
|
2011-05-16 10:46:27 -05:00
|
|
|
{ print "Setting Windows (MSVC) specific values... ";
|
|
|
|
$outfile = "WindowsMSVCEnv.Set.sh";
|
2010-01-24 03:56:44 -06:00
|
|
|
$COMPATH = PathFormat('@COMPATH@');
|
2002-08-27 05:31:48 -05:00
|
|
|
$COM = "MSC";
|
2003-06-12 04:16:12 -05:00
|
|
|
$OUTPATH = "wntmsci@COMEX@";
|
2011-01-16 12:45:18 -06:00
|
|
|
$OUTPATH = "wntmscx@COMEX@" if $CL_X64;
|
2002-08-27 05:31:48 -05:00
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
2003-06-12 04:16:12 -05:00
|
|
|
$COMEX = '@COMEX@';
|
2011-01-16 12:45:18 -06:00
|
|
|
if ( "@DISABLE_ACTIVEX@" ) {
|
2011-05-16 07:52:26 -05:00
|
|
|
$ATL_LIB = $WINDOWS_SDK_HOME.$ds."lib"; # Doesn't exist for VSE
|
|
|
|
$ATL_INCLUDE = $WINDOWS_SDK_HOME.$ds."include".$ds."atl";
|
|
|
|
$MFC_LIB = $WINDOWS_SDK_HOME.$ds."lib"; # Doesn't exist for VSE
|
|
|
|
$MFC_INCLUDE = $WINDOWS_SDK_HOME.$ds."include".$ds."mfc";
|
2011-01-16 12:45:18 -06:00
|
|
|
} else {
|
2010-10-14 18:36:09 -05:00
|
|
|
$ATL_LIB = $COMPATH.$ds."atlmfc".$ds."lib";
|
|
|
|
$ATL_INCLUDE = $COMPATH.$ds."atlmfc".$ds."include";
|
2011-01-16 12:45:18 -06:00
|
|
|
$MFC_LIB = $COMPATH.$ds."atlmfc".$ds."lib";
|
2011-05-16 07:52:26 -05:00
|
|
|
$MFC_INCLUDE = $WINDOWS_SDK_HOME.$ds."include".$ds."mfc";
|
2011-01-16 12:45:18 -06:00
|
|
|
}
|
|
|
|
if ($CL_X64) {
|
|
|
|
$ATL_LIB .= $ds."amd64";
|
|
|
|
$MFC_LIB .= $ds."amd64";
|
2003-06-12 04:16:12 -05:00
|
|
|
}
|
2011-01-16 12:45:18 -06:00
|
|
|
# No speacial treatment for CC an CXX anymore.
|
|
|
|
$FLIPCMD = "slfl.pl";
|
|
|
|
$PATH_SEPERATOR = ';';
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
}
|
2010-10-14 02:53:40 -05:00
|
|
|
elsif ( $platform =~ m/darwin/ )
|
2011-05-14 14:55:09 -05:00
|
|
|
{ $COM = "GCC";
|
2010-10-14 02:53:40 -05:00
|
|
|
$COMPATH = '@COMPATH@';
|
2011-05-06 16:25:55 -05:00
|
|
|
if ($platform =~ m/^arm/)
|
|
|
|
{
|
|
|
|
print "Setting values for iOS... ";
|
|
|
|
$outfile = "iOSEnv.Set.sh";
|
|
|
|
$CPU = "R";
|
|
|
|
$CPUNAME = "ARM";
|
|
|
|
$OUTPATH = "unxiosr";
|
|
|
|
$GUI = "UNX";
|
|
|
|
$OS = "IOS";
|
|
|
|
$GUIBASE = "cocoatouch";
|
|
|
|
}
|
|
|
|
elsif ($platform =~ m/^powerpc/)
|
2006-02-03 10:36:16 -06:00
|
|
|
{
|
|
|
|
print "Setting values for Mac OS X/Darwin on PowerPC... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "MacOSXPPCEnv.Set.sh";
|
2006-02-03 10:36:16 -06:00
|
|
|
$CPU = "P";
|
|
|
|
$CPUNAME = "POWERPC";
|
|
|
|
$OUTPATH = "unxmacxp";
|
2011-05-06 16:25:55 -05:00
|
|
|
$OS = "MACOSX";
|
|
|
|
$GUI = "UNX";
|
2006-02-03 10:36:16 -06:00
|
|
|
}
|
2010-10-05 13:42:06 -05:00
|
|
|
else
|
|
|
|
{
|
|
|
|
print "Setting values for Mac OS X/Darwin on default x86... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "MacOSXX86Env.Set.sh";
|
2010-10-05 13:42:06 -05:00
|
|
|
$CPU = "I";
|
|
|
|
$CPUNAME = "INTEL";
|
|
|
|
$OUTPATH = "unxmacxi";
|
2011-05-06 16:25:55 -05:00
|
|
|
$OS = "MACOSX";
|
|
|
|
$GUI = "UNX";
|
2010-10-05 13:42:06 -05:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
$GVER = "VCL";
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
$PATH_SEPERATOR = $ps;
|
2011-05-06 16:25:55 -05:00
|
|
|
# GUIBASE is set below for Mac OS X; may be "aqua" or "unx".
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2011-02-10 03:38:31 -06:00
|
|
|
elsif ( $platform =~ m/dragonfly/ )
|
|
|
|
{
|
|
|
|
if ($platform =~ m/^i386/)
|
|
|
|
{ print "Setting DragonFly i386 specific values... ";
|
|
|
|
$CPU = "I";
|
|
|
|
$CPUNAME = "INTEL";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
|
|
|
|
}
|
|
|
|
elsif ($platform =~ m/^x86_64/)
|
|
|
|
{ print "Setting DragonFly x86-64 specific values... ";
|
|
|
|
$CPU = "X";
|
|
|
|
$CPUNAME = "X86_64";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64";
|
2011-02-15 06:08:10 -06:00
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."server";
|
2011-02-10 03:38:31 -06:00
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."native_threads";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ print "Unsupported DragonFly architecture: $platform \n";
|
|
|
|
exit 1;
|
|
|
|
}
|
|
|
|
# General DragonFly settings:
|
|
|
|
$COM = "GCC";
|
|
|
|
$COMPATH = '@COMPATH@';
|
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$OS = "DRAGONFLY";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
2011-04-04 14:27:10 -05:00
|
|
|
$OUTPATH = "unxdfly";
|
|
|
|
$outfile = "DragonFlyEnv.Set.sh";
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
2011-02-10 03:38:31 -06:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ( $platform =~ m/aix/ )
|
2003-08-18 08:54:11 -05:00
|
|
|
{
|
2005-03-07 10:28:47 -06:00
|
|
|
print "Setting AIX PPC specific values... ";
|
2010-11-02 03:38:48 -05:00
|
|
|
$outfile = "aixPPCEnv.Set.sh";
|
2003-08-18 08:54:11 -05:00
|
|
|
$CPU = "P";
|
|
|
|
$CPUNAME = "POWERPC";
|
2010-10-13 09:08:50 -05:00
|
|
|
$OUTPATH = "unxaigppc";
|
2003-08-18 08:54:11 -05:00
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."classic";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."native_threads";
|
|
|
|
$COM = "GCC";
|
2010-10-14 02:53:40 -05:00
|
|
|
$COMPATH = '@COMPATH@';
|
2003-08-18 08:54:11 -05:00
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
$OS = "AIX";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
|
|
|
}
|
2003-06-12 04:16:12 -05:00
|
|
|
else {
|
2011-05-16 10:46:27 -05:00
|
|
|
print "\nset_soenv: Cannot recognize the platform you are building for: $platform.\n";
|
2003-06-12 04:16:12 -05:00
|
|
|
exit 1;
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
print "done\n";
|
|
|
|
|
|
|
|
#
|
|
|
|
# D. Gathering directory information from the user.
|
|
|
|
#
|
2005-03-08 09:35:34 -06:00
|
|
|
# If the directory does not exist something is strange.
|
2010-10-14 02:53:40 -05:00
|
|
|
# 1. LibreOffice build home directory.
|
2007-12-12 08:37:11 -06:00
|
|
|
chomp($SRC_ROOT = `pwd`);
|
2002-08-27 05:31:48 -05:00
|
|
|
$SRC_ROOT =~ s/\/config_office//;
|
2007-12-12 08:37:11 -06:00
|
|
|
$SRC_ROOT = PathFormat($SRC_ROOT);
|
2002-08-27 05:31:48 -05:00
|
|
|
CheckPathExist( $SRC_ROOT );
|
|
|
|
|
2009-11-18 10:50:36 -06:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
# 2. Java home directory.
|
2003-04-28 11:02:16 -05:00
|
|
|
# JAVA_HOME as argument from autoconf.
|
2007-12-12 08:37:11 -06:00
|
|
|
$JAVA_HOME = PathFormat('@JAVA_HOME@') ;
|
2002-10-22 07:24:17 -05:00
|
|
|
|
2011-04-15 05:36:58 -05:00
|
|
|
if ( $platform =~ m/cygwin/ ) {
|
2002-08-27 05:31:48 -05:00
|
|
|
$JAVA_HOME =~ s/[\s\/]+$//; # remove trailing \n or \/ if there is any.
|
|
|
|
}
|
2010-12-10 06:10:14 -06:00
|
|
|
# 3. bash path.
|
|
|
|
$OOO_SHELL = '@BASH@';
|
2003-04-28 11:02:16 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
# ml.exe assembler path for Windows users.
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/cygwin/)
|
2007-12-12 08:37:11 -06:00
|
|
|
{ $ASM_PATH = PathFormat('@ASM_HOME@');
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-30 04:38:22 -06:00
|
|
|
|
|
|
|
# Check for prebuild mozab libraries if we don't build them # ourselves
|
|
|
|
# and we're also not using the external system mozilla installation.
|
|
|
|
#
|
|
|
|
# FIXME! This check should be done in configure and not here, but
|
|
|
|
# the $OS, $COM, $CPU variables are not yet present there.
|
|
|
|
#
|
|
|
|
if ( "@WITH_MOZILLA@" eq "YES" and "@BUILD_MOZAB@" ne "TRUE" and "@SYSTEM_MOZILLA@" ne "YES" )
|
|
|
|
{ print("\nChecking for prebuilt Mozilla libraries ...");
|
|
|
|
my $mozbinfile = $SRC_ROOT."/moz/zipped/";
|
|
|
|
if ( $^O eq 'MSWin32' ) {
|
|
|
|
chomp( $mozbinfile = qx{cygpath -d "$mozbinfile"} );
|
|
|
|
}
|
|
|
|
$mozbinfile .= $OS.$COM.$CPU;
|
|
|
|
if ( -e $mozbinfile."inc.zip"
|
|
|
|
and -e $mozbinfile."lib.zip"
|
|
|
|
and -e $mozbinfile."runtime.zip" )
|
|
|
|
{ print " found.\n";
|
2005-05-10 01:52:29 -05:00
|
|
|
$PREBUILD_MOZAB = "YES";
|
2005-03-30 04:38:22 -06:00
|
|
|
}
|
|
|
|
else
|
2005-06-20 09:18:00 -05:00
|
|
|
{ print " not found!\n\n";
|
|
|
|
print "If you don\'t use the system mozilla and also not build the needed\n";
|
2005-03-30 04:38:22 -06:00
|
|
|
print "mozilla libraries yourself you have to provide the needed files\n";
|
|
|
|
print "$OS$COM$CPU\{inc,lib,runtime\}.zip in moz/zipped/ .\n";
|
2005-06-20 09:18:00 -05:00
|
|
|
print "These files can be found here:\n";
|
|
|
|
print " <http://tools.openoffice.org/moz_prebuild/680/>.\n\n";
|
2005-03-30 04:38:22 -06:00
|
|
|
die;
|
|
|
|
}
|
|
|
|
}
|
2005-05-10 01:52:29 -05:00
|
|
|
else
|
|
|
|
{
|
|
|
|
$PREBUILD_MOZAB = "";
|
|
|
|
}
|
2005-03-30 04:38:22 -06:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# E. Determining the envionment values based on the information
|
|
|
|
# that was gathered earlier on.
|
2010-11-10 07:10:40 -06:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
$USR = $ds."usr";
|
|
|
|
$ETC = $ds."etc";
|
|
|
|
$BIN = $ds."bin";
|
|
|
|
$LIB = $ds."lib";
|
2004-02-04 08:08:23 -06:00
|
|
|
$LIB64 = $ds."lib";
|
|
|
|
$LIB64 .= "64"
|
2008-04-03 10:49:47 -05:00
|
|
|
if ($platform =~ m/x86_64-.*-linux/);
|
2010-10-14 02:53:40 -05:00
|
|
|
$LIB64 .= "64"
|
2008-04-03 10:49:47 -05:00
|
|
|
if (($platform =~ m/powerpc64-.*-linux/) && ('@SIZEOF_LONG@' eq '8'));
|
2010-10-14 02:53:40 -05:00
|
|
|
$LIB64 .= "64"
|
2008-04-03 10:49:47 -05:00
|
|
|
if (($platform =~ m/s390x-.*-linux/) && ('@SIZEOF_LONG@' eq '8'));
|
2010-11-05 15:07:56 -05:00
|
|
|
$LIB64 .= $ds."x64"
|
|
|
|
if ($platform =~ m/cygwin/);
|
2002-08-27 05:31:48 -05:00
|
|
|
$INC = $ds."inc";
|
|
|
|
$INCLUDE = $ds."include";
|
|
|
|
$DEV = $ds."dev";
|
|
|
|
$OPT = $ds."opt";
|
|
|
|
$LOCAL = $ds."local";
|
|
|
|
$SOLENV = $ds."solenv";
|
|
|
|
$SOLVER = $ds."solver";
|
2010-09-17 06:21:21 -05:00
|
|
|
$DEFIMGS = $ds."default_images";
|
2002-08-27 05:31:48 -05:00
|
|
|
$CONFIG = $ds."config";
|
|
|
|
$USR_BIN = $USR.$BIN;
|
2004-02-04 08:08:23 -06:00
|
|
|
$USR_LIB = $USR.$LIB64;
|
2002-08-27 05:31:48 -05:00
|
|
|
$USR_LOCAL = $USR.$ds."local";
|
|
|
|
$USR_CCS = $USR.$ds."ccs";
|
|
|
|
$USR_OPENWIN = $USR.$ds."openwin";
|
|
|
|
$USR_DT = $USR.$ds."dt";
|
|
|
|
$COMMON_BUILD_TOOLS = '$SRC_ROOT'.$ds."external".$ds."common";
|
|
|
|
|
|
|
|
# Windows NT only variables
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/cygwin/)
|
2010-10-14 02:53:40 -05:00
|
|
|
{
|
2011-01-26 12:49:49 -06:00
|
|
|
if ( $JAVA_HOME ne "" && $JAVA_HOME ne "NO_JAVA_HOME" )
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
|
|
|
$JAVA_LIB = $JAVA_HOME.$LIB;
|
|
|
|
}
|
|
|
|
# Import SystemDrive enviroment variable
|
|
|
|
use Env qw(SYSTEMDRIVE);
|
|
|
|
# Change $SYSTEMDRIVE to lower case.
|
|
|
|
$SYSTEMDRIVE = lc $SYSTEMDRIVE;
|
|
|
|
use Env qw(SYSTEMROOT);
|
2011-05-16 10:46:27 -05:00
|
|
|
$CYGWIN_PATH = PathFormat('/usr/bin'); # Windows bash path
|
2004-06-16 04:48:31 -05:00
|
|
|
$WIN_GREP = '$CYGWIN_PATH'.$ds."grep.exe";
|
|
|
|
$WIN_FIND = '$CYGWIN_PATH'.$ds."find.exe";
|
|
|
|
$WIN_LS = '$CYGWIN_PATH'.$ds."ls.exe";
|
|
|
|
$WIN_GNUCOPY = '$CYGWIN_PATH'.$ds."cp.exe";
|
|
|
|
$WIN_TOUCH = '$CYGWIN_PATH'.$ds."touch.exe";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
|
2011-01-26 12:49:49 -06:00
|
|
|
if ( $JAVA_HOME ne "" && $JAVA_HOME ne "NO_JAVA_HOME" )
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
|
|
|
$JAVA_BIN = $JAVA_HOME.$BIN;
|
2011-01-27 17:03:53 -06:00
|
|
|
$JAVA_INCLUDE = $JAVA_HOME.$INCLUDE;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2003-08-18 08:54:11 -05:00
|
|
|
|
|
|
|
|
2007-12-12 08:37:11 -06:00
|
|
|
$PERL = PathFormat('@PERL@'); # Perl program
|
2010-10-14 02:53:40 -05:00
|
|
|
$PERL_PATH = dirname('@PERL@'); # Perl Path
|
2007-12-12 08:37:11 -06:00
|
|
|
$XLIB = PathFormat('@XLIB@'); # X11 libraries
|
|
|
|
$XINC = PathFormat('@XINC@'); # X11 includes
|
2002-08-27 05:31:48 -05:00
|
|
|
|
|
|
|
|
2003-03-19 09:03:25 -06:00
|
|
|
# Mac OS X/Darwin only variables.
|
2011-05-06 16:25:55 -05:00
|
|
|
if ( $platform =~ m/darwin/ && $platform !~ m/^arm/)
|
2011-01-27 07:38:02 -06:00
|
|
|
{ $FRAMEWORKSHOME = $ds."Developer".$ds."SDKs".$ds."MacOSX10.4u.sdk".$ds."System".$ds."Library".$ds."Frameworks";
|
2002-08-27 05:31:48 -05:00
|
|
|
if ( $XLIB eq "no_x_libraries" ) {
|
|
|
|
$GUIBASE = "aqua";
|
|
|
|
} else {
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# The project's workstamp.
|
2003-12-17 08:01:33 -06:00
|
|
|
$WORK_STAMP = "@SOURCEVERSION@";
|
2002-08-27 05:31:48 -05:00
|
|
|
# Location of the source.
|
|
|
|
$SOLARSRC = '$SRC_ROOT';
|
2010-01-15 07:55:12 -06:00
|
|
|
|
|
|
|
# default TARFILE_LOCATION
|
|
|
|
if ('@TARFILE_LOCATION@' eq "DEFAULT")
|
2010-11-16 08:34:09 -06:00
|
|
|
{ $TARFILE_LOCATION="$SRC_ROOT/src";
|
2010-01-15 07:55:12 -06:00
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
$DEVROOT = '$SRC_ROOT';
|
2011-05-14 13:52:22 -05:00
|
|
|
$SOLARENV = PathFormat($SRC_ROOT.$SOLENV);
|
2002-08-27 05:31:48 -05:00
|
|
|
# Location of the solver tree.
|
|
|
|
if ('@LOCAL_SOLVER@' eq "DEFAULT")
|
2006-11-21 08:13:02 -06:00
|
|
|
{ $SOLARVER = $SRC_ROOT.$SOLVER.$ds.$UPD;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
else
|
2007-12-12 08:37:11 -06:00
|
|
|
{ $SOLARVER = PathFormat('@LOCAL_SOLVER@').$ds.$UPD;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
#Location of Solar version.
|
2006-11-21 08:13:02 -06:00
|
|
|
$SOLARVERSION = '$SOLARVER';
|
2002-08-27 05:31:48 -05:00
|
|
|
|
2010-11-18 10:11:41 -06:00
|
|
|
#Location of gnu make directories.
|
|
|
|
$WORKDIR = '$SOLARVER/$INPATH/workdir';
|
|
|
|
$OUTDIR = '$SOLARVER/$INPATH';
|
2010-09-17 06:21:21 -05:00
|
|
|
#Some directories that are symlinks under rawbuild, have to use realpath on Cygwin
|
|
|
|
$SOLARDEFIMG = PathFormat($SRC_ROOT.$DEFIMGS);
|
|
|
|
|
2010-11-18 10:11:41 -06:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
$SOLARENVINC = '$SOLARENV'.$INC;
|
2010-10-14 02:53:40 -05:00
|
|
|
# Location of dmake resource.
|
2002-08-27 05:31:48 -05:00
|
|
|
$DMAKEROOT = '$SOLARENVINC'.$ds."startup";
|
|
|
|
# Location of JDK classes .zip file.
|
|
|
|
# but in jdk 1.2 it is called rt.jar and it lives in jre/lib
|
2008-03-05 09:37:05 -06:00
|
|
|
$CLASSPATH = '$JAVA_HOME'.$ds.'jre'.$LIB.$ds."rt.jar".$wps.'.';
|
2002-08-27 05:31:48 -05:00
|
|
|
# Location of the JDK supported standard classes.zip file.
|
|
|
|
# see above for why the change
|
2008-03-05 09:37:05 -06:00
|
|
|
$XCLASSPATH = '$JAVA_HOME'.$ds.'jre'.$LIB.$ds."rt.jar".$wps.'.';
|
2003-08-18 08:54:11 -05:00
|
|
|
|
2011-04-26 03:27:13 -05:00
|
|
|
# Location of the translations module
|
|
|
|
$L10N_MODULE = PathFormat($SRC_ROOT."/translations");
|
|
|
|
|
2011-04-28 15:45:20 -05:00
|
|
|
# Check for poor help localizations, i.e. no help translation at all...
|
2011-05-13 15:47:21 -05:00
|
|
|
@languages=();
|
|
|
|
if (opendir(DIR,$L10N_MODULE . "/source"))
|
2011-05-31 03:45:37 -05:00
|
|
|
{
|
|
|
|
@languages = readdir(DIR);
|
|
|
|
closedir(DIR);
|
2011-05-13 15:47:21 -05:00
|
|
|
}
|
2011-04-28 15:45:20 -05:00
|
|
|
$WITH_POOR_HELP_LOCALIZATIONS = "";
|
|
|
|
|
|
|
|
foreach $language (@languages)
|
|
|
|
{
|
|
|
|
if ( ($language ne ".") && ($language ne "..") && (! -d $L10N_MODULE . "/source/" . $language . "/helpcontent2") )
|
|
|
|
{
|
|
|
|
$WITH_POOR_HELP_LOCALIZATIONS = $WITH_POOR_HELP_LOCALIZATIONS . " " . $language;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
# Location used by the linker to create libraries.
|
2010-10-14 02:53:40 -05:00
|
|
|
if ($platform =~ m/solaris/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $SOLAREXTRALIB = $L.$par_dir.$LIB.
|
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$ds."lib.solaris.2.6".
|
|
|
|
$L.$LIB.
|
|
|
|
$L.$USR.$LIB.
|
|
|
|
$L.$USR.$LOCAL.$LIB.
|
|
|
|
$L.$USR_DT.$LIB.
|
|
|
|
$L.$USR_OPENWIN.$LIB;
|
|
|
|
}
|
2011-02-20 14:46:56 -06:00
|
|
|
elsif ($platform =~ m/linux|netbsd|freebsd|aix|openbsd|dragonfly/)
|
2002-10-22 07:24:17 -05:00
|
|
|
{
|
2004-02-04 08:08:23 -06:00
|
|
|
$SOLAREXTRALIB = $L.$par_dir.$LIB64;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2011-05-06 16:25:55 -05:00
|
|
|
elsif ($platform =~ m/darwin/ && $platform !~ m/^arm/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $SOLAREXTRALIB = $L.$LIB.
|
|
|
|
$L.$USR.$LIB;
|
|
|
|
}
|
2011-05-16 10:46:27 -05:00
|
|
|
elsif ($platform !~ m/cygwin/ && $platform !~ m/mingw32/ && $platform !~ m/^arm-apple/)
|
2003-08-18 08:54:11 -05:00
|
|
|
{ AddWarning( "set_soenv", "$platform not configured for linkage create libraries" );
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
|
|
|
|
# Windows NT only variables
|
2011-04-15 05:36:58 -05:00
|
|
|
if ($platform =~ m/cygwin/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $COMP_ENV = $OUTPATH;
|
|
|
|
|
|
|
|
$JAVAHOME = '$JAVA_HOME';
|
|
|
|
|
2007-12-12 08:37:11 -06:00
|
|
|
$ILIB = $cur_dir;
|
|
|
|
|
2003-06-12 04:16:12 -05:00
|
|
|
# Mingw is different
|
|
|
|
if ( $COM eq "MSC" )
|
2011-01-27 17:03:53 -06:00
|
|
|
{ $ILIB .= $wps.$SOLARVER.$ds.$INPATH.$LIB;
|
|
|
|
if ( $JAVA_HOME ne "" && $JAVA_HOME ne "NO_JAVA_HOME" ) {
|
|
|
|
$ILIB .= $wps.$JAVA_HOME.$LIB;
|
|
|
|
}
|
2010-11-05 15:07:56 -05:00
|
|
|
if ( $CL_X64 ne "TRUE" ) {
|
|
|
|
$ILIB .= $wps.$COMPATH.$LIB.
|
2011-05-16 07:52:26 -05:00
|
|
|
$wps.$WINDOWS_SDK_HOME.$LIB;
|
2010-11-05 15:07:56 -05:00
|
|
|
} else {
|
|
|
|
$ILIB .= $wps.$COMPATH.$LIB.$ds."amd64".
|
2011-05-16 07:52:26 -05:00
|
|
|
$wps.$WINDOWS_SDK_HOME.$LIB64;
|
2010-11-05 15:07:56 -05:00
|
|
|
}
|
2011-05-13 04:16:12 -05:00
|
|
|
$ILIB .= $wps.$DOTNET_FRAMEWORK_HOME.$LIB;
|
2005-04-11 02:52:38 -05:00
|
|
|
if ( '@ENABLE_DIRECTX@' ne "" ) {
|
2007-12-12 08:37:11 -06:00
|
|
|
$ILIB .= $wps.$DIRECTXSDK_LIB;
|
2007-03-27 04:20:09 -05:00
|
|
|
}
|
2008-02-04 05:56:11 -06:00
|
|
|
# ILIB needs to use '\' directory seperators;
|
|
|
|
$ILIB = WinPath( $ILIB, ";" );
|
2007-03-27 04:20:09 -05:00
|
|
|
}
|
|
|
|
elsif ( $COM eq "GCC" )
|
2007-12-12 08:37:11 -06:00
|
|
|
{ $ILIB .= $wps.$SOLARVER.$ds.$INPATH.$LIB.
|
|
|
|
$wps.$SOLARVER.$ds.$INPATH.$BIN.
|
|
|
|
$wps.$JAVA_HOME.$LIB;
|
2007-03-27 04:20:09 -05:00
|
|
|
if ( $USE_MINGW eq "cygwin" )
|
2008-02-04 05:56:11 -06:00
|
|
|
{ $ILIB .= $wps.PathFormat($USR.$LIB.$ds."mingw").
|
2009-01-20 10:36:21 -06:00
|
|
|
$wps.PathFormat($USR.$LIB.$ds."w32api");
|
2008-02-04 05:56:11 -06:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{ $ILIB .= $wps.$COMPATH.$LIB;
|
2007-03-27 04:20:09 -05:00
|
|
|
}
|
2009-08-26 01:36:38 -05:00
|
|
|
$ILIB .= $wps.PathFormat("@MINGW_CLIB_DIR@").
|
2011-05-16 07:52:26 -05:00
|
|
|
$wps.$WINDOWS_SDK_HOME.$LIB;
|
2011-05-26 08:06:18 -05:00
|
|
|
if ( '@ENABLE_DIRECTX@' )
|
2008-02-04 05:56:11 -06:00
|
|
|
{ $ILIB .= $wps.PathFormat("@DIRECTXSDK_LIB@");
|
2004-10-11 07:48:47 -05:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
$JAVAHOME = '$JAVA_HOME';
|
|
|
|
|
|
|
|
}
|
2010-10-14 02:53:40 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
# The general environment path.
|
2011-02-20 14:46:56 -06:00
|
|
|
if ($platform =~ m/linux|netbsd|freebsd|aix|solaris|openbsd|dragonfly/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $PATH = $cur_dir.
|
2009-06-16 13:11:49 -05:00
|
|
|
# $ps.'$SOLARVER'.$ds.'$INPATH'.$BIN.
|
2002-08-27 05:31:48 -05:00
|
|
|
$ps.'$SOLARENV'.$ds.'$OUTPATH'.$BIN.
|
2002-10-22 07:24:17 -05:00
|
|
|
$ps.'$SOLARENV'.$BIN;
|
2004-02-02 11:17:15 -06:00
|
|
|
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/solaris/) {
|
2004-02-02 11:17:15 -06:00
|
|
|
$PATH .= $ps.$USR_CCS.$BIN;
|
2003-03-19 09:03:25 -06:00
|
|
|
}
|
2003-04-28 11:02:16 -05:00
|
|
|
|
2004-02-02 11:17:15 -06:00
|
|
|
$PATH .= $ps.$oldPATH;
|
2003-01-20 08:00:18 -06:00
|
|
|
|
2004-02-02 11:17:15 -06:00
|
|
|
my @javaBits;
|
2011-01-26 12:49:49 -06:00
|
|
|
if ( $JAVA_HOME ne "" && $JAVA_HOME ne "NO_JAVA_HOME" && $JDK ne "gcj" ) {
|
2004-02-02 11:17:15 -06:00
|
|
|
@javaBits = ( '$JAVA_HOME'.$BIN, 'javac' );
|
|
|
|
} else {
|
2010-10-14 02:53:40 -05:00
|
|
|
@javaBits = ();
|
2004-02-02 11:17:15 -06:00
|
|
|
}
|
2006-07-05 16:32:39 -05:00
|
|
|
$PATH = GetCorrectPath ($PATH,
|
|
|
|
$COMPATH, $CC,
|
2004-02-02 11:17:15 -06:00
|
|
|
$PERL_PATH, 'perl',
|
|
|
|
@javaBits);
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
|
2008-07-22 11:41:57 -05:00
|
|
|
elsif ($platform =~ m/cygwin/)
|
2007-12-12 08:37:11 -06:00
|
|
|
{ # The PATH variable is completely created from scratch. Elements
|
|
|
|
# from oldPATH that are not yet included are appended to PATH at
|
|
|
|
# the end.
|
2005-02-11 07:37:00 -06:00
|
|
|
|
2007-12-12 08:37:11 -06:00
|
|
|
my ( $tmppath );
|
2002-08-27 05:31:48 -05:00
|
|
|
|
|
|
|
$PATH = $cur_dir.
|
2009-06-16 13:11:49 -05:00
|
|
|
# $ps.CygFormat($SOLARVER).$ds.$INPATH.$BIN.
|
2007-12-12 08:37:11 -06:00
|
|
|
$ps.CygFormat($SOLARENV).$ds."bin".
|
|
|
|
$ps.CygFormat($SOLARENV).$ds.$OUTPATH.$BIN;
|
2002-08-27 05:31:48 -05:00
|
|
|
|
2011-01-26 12:49:49 -06:00
|
|
|
if ( $JAVA_HOME ne "" && $JAVA_HOME ne "NO_JAVA_HOME" )
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
|
|
|
# hack either "hotspot" or "client" should be used, depending on the jdk version:
|
2010-10-14 02:53:40 -05:00
|
|
|
# 1.2.x - no such directory, unsupported
|
2002-08-27 05:31:48 -05:00
|
|
|
# 1.3.x - hotspot, client missing
|
|
|
|
# 1.4.x - client, hotspot missing
|
2010-10-14 02:53:40 -05:00
|
|
|
|
2007-12-12 08:37:11 -06:00
|
|
|
$PATH .= $ps.CygFormat($JAVA_HOME).$BIN;
|
2003-06-12 04:16:12 -05:00
|
|
|
if ( -d $JAVA_HOME.$ds."jre".$ds."bin".$ds."hotspot" ) {
|
2007-12-12 08:37:11 -06:00
|
|
|
$PATH .= $ps.CygFormat($JAVA_HOME).$ds."jre".$ds."bin".$ds."hotspot";
|
2003-06-12 04:16:12 -05:00
|
|
|
}
|
|
|
|
if ( -d $JAVA_HOME.$ds."jre".$ds."bin".$ds."client" ) {
|
2007-12-12 08:37:11 -06:00
|
|
|
$PATH .= $ps.CygFormat($JAVA_HOME).$ds."jre".$ds."bin".$ds."client";
|
2003-06-12 04:16:12 -05:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-02-11 07:37:00 -06:00
|
|
|
|
|
|
|
# Add path to compiler
|
2008-06-06 11:00:36 -05:00
|
|
|
$tmppath = CygFormat($COMPATH).$BIN;
|
2011-01-16 12:45:18 -06:00
|
|
|
$tmppath .= $ds."amd64" if $CL_X64;
|
2008-06-06 11:00:36 -05:00
|
|
|
$tmppath =~ s/^\/\//\//;
|
|
|
|
$PATH .= $ps.$tmppath;
|
2007-12-12 08:37:11 -06:00
|
|
|
|
2005-02-11 07:37:00 -06:00
|
|
|
if ( $COM eq "MSC" ) {
|
2007-12-12 08:37:11 -06:00
|
|
|
$tmppath = CygFormat($MSPDB_PATH);
|
2011-01-16 12:45:18 -06:00
|
|
|
# for MSVC to find mspdb71.dll
|
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
|
|
|
|
$PATH .= $ps.$tmppath;
|
|
|
|
}
|
|
|
|
# need midl.exe
|
|
|
|
$tmppath = CygFormat($MIDL_PATH);
|
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
|
|
|
|
$PATH .= $ps.$tmppath;
|
|
|
|
}
|
|
|
|
# needs csc.exe
|
|
|
|
$tmppath = CygFormat($CSC_PATH);
|
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
|
|
|
|
$PATH .= $ps.$tmppath;
|
|
|
|
}
|
|
|
|
# Installer needs some files if the Windows Installer SDK
|
2011-05-16 07:52:26 -05:00
|
|
|
$tmppath = CygFormat($WINDOWS_SDK_HOME);
|
2011-01-16 12:45:18 -06:00
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath\/bin)(?:[:]|\Z)/i ) {
|
|
|
|
$PATH .= $ps.$tmppath.$BIN;
|
|
|
|
}
|
2007-03-27 04:20:09 -05:00
|
|
|
} else { # Mingw is different
|
|
|
|
# Native installer needs some files if the Windows Installer SDK
|
2011-05-16 07:52:26 -05:00
|
|
|
$tmppath = CygFormat($WINDOWS_SDK_HOME);
|
2007-12-12 08:37:11 -06:00
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath\/bin)(?:[:]|\Z)/i ) {
|
|
|
|
$PATH .= $ps.$tmppath.$BIN;
|
2007-03-27 04:20:09 -05:00
|
|
|
}
|
2003-07-02 08:37:32 -05:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
|
2007-03-27 04:20:09 -05:00
|
|
|
if ( $ASM_PATH ne "ASM_IN_PATH" )
|
2007-12-12 08:37:11 -06:00
|
|
|
{ $PATH .= $ps.CygFormat($ASM_PATH);
|
2010-10-14 02:53:40 -05:00
|
|
|
}
|
2005-02-11 07:37:00 -06:00
|
|
|
|
|
|
|
# Possible cygwin paths must follow behind the OOo and MS paths
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
# Check if $PERL_PATH is already set in PATH
|
2007-12-12 08:37:11 -06:00
|
|
|
$tmppath = CygFormat($PERL_PATH);
|
|
|
|
if ( ! ( $PATH =~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) )
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
2007-12-12 08:37:11 -06:00
|
|
|
$PATH .= $ps.$tmppath;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2004-06-16 04:48:31 -05:00
|
|
|
# Check if $CYGWIN_PATH is already set in PATH
|
2007-12-12 08:37:11 -06:00
|
|
|
$tmppath = CygFormat($CYGWIN_PATH);
|
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
|
|
|
|
$PATH .= $ps.$tmppath;
|
2005-02-11 07:37:00 -06:00
|
|
|
}
|
2011-05-19 14:52:01 -05:00
|
|
|
# makensis directory
|
2007-12-12 08:37:11 -06:00
|
|
|
$NSIS_PATH = PathFormat('@NSIS_PATH@');
|
|
|
|
$tmppath = CygFormat($NSIS_PATH);
|
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
|
|
|
|
$PATH .= $ps.$tmppath;
|
2007-03-27 04:20:09 -05:00
|
|
|
}
|
2007-04-19 14:42:58 -05:00
|
|
|
# path to sn.exe (signing) for Windows users.
|
2011-05-13 04:16:12 -05:00
|
|
|
my $sn_path = PathFormat('@DOTNET_FRAMEWORK_HOME@/bin');
|
2007-12-12 08:37:11 -06:00
|
|
|
$tmppath = CygFormat($sn_path);
|
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
|
|
|
|
$PATH .= $ps.$tmppath;
|
2007-04-19 14:42:58 -05:00
|
|
|
}
|
2007-03-27 04:20:09 -05:00
|
|
|
|
2005-02-11 07:37:00 -06:00
|
|
|
|
|
|
|
# Add the rest of the original path if it is still missing.
|
2008-07-22 11:41:57 -05:00
|
|
|
if (($^O eq "cygwin")) { # Not for ActiveState perl
|
2005-03-08 09:35:34 -06:00
|
|
|
my $expandedPATH = $PATH;
|
|
|
|
$expandedPATH =~ s/(\$\w+)/$1/eeg;
|
2008-09-05 08:14:29 -05:00
|
|
|
|
|
|
|
# fix situations where PATH may look like /bin:"C:\blah\bleh":/ugh
|
|
|
|
my $fixedPATH = $oldPATH;
|
|
|
|
if ( $oldPATH =~ /"/ ) {
|
|
|
|
$fixedPATH = "";
|
|
|
|
foreach my $pathentry ( split( '"',$oldPATH ) ) {
|
|
|
|
if ( ( $pathentry =~ /^$ps/ ) || ( $pathentry =~ /$ps$/ ) ) {
|
|
|
|
$fixedPATH .= $pathentry;
|
|
|
|
} else {
|
|
|
|
chomp( $pathentry = qx{cygpath -d "$pathentry"} ) ;
|
|
|
|
chomp( $pathentry = qx{cygpath -u "$pathentry"} ) ;
|
|
|
|
$fixedPATH .= $pathentry;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach my $pathentry (split($ps,$fixedPATH)) {
|
2005-03-08 09:35:34 -06:00
|
|
|
if ( ! ( $expandedPATH =~ /(?:$ps|\A)(?:$pathentry)(?:$ps|\Z)/ ) ) {
|
2005-02-11 07:37:00 -06:00
|
|
|
$PATH .= $ps.$pathentry;
|
2005-03-08 09:35:34 -06:00
|
|
|
$expandedPATH .= $ps.$pathentry;
|
2005-02-11 07:37:00 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
2007-12-12 08:37:11 -06:00
|
|
|
$PATH .= $ps.$oldPATH;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2007-12-12 08:37:11 -06:00
|
|
|
|
|
|
|
# The path now is in cygwin posix format
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2011-05-16 10:46:27 -05:00
|
|
|
elsif ($platform =~ m/mingw32/)
|
|
|
|
{
|
2011-05-19 14:52:01 -05:00
|
|
|
my ( $tmppath );
|
|
|
|
|
2011-05-16 10:46:27 -05:00
|
|
|
$PATH = $cur_dir.
|
|
|
|
# $ps.CygFormat($SOLARVER).$ds.$INPATH.$BIN.
|
|
|
|
$ps.CygFormat($SOLARENV).$ds."bin".
|
|
|
|
$ps.CygFormat($SOLARENV).$ds.$OUTPATH.$BIN;
|
2002-08-27 05:31:48 -05:00
|
|
|
|
2011-05-19 14:52:01 -05:00
|
|
|
# makensis directory
|
|
|
|
$NSIS_PATH = PathFormat('@NSIS_PATH@');
|
|
|
|
$tmppath = CygFormat($NSIS_PATH);
|
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
|
|
|
|
$PATH .= $ps.$tmppath;
|
|
|
|
}
|
|
|
|
$PATH .= $ps.$oldPATH;
|
2011-05-16 10:46:27 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/darwin/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $PATH = $cur_dir.
|
2009-06-16 13:11:49 -05:00
|
|
|
# $ps.'$SOLARVER'.$ds.'$INPATH'.$BIN.
|
2002-08-27 05:31:48 -05:00
|
|
|
$ps.'$SOLARENV'.$ds.'$OUTPATH'.$BIN.
|
2007-08-03 07:09:48 -05:00
|
|
|
$ps.'$SOLARENV'.$BIN;
|
2005-02-24 07:07:05 -06:00
|
|
|
|
|
|
|
# Append old PATH
|
|
|
|
$PATH .= $ps.$oldPATH;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2003-08-18 08:54:11 -05:00
|
|
|
else
|
|
|
|
{ AddWarning( "set_soenv", "$platform not configured for general environment paths" );
|
|
|
|
}
|
|
|
|
|
2010-10-14 02:53:40 -05:00
|
|
|
# Linker library search directory paths.
|
|
|
|
if ($platform =~ m/solaris/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $SOLARLIB = $L.$par_dir.$LIB.
|
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
|
2006-11-21 08:13:02 -06:00
|
|
|
$L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
|
2002-08-27 05:31:48 -05:00
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
|
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB."solaris.2.6".
|
|
|
|
$L.$LIB.
|
2005-01-18 07:55:37 -06:00
|
|
|
$L.$USR_LIB;
|
|
|
|
if ( $CC =~ "gcc" ) {
|
2009-11-27 08:39:46 -06:00
|
|
|
$SOLARLIB .= $L.$COMPATH.$LIB;
|
2005-01-18 07:55:37 -06:00
|
|
|
}
|
|
|
|
$SOLARLIB .= $L.$USR_LOCAL.$LIB.
|
2002-08-27 05:31:48 -05:00
|
|
|
$L.$USR_DT.$LIB.
|
|
|
|
$L.$USR_OPENWIN.$LIB.
|
2011-03-31 06:48:56 -05:00
|
|
|
$L.$XLIB;
|
|
|
|
|
|
|
|
$JAVALIB = $L.'$JAVA_HOME'.$LIB.
|
2002-08-27 05:31:48 -05:00
|
|
|
$L.$JRELIBDIR.
|
|
|
|
$L.$JRETOOLKITDIR.
|
2011-03-31 06:48:56 -05:00
|
|
|
$L.$JRETHREADDIR;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2011-02-20 14:46:56 -06:00
|
|
|
elsif ($platform =~ m/linux|netbsd|aix|freebsd|openbsd|dragonfly/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $SOLARLIB = $L.$par_dir.$LIB.
|
2003-08-18 08:54:11 -05:00
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
|
2006-11-21 08:13:02 -06:00
|
|
|
$L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
|
2010-11-03 19:08:11 -05:00
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB;
|
|
|
|
if ($platform =~ m/openbsd/) {
|
|
|
|
$SOLARLIB .= $L.$USR_LOCAL.$LIB;
|
|
|
|
}
|
2010-11-03 09:03:27 -05:00
|
|
|
if ( $XLIB ne "/usr/lib" && $XLIB ne "/usr/lib64" ) {
|
|
|
|
$SOLARLIB .= $L.$XLIB;
|
|
|
|
}
|
2011-03-31 06:48:56 -05:00
|
|
|
$JAVALIB = $L.'$JAVA_HOME'.$LIB64.
|
|
|
|
$L.$JRELIBDIR.
|
|
|
|
$L.$JRETOOLKITDIR.
|
|
|
|
$L.$JRETHREADDIR;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2011-05-22 18:20:02 -05:00
|
|
|
elsif ($platform =~ m/cygwin|mingw32/)
|
|
|
|
{ $SOLARLIB = $L.$par_dir.$LIB.
|
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
|
|
|
|
$L.'$SOLARVER'.$ds.'$INPATH'.$LIB;
|
2010-10-14 02:53:40 -05:00
|
|
|
}
|
|
|
|
elsif ($platform =~ m/darwin/)
|
2006-11-21 08:13:02 -06:00
|
|
|
{ $SOLARLIB = $L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
|
2002-08-27 05:31:48 -05:00
|
|
|
$L.$USR_LIB;
|
2003-08-18 08:54:11 -05:00
|
|
|
# [ed] 6/15/02 Add in X11 libraries onto the library path
|
2002-10-22 07:24:17 -05:00
|
|
|
if ($GUIBASE eq "unx") {
|
|
|
|
$SOLARLIB .= $L.$XLIB;
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-30 04:38:22 -06:00
|
|
|
|
|
|
|
if ($SYSTEM_MOZILLA eq "YES")
|
|
|
|
{
|
|
|
|
$SOLARLIB .= $L."@MOZ_LIB@"
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
# Location of the compiler include search directory paths.
|
|
|
|
$SOLARINC = $I.$cur_dir.
|
2006-11-21 08:13:02 -06:00
|
|
|
$I.'$SOLARVER'.$ds.'$INPATH'.$INC.$ds."stl".
|
|
|
|
$I.'$SOLARVER'.$ds.'$INPATH'.$INC.$ds."external".
|
|
|
|
$I.'$SOLARVER'.$ds.'$INPATH'.$INC.
|
2002-08-27 05:31:48 -05:00
|
|
|
$I.'$SOLARENV'.$ds.'$OUTPATH'.$INC.
|
|
|
|
$I.'$SOLARENV'.$INC.
|
|
|
|
$I.'$SRC_ROOT'.$ds."res";
|
|
|
|
|
2011-02-20 14:46:56 -06:00
|
|
|
if ($platform =~ m/solaris|linux|freebsd|netbsd|aix|openbsd|dragonfly/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
2010-06-22 10:22:35 -05:00
|
|
|
if ($platform =~ m/solaris/ && ! $CC =~ "gcc")
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
|
|
|
$SOLARINC .= '/SC5 ';
|
|
|
|
}
|
|
|
|
# Platform dependent include path at the top of this list of include paths
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/solaris/)
|
2010-10-14 02:53:40 -05:00
|
|
|
{
|
2011-01-27 17:03:53 -06:00
|
|
|
$SOLARINC .= $I.$COMPATH.$INCLUDE;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
|
2010-11-04 09:39:54 -05:00
|
|
|
$SOLARINC .= $I.'$SOLARENV'.$INC.$ds."Xp31";
|
2002-08-27 05:31:48 -05:00
|
|
|
|
2010-11-04 09:39:54 -05:00
|
|
|
# pickup system jpeg over java jpeg on OpenBSD
|
2010-11-03 18:43:13 -05:00
|
|
|
if ($platform =~ m/openbsd/)
|
2011-01-27 17:03:53 -06:00
|
|
|
{ $SOLARINC .= $I.$USR_LOCAL.$INCLUDE;
|
2010-11-03 18:43:13 -05:00
|
|
|
}
|
2011-01-27 17:03:53 -06:00
|
|
|
if ( $JAVA_HOME ne "" && $JAVA_HOME ne "NO_JAVA_HOME" )
|
|
|
|
{ $SOLARINC .= $I.'$JAVA_HOME'.$INCLUDE;
|
2010-11-04 09:39:54 -05:00
|
|
|
}
|
2010-11-03 18:43:13 -05:00
|
|
|
|
2005-01-25 09:55:07 -06:00
|
|
|
#include system dependent Java include directory
|
2011-01-27 17:03:53 -06:00
|
|
|
if (!($JDK eq "gcj") && $JAVA_HOME ne "" && $JAVA_HOME ne "NO_JAVA_HOME")
|
2005-01-25 09:55:07 -06:00
|
|
|
{
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/solaris/)
|
2005-01-25 09:55:07 -06:00
|
|
|
{ $SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."solaris";
|
|
|
|
}
|
2011-02-20 14:46:56 -06:00
|
|
|
elsif ($platform =~ m/linux/)
|
2005-01-25 09:55:07 -06:00
|
|
|
{ $SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."linux";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/freebsd/)
|
2005-01-25 09:55:07 -06:00
|
|
|
{
|
|
|
|
$SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."freebsd";
|
|
|
|
$SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."bsd";
|
2006-07-19 03:36:28 -05:00
|
|
|
$SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."linux";
|
2005-01-25 09:55:07 -06:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/netbsd/)
|
2005-01-25 09:55:07 -06:00
|
|
|
{ $SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."netbsd";
|
|
|
|
}
|
2010-10-13 09:08:50 -05:00
|
|
|
elsif ( $platform =~ m/aix/ )
|
|
|
|
{ $SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."aix";
|
|
|
|
}
|
2010-11-03 18:43:13 -05:00
|
|
|
elsif ($platform =~ m/openbsd/)
|
|
|
|
{ $SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."openbsd";
|
|
|
|
}
|
2005-01-25 09:55:07 -06:00
|
|
|
|
|
|
|
#java threads include path
|
|
|
|
|
2011-01-27 17:03:53 -06:00
|
|
|
$SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."native_threads".$INCLUDE;
|
2005-01-25 09:55:07 -06:00
|
|
|
}
|
2003-08-18 08:54:11 -05:00
|
|
|
#The tail, if needed
|
2011-02-10 03:38:31 -06:00
|
|
|
if ($platform =~ m/linux|freebsd|netbsd|aix|openbsd|dragonfly/)
|
2011-03-13 10:07:50 -05:00
|
|
|
{ if ( $XINC ne "/usr/include" ) {
|
|
|
|
$SOLARINC .= $I.$XINC;
|
|
|
|
}
|
2003-08-18 08:54:11 -05:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/cygwin/)
|
2011-02-08 21:21:48 -06:00
|
|
|
{ if ($JAVA_HOME ne "" && $JAVA_HOME ne "NO_JAVA_HOME")
|
2011-01-29 16:16:19 -06:00
|
|
|
{ $SOLARINC .= $I.'$JAVA_HOME'.$INCLUDE.$ds."win32".
|
|
|
|
$I.'$JAVA_HOME'.$INCLUDE;
|
2011-01-27 17:03:53 -06:00
|
|
|
}
|
2003-06-12 04:16:12 -05:00
|
|
|
# Mingw is different
|
|
|
|
if ( $COM eq "MSC" )
|
2011-05-16 07:52:26 -05:00
|
|
|
{ $SOLARINC .= $I.'$WINDOWS_SDK_HOME'.$INCLUDE.
|
2011-01-27 17:03:53 -06:00
|
|
|
$I.'$COMPATH'.$INCLUDE;
|
2005-04-11 02:52:38 -05:00
|
|
|
if ( '@ENABLE_DIRECTX@' ne "" ) {
|
2007-12-12 08:37:11 -06:00
|
|
|
$SOLARINC .= $I.PathFormat('@DIRECTXSDK_HOME@').$INCLUDE;
|
2004-10-11 07:48:47 -05:00
|
|
|
}
|
2003-06-12 04:16:12 -05:00
|
|
|
}
|
2007-03-27 04:20:09 -05:00
|
|
|
elsif ( $COM eq "GCC" )
|
2011-01-27 17:03:53 -06:00
|
|
|
{ $SOLARINC .= $I.'$SOLARVER'.$ds.'$INPATH'.$INC.$ds."external".$ds."mingw".$INCLUDE;
|
2007-03-27 04:20:09 -05:00
|
|
|
if ( $USE_MINGW eq "cygwin" )
|
2011-01-27 17:03:53 -06:00
|
|
|
{ $SOLARINC .= $I.PathFormat($USR.$INCLUDE.$ds."mingw").
|
|
|
|
$I.PathFormat($USR.$INCLUDE.$ds."w32api").
|
|
|
|
$I.PathFormat($USR.$INCLUDE); }
|
2008-02-04 05:56:11 -06:00
|
|
|
else
|
2011-01-27 17:03:53 -06:00
|
|
|
{ $SOLARINC .= $I.'$COMPATH'.$INCLUDE; }
|
2007-05-25 05:10:05 -05:00
|
|
|
@mingw_lib_include_paths = split( / /, "@MINGW_LIB_INCLUDE_PATH@" );
|
2009-08-26 01:36:38 -05:00
|
|
|
$SOLARINC .= $I.PathFormat("@MINGW_BACKWARD_INCLUDE_PATH@");
|
2007-05-25 05:10:05 -05:00
|
|
|
foreach $mingw_lib_include_path (@mingw_lib_include_paths)
|
|
|
|
{ chomp $mingw_lib_include_path;
|
2011-01-27 17:03:53 -06:00
|
|
|
if ( $mingw_lib_include_path ne $COMPATH.$INCLUDE && $mingw_lib_include_path ne "" )
|
2007-03-27 04:20:09 -05:00
|
|
|
{
|
2008-02-04 05:56:11 -06:00
|
|
|
$SOLARINC .= $I.PathFormat($mingw_lib_include_path);
|
2007-03-27 04:20:09 -05:00
|
|
|
}
|
|
|
|
}
|
2008-02-04 05:56:11 -06:00
|
|
|
$SOLARINC .= $I.PathFormat("@GXX_INCLUDE_PATH@").$I.PathFormat("@GXX_INCLUDE_PATH@".$ds."mingw32").
|
2011-05-16 07:52:26 -05:00
|
|
|
$I.'$WINDOWS_SDK_HOME'.$INCLUDE;
|
2007-03-27 04:20:09 -05:00
|
|
|
}
|
2011-01-27 17:03:53 -06:00
|
|
|
if ( $COM ne "MSC" && '@ENABLE_DIRECTX@' ne "" ) {
|
2007-12-12 08:37:11 -06:00
|
|
|
$SOLARINC .= $I.PathFormat('@DIRECTXSDK_HOME@').$INCLUDE;
|
2007-03-27 04:20:09 -05:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2011-05-16 10:46:27 -05:00
|
|
|
elsif ($platform =~ m/mingw32/)
|
2011-05-20 18:45:18 -05:00
|
|
|
{ if ($JAVA_HOME ne "" && $JAVA_HOME ne "NO_JAVA_HOME")
|
|
|
|
{ if ( '@build_os' eq 'cygwin' )
|
|
|
|
{ # Using MinGW from Cygwin. Use the normal Windows JDK
|
|
|
|
# headers
|
|
|
|
$SOLARINC .= $I.'$JAVA_HOME'.$INCLUDE.$ds."win32".
|
|
|
|
$I.'$JAVA_HOME'.$INCLUDE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ # Cross-compilation. Use our fake jni_md.h
|
|
|
|
# and othewise the build platform JDK headers
|
|
|
|
$SOLARINC .= $I.$SOLARENVINC.$ds."win32".
|
|
|
|
$I.'$JAVA_HOME'.$INCLUDE;
|
|
|
|
}
|
|
|
|
}
|
2011-05-16 10:46:27 -05:00
|
|
|
}
|
2011-05-06 16:25:55 -05:00
|
|
|
elsif ($platform =~ m/darwin/ && $platform !~ m/^arm/)
|
2011-02-08 21:21:48 -06:00
|
|
|
{ $SOLARINC .= $I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Versions".$ds."Current".$ds."Headers".
|
2002-08-27 05:31:48 -05:00
|
|
|
$I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Headers";
|
2003-08-18 08:54:11 -05:00
|
|
|
# [ed] 6/15/02 Add in X11 headers as appropriate for the build
|
2002-10-22 07:24:17 -05:00
|
|
|
if ($GUIBASE eq "unx") {
|
2003-01-20 08:00:18 -06:00
|
|
|
$SOLARINC .= $I.$XINC.
|
|
|
|
$I.$XINC.$ds."freetype2";
|
2002-10-22 07:24:17 -05:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2011-05-06 16:25:55 -05:00
|
|
|
elsif ($platform =~ m/^arm-apple/)
|
|
|
|
{
|
|
|
|
}
|
2003-08-18 08:54:11 -05:00
|
|
|
else
|
|
|
|
{ AddWarning( "set_soenv", "$platform not configured for system dependant include dir" );
|
|
|
|
}
|
2003-07-02 08:37:32 -05:00
|
|
|
|
2011-02-14 11:48:22 -06:00
|
|
|
$gb_REPOS = $SRC_ROOT;
|
2011-03-25 11:26:59 -05:00
|
|
|
$BUILD_TYPE = "@BUILD_TYPE@";
|
2011-02-14 11:48:22 -06:00
|
|
|
|
2011-02-03 09:29:56 -06:00
|
|
|
if ('@WITH_LANG@' ne "")
|
|
|
|
{
|
2011-03-23 13:50:52 -05:00
|
|
|
$BUILD_TYPE = "@BUILD_TYPE@ TRANSLATIONS";
|
2011-02-03 09:29:56 -06:00
|
|
|
}
|
2011-03-08 19:43:29 -06:00
|
|
|
else
|
|
|
|
{
|
|
|
|
$BUILD_TYPE = "@BUILD_TYPE@";
|
|
|
|
}
|
2003-08-18 08:54:11 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# F. Setting the different aliases.
|
|
|
|
#
|
2010-10-14 02:53:40 -05:00
|
|
|
# 1. alias for a full product make.
|
2002-08-27 05:31:48 -05:00
|
|
|
$mkout = '"perl $SOLARENV/bin/mkout.pl"';
|
|
|
|
$deliver = '"perl $SOLARENV/bin/deliver.pl"';
|
2002-10-22 07:24:17 -05:00
|
|
|
$build = '"perl $SOLARENV/bin/build.pl"';
|
2007-05-09 07:27:09 -05:00
|
|
|
$build_client = '"perl $SOLARENV/bin/build_client.pl"';
|
2002-08-27 05:31:48 -05:00
|
|
|
$zipdep = '"perl $SOLARENV/bin/zipdep.pl"';
|
|
|
|
# 3. alias for a full product make
|
2002-10-22 07:24:17 -05:00
|
|
|
$nmake = '"dmake"';
|
2010-11-10 07:10:40 -06:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#--------------------------
|
|
|
|
# VI. Open the output file.
|
|
|
|
#--------------------------
|
|
|
|
#
|
|
|
|
open( OUT, ">$outfile" ) ||
|
|
|
|
die "Cannot open $outfile: $!\n";
|
2002-10-22 07:24:17 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#------------------------------------------
|
|
|
|
# VII. Writing the data to the output file.
|
|
|
|
#------------------------------------------
|
|
|
|
#
|
|
|
|
# Write file header.
|
2010-11-02 03:38:48 -05:00
|
|
|
CreateFileHeader( *OUT, $UPD, $platform, "sh/bash/ksh", "#" );
|
2006-01-06 04:17:44 -06:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "SRC_ROOT", $SRC_ROOT, "e" );
|
2010-01-12 11:49:59 -06:00
|
|
|
ToFile( "OOO_SHELL", $OOO_SHELL, "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "JAVA_HOME", $JAVA_HOME, "e" );
|
2011-04-26 03:27:13 -05:00
|
|
|
ToFile( "L10N_MODULE", $L10N_MODULE, "e" );
|
2007-12-12 08:37:11 -06:00
|
|
|
ToFile( "ANT_HOME", PathFormat("@ANT_HOME@"), "e" );
|
|
|
|
ToFile( "ANT_LIB", PathFormat("@ANT_LIB@"), "e" );
|
|
|
|
ToFile( "ANT", PathFormat("@ANT@"), "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "JDKLIB", $JAVA_LIB, "e" );
|
|
|
|
ToFile( "ASM_PATH", $ASM_PATH, "e" );
|
|
|
|
ToFile( "FRAMEWORKSHOME", $FRAMEWORKSHOME, "e" );
|
|
|
|
ToFile( "Empty", $empty, "n" );
|
2006-01-06 04:17:44 -06:00
|
|
|
|
|
|
|
#
|
|
|
|
# Writing the platform independent constant values to file.
|
|
|
|
# (c = comment, e = environment variable, a = alias )
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "Platform independent constant values.", $empty, "c" );
|
|
|
|
# Languages
|
2004-10-27 09:23:18 -05:00
|
|
|
ToFile( "WITH_LANG", "@WITH_LANG@", "e" );
|
2011-01-05 12:27:15 -06:00
|
|
|
ToFile( "INTRO_BITMAP", "@INTRO_BITMAP@", "e" );
|
|
|
|
ToFile( "ABOUT_BITMAP", "@ABOUT_BITMAP@", "e" );
|
2007-06-11 08:00:39 -05:00
|
|
|
ToFile( "OOO_VENDOR", "@OOO_VENDOR@", "e" );
|
2008-03-06 08:16:57 -06:00
|
|
|
ToFile( "OOODMAKEMODE", "YES", "e" );
|
2011-04-28 15:45:20 -05:00
|
|
|
ToFile( "WITH_POOR_HELP_LOCALIZATIONS", $WITH_POOR_HELP_LOCALIZATIONS, "e" );
|
2004-10-27 09:23:18 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "CALL_CDECL", $CALL_CDECL, "e" );
|
|
|
|
ToFile( "COMMON_OUTDIR", $COMMON_OUTDIR, "e" );
|
|
|
|
ToFile( "common_build", $common_build, "e" );
|
|
|
|
ToFile( "NO_REC_RES", $NO_REC_RES, "e" );
|
|
|
|
ToFile( "SO3", $SO3, "e" );
|
|
|
|
ToFile( "SOLAR_PLUGIN", $SOLAR_PLUGIN, "e" );
|
|
|
|
ToFile( "UPDATER", $UPDATER, "e" );
|
|
|
|
ToFile( "VCL", $VCL, "e" );
|
|
|
|
ToFile( "ENABLEUNICODE", $ENABLEUNICODE, "e" );
|
|
|
|
ToFile( "NO_BSYMBOLIC", $NO_BSYMBOLIC, "e" );
|
2005-01-05 03:42:09 -06:00
|
|
|
if ("@ENABLE_DEBUG@" eq "TRUE") {
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "debug", "true", "e" );
|
|
|
|
}
|
2006-08-28 06:35:32 -05:00
|
|
|
if ("@ENABLE_WERROR@" eq "FALSE") {
|
|
|
|
ToFile( "EXTERNAL_WARNINGS_NOT_ERRORS", "TRUE", "e" );
|
|
|
|
}
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "PRODUCT", "@PRODUCT@", "e" );
|
|
|
|
ToFile( "PROFULLSWITCH", "@PROFULLSWITCH@", "e" );
|
|
|
|
ToFile( "PROEXT", $PROEXT, "e" );
|
2011-03-01 08:43:07 -06:00
|
|
|
ToFile( "VALGRIND_CFLAGS", "@VALGRIND_CFLAGS@", "e" );
|
2007-06-27 07:59:25 -05:00
|
|
|
ToFile( "UNIXWRAPPERNAME", "@UNIXWRAPPERNAME@","e" );
|
2005-03-01 10:17:28 -06:00
|
|
|
ToFile( "BUILD_MOZAB", "@BUILD_MOZAB@", "e" );
|
2005-05-10 01:52:29 -05:00
|
|
|
ToFile( "PREBUILD_MOZAB", $PREBUILD_MOZAB, "e" );
|
|
|
|
ToFile( "MOZILLA_VERSION", $MOZILLA_VERSION, "e" );
|
2005-03-01 10:17:28 -06:00
|
|
|
ToFile( "DEFAULT_MOZILLA_TOOLKIT", $MOZILLA_TOOLKIT, "e" );
|
2009-08-26 03:22:01 -05:00
|
|
|
ToFile( "ENABLE_NSS_MODULE", "@ENABLE_NSS_MODULE@", "e" );
|
|
|
|
ToFile( "MOZILLABUILD", "@MOZILLABUILD@", "e" );
|
2005-03-11 04:31:40 -06:00
|
|
|
ToFile( "BUILD_VER_STRING", "@BUILD_VER_STRING@", "e" );
|
2008-04-03 10:49:47 -05:00
|
|
|
if ($platform =~ m/linux/ && $platform =~ m/powerpc/) {
|
2005-07-14 07:45:49 -05:00
|
|
|
ToFile( "JITC_PROCESSOR_TYPE","6", "e" );
|
|
|
|
}
|
2005-05-18 06:49:00 -05:00
|
|
|
ToFile( "DEFAULT_TO_ENGLISH_FOR_PACKING", "yes", "e" );
|
2004-10-27 10:17:53 -05:00
|
|
|
ToFile( "ENABLE_GTK", "@ENABLE_GTK@", "e" );
|
|
|
|
ToFile( "GTK_CFLAGS", "@GTK_CFLAGS@", "e" );
|
|
|
|
ToFile( "GTK_LIBS", "@GTK_LIBS@", "e" );
|
2011-06-14 06:28:52 -05:00
|
|
|
ToFile( "ENABLE_GTK3", "@ENABLE_GTK3@", "e" );
|
|
|
|
ToFile( "GTK3_CFLAGS", "@GTK3_CFLAGS@", "e" );
|
|
|
|
ToFile( "GTK3_LIBS", "@GTK3_LIBS@", "e" );
|
|
|
|
ToFile( "GTHREAD_CFLAGS", "@GTHREAD_CFLAGS@", "e" );
|
|
|
|
ToFile( "GTHREAD_LIBS", "@GTHREAD_LIBS@", "e" );
|
2006-11-07 08:29:19 -06:00
|
|
|
ToFile( "ENABLE_SYSTRAY_GTK", "@ENABLE_SYSTRAY_GTK@", "e" );
|
2004-10-27 10:17:53 -05:00
|
|
|
ToFile( "ENABLE_STATIC_GTK", "@ENABLE_STATIC_GTK@", "e" );
|
2006-02-28 03:41:43 -06:00
|
|
|
ToFile( "ENABLE_CAIRO", "@ENABLE_CAIRO@", "e" );
|
2007-12-12 06:25:13 -06:00
|
|
|
ToFile( "ENABLE_OPENGL", "@ENABLE_OPENGL@", "e" );
|
2008-04-08 09:18:15 -05:00
|
|
|
ToFile( "ENABLE_PDFIMPORT", "@ENABLE_PDFIMPORT@", "e" );
|
2008-04-03 07:19:37 -05:00
|
|
|
ToFile( "ENABLE_MINIMIZER", "@ENABLE_MINIMIZER@","e" );
|
|
|
|
ToFile( "ENABLE_PRESENTER_SCREEN","@ENABLE_PRESENTER_SCREEN@","e" );
|
2009-01-21 11:47:03 -06:00
|
|
|
ToFile( "ENABLE_REPORTBUILDER","@ENABLE_REPORTBUILDER@","e" );
|
2011-02-18 02:34:44 -06:00
|
|
|
ToFile( "ENABLE_SCRIPTING_BEANSHELL","@ENABLE_SCRIPTING_BEANSHELL@","e" );
|
|
|
|
ToFile( "ENABLE_SCRIPTING_JAVASCRIPT","@ENABLE_SCRIPTING_JAVASCRIPT@","e" );
|
|
|
|
ToFile( "ENABLE_SCRIPTING_PYTHON","@ENABLE_SCRIPTING_PYTHON@","e" );
|
2011-03-21 11:50:57 -05:00
|
|
|
ToFile( "ENABLE_QUICKSTART_LIBPNG", "@ENABLE_QUICKSTART_LIBPNG@", "e" );
|
2007-12-12 06:25:13 -06:00
|
|
|
ToFile( "SYSTEM_JFREEREPORT","@SYSTEM_JFREEREPORT@","e" );
|
2010-12-09 06:56:49 -06:00
|
|
|
ToFile( "WITH_THEMES", "@WITH_THEMES@", "e");
|
2010-12-17 13:04:07 -06:00
|
|
|
ToFile( "WITH_HELPPACK_INTEGRATION", "@WITH_HELPPACK_INTEGRATION@", "e");
|
2010-12-13 13:38:28 -06:00
|
|
|
ToFile( "WITH_EXTENSION_INTEGRATION", "@WITH_EXTENSION_INTEGRATION@", "e");
|
2010-02-15 11:28:00 -06:00
|
|
|
ToFile( "OOO_JUNIT_JAR", "@OOO_JUNIT_JAR@", "e" );
|
2007-12-12 06:25:13 -06:00
|
|
|
ToFile( "SAC_JAR", "@SAC_JAR@", "e" );
|
|
|
|
ToFile( "LIBXML_JAR", "@LIBXML_JAR@", "e" );
|
|
|
|
ToFile( "FLUTE_JAR", "@FLUTE_JAR@", "e" );
|
|
|
|
ToFile( "JFREEREPORT_JAR", "@JFREEREPORT_JAR@", "e" );
|
|
|
|
ToFile( "LIBLAYOUT_JAR", "@LIBLAYOUT_JAR@", "e" );
|
|
|
|
ToFile( "LIBLOADER_JAR", "@LIBLOADER_JAR@", "e" );
|
|
|
|
ToFile( "LIBFORMULA_JAR", "@LIBFORMULA_JAR@", "e" );
|
|
|
|
ToFile( "LIBREPOSITORY_JAR", "@LIBREPOSITORY_JAR@","e" );
|
2009-03-04 09:27:10 -06:00
|
|
|
ToFile( "LIBBASE_JAR", "@LIBBASE_JAR@", "e" );
|
2007-12-12 06:25:13 -06:00
|
|
|
ToFile( "LIBFONTS_JAR", "@LIBFONTS_JAR@", "e" );
|
2009-03-04 09:27:10 -06:00
|
|
|
ToFile( "LIBSERIALIZER_JAR", "@LIBSERIALIZER_JAR@","e" );
|
2008-04-03 12:02:42 -05:00
|
|
|
ToFile( "ENABLE_MEDIAWIKI", "@ENABLE_MEDIAWIKI@", "e" );
|
|
|
|
ToFile( "SYSTEM_APACHE_COMMONS","@SYSTEM_APACHE_COMMONS@","e" );
|
|
|
|
ToFile( "COMMONS_CODEC_JAR", "@COMMONS_CODEC_JAR@","e" );
|
|
|
|
ToFile( "COMMONS_LANG_JAR", "@COMMONS_LANG_JAR@", "e" );
|
|
|
|
ToFile( "COMMONS_HTTPCLIENT_JAR","@COMMONS_HTTPCLIENT_JAR@","e" );
|
|
|
|
ToFile( "COMMONS_LOGGING_JAR","@COMMONS_LOGGING_JAR@","e" );
|
|
|
|
ToFile( "SYSTEM_SERVLETAPI", "@SYSTEM_SERVLETAPI@", "e" );
|
|
|
|
ToFile( "SERVLETAPI_JAR", "@SERVLETAPI_JAR@", "e" );
|
2007-08-02 08:59:11 -05:00
|
|
|
ToFile( "ENABLE_DBUS", "@ENABLE_DBUS@", "e" );
|
2008-08-27 07:56:09 -05:00
|
|
|
ToFile( "ENABLE_GCONF", "@ENABLE_GCONF@", "e" );
|
2005-02-11 10:59:05 -06:00
|
|
|
ToFile( "ENABLE_GNOMEVFS", "@ENABLE_GNOMEVFS@", "e" );
|
2010-09-16 08:27:23 -05:00
|
|
|
ToFile( "ENABLE_GSTREAMER", "@ENABLE_GSTREAMER@", "e" );
|
2008-05-14 08:56:22 -05:00
|
|
|
ToFile( "ENABLE_GIO", "@ENABLE_GIO@", "e" );
|
2004-10-27 10:17:53 -05:00
|
|
|
ToFile( "ENABLE_KDE", "@ENABLE_KDE@", "e" );
|
|
|
|
ToFile( "KDE_CFLAGS", "@KDE_CFLAGS@", "e" );
|
|
|
|
ToFile( "KDE_LIBS", "@KDE_LIBS@", "e" );
|
2005-04-11 02:52:38 -05:00
|
|
|
ToFile( "MOC", "@MOC@", "e" );
|
2009-08-07 05:16:34 -05:00
|
|
|
ToFile( "ENABLE_KDE4", "@ENABLE_KDE4@", "e" );
|
|
|
|
ToFile( "KDE4_CFLAGS", "@KDE4_CFLAGS@", "e" );
|
|
|
|
ToFile( "KDE4_LIBS", "@KDE4_LIBS@", "e" );
|
|
|
|
ToFile( "MOC4", "@MOC4@", "e" );
|
2010-10-14 10:54:14 -05:00
|
|
|
ToFile( "KDE_GLIB_CFLAGS", "@KDE_GLIB_CFLAGS@", "e" );
|
|
|
|
ToFile( "KDE_GLIB_LIBS", "@KDE_GLIB_LIBS@", "e" );
|
|
|
|
ToFile( "KDE_HAVE_GLIB", "@KDE_HAVE_GLIB@", "e" );
|
2009-08-07 05:16:34 -05:00
|
|
|
ToFile( "ENABLE_KAB", "@ENABLE_KAB@", "e" );
|
2002-10-22 07:24:17 -05:00
|
|
|
ToFile( "PSPRINT", "TRUE", "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "MKDEPENDSOLVER", "TRUE", "e" );
|
2010-05-22 10:23:01 -05:00
|
|
|
ToFile( "nodep", "@nodep@", "e" );
|
2010-01-15 07:55:12 -06:00
|
|
|
ToFile( "TARFILE_LOCATION", $TARFILE_LOCATION, "e" );
|
2010-12-01 16:44:49 -06:00
|
|
|
ToFile( "GIT_LINK_SRC", "@GIT_LINK_SRC@", "e" );
|
|
|
|
ToFile( "GIT_REPO_NAMES", "@GIT_REPO_NAMES@", "e" );
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# Writing the platform dependent constant values to file.
|
|
|
|
# (c = comment, e = environment variable, a = alias )
|
|
|
|
ToFile( "Platform dependent constant values.", $empty, "c" );
|
|
|
|
ToFile( "SOLAR_JAVA", $SOLAR_JAVA, "e" );
|
|
|
|
ToFile( "COM", $COM, "e" );
|
|
|
|
ToFile( "COMPATH", $COMPATH, "e" );
|
|
|
|
ToFile( "CPU", $CPU, "e" );
|
|
|
|
ToFile( "CPUNAME", $CPUNAME, "e" );
|
|
|
|
ToFile( "GUI", $GUI, "e" );
|
|
|
|
ToFile( "GLIBC", $GLIBC, "e" );
|
|
|
|
ToFile( "GUIBASE", $GUIBASE, "e" );
|
|
|
|
ToFile( "GVER", $GVER, "e" );
|
|
|
|
ToFile( "OS", $OS, "e" );
|
|
|
|
ToFile( "OSVERSION", $OSVERSION, "e" );
|
2003-08-18 08:54:11 -05:00
|
|
|
ToFile( "PTHREAD_CFLAGS", "@PTHREAD_CFLAGS@", "e" );
|
|
|
|
ToFile( "PTHREAD_LIBS", "@PTHREAD_LIBS@", "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "OUTPATH", $OUTPATH, "e" );
|
|
|
|
ToFile( "INPATH", $INPATH, "e" );
|
|
|
|
ToFile( "PATH_SEPERATOR", $PATH_SEPERATOR, "e" );
|
|
|
|
ToFile( "COMEX", $COMEX, "e" );
|
|
|
|
ToFile( "DYNAMIC_CRT", $DYNAMIC_CRT, "e" );
|
|
|
|
ToFile( "use_shl_versions", $use_shl_versions, "e" );
|
2007-12-12 08:37:11 -06:00
|
|
|
ToFile( "FLIPCMD", $FLIPCMD, "e" );
|
2011-05-06 16:25:55 -05:00
|
|
|
if ( $platform =~ m/darwin/ && $platform !~ m/^arm/)
|
2011-01-06 05:31:18 -06:00
|
|
|
{
|
|
|
|
# MAXOSX_DEPLOYMENT_TARGET : The minimum version required to run the build,
|
|
|
|
# build can assume functions/libraries of that version to be available
|
|
|
|
# unless you want to do runtime checks for 10.5 api, you also want to use the 10.4 sdk
|
|
|
|
# (safer/easier than dealing with the MAC_OS_X_VERSION_MAX_ALLOWED macro)
|
|
|
|
# http://developer.apple.com/technotes/tn2002/tn2064.html
|
|
|
|
ToFile( "MACOSX_DEPLOYMENT_TARGET", "10.4", "e" );
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# Writing the variables to file.
|
|
|
|
# (c = comment, e = environment variable, a = alias, n = newline )
|
|
|
|
ToFile( "Variable values.", $empty, "c" );
|
2005-03-07 10:28:47 -06:00
|
|
|
if ( $platform =~ m/cygwin/ )
|
2004-06-16 04:48:31 -05:00
|
|
|
{ ToFile( "CYGWIN_PATH", $CYGWIN_PATH, "e" );
|
2011-05-16 07:52:26 -05:00
|
|
|
ToFile( "WINDOWS_SDK_HOME", $WINDOWS_SDK_HOME, "e" );
|
2007-03-27 04:20:09 -05:00
|
|
|
ToFile( "DIRECTXSDK_LIB", $DIRECTXSDK_LIB, "e" );
|
2007-11-12 01:36:01 -06:00
|
|
|
ToFile( "USE_DIRECTX5", $USE_DIRECTX5, "e" );
|
2011-05-16 07:52:26 -05:00
|
|
|
ToFile( "ATL_LIB", $ATL_LIB, "e" );
|
2007-03-27 04:20:09 -05:00
|
|
|
if ( $MINGW ne "yes" )
|
|
|
|
{ ToFile( "ATL_INCLUDE", $ATL_INCLUDE, "e" );
|
|
|
|
}
|
2006-09-25 07:33:27 -05:00
|
|
|
ToFile( "MFC_LIB", $MFC_LIB, "e" );
|
|
|
|
ToFile( "MFC_INCLUDE", $MFC_INCLUDE, "e" );
|
2007-12-12 08:37:11 -06:00
|
|
|
ToFile( "NSIS_PATH", $NSIS_PATH, "e" );
|
2006-10-24 09:34:49 -05:00
|
|
|
ToFile( "DISABLE_ACTIVEX", "@DISABLE_ACTIVEX@","e" );
|
2008-07-31 07:53:05 -05:00
|
|
|
ToFile( "DISABLE_ATL", "@DISABLE_ATL@","e" );
|
2011-05-11 04:25:50 -05:00
|
|
|
# Variables used when building the parts that needs to be available
|
|
|
|
# also as 64-bit versions in a 32-bit LibreOffice build, like
|
|
|
|
# the Explorer extension. If the configure script hasn't
|
|
|
|
# found the 64-bit (cross-)compiler, then @BUILD_X64@ will be empty.
|
|
|
|
ToFile( "BUILD_X64", "@BUILD_X64@", "e" );
|
|
|
|
if ( "@BUILD_X64@" eq "TRUE" ) {
|
|
|
|
ToFile( "CC_X64_BINARY", "@CC_X64_BINARY@", "e" );
|
|
|
|
ToFile( "CXX_X64_BINARY","@CXX_X64_BINARY@", "e" );
|
|
|
|
ToFile( "LINK_X64_BINARY","@LINK_X64_BINARY@","e" );
|
|
|
|
ToFile( "LIBMGR_X64_BINARY","@LIBMGR_X64_BINARY@","e" );
|
|
|
|
}
|
2007-12-12 08:37:11 -06:00
|
|
|
|
2008-03-05 09:37:05 -06:00
|
|
|
# Hack around dmake's mktmp not generating DOS paths.
|
|
|
|
my $tmpdir = qx{cygpath -m "/tmp"};
|
|
|
|
chomp($tmpdir);
|
|
|
|
ToFile( "TMPDIR", $tmpdir, "e" );
|
2011-01-04 08:47:57 -06:00
|
|
|
if ( !defined $ENV{"TMP"} || $ENV{"TMP"} eq "" ) {
|
|
|
|
ToFile( "TMP", $tmpdir, "e" );
|
|
|
|
} else {
|
|
|
|
ToFile( "TMP", "$ENV{'TMP'}", "e" );
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2011-05-19 14:52:01 -05:00
|
|
|
elsif ( $platform =~ m/mingw32/ )
|
|
|
|
{ ToFile( "NSIS_PATH", $NSIS_PATH, "e" );
|
|
|
|
}
|
|
|
|
|
2010-10-04 05:26:27 -05:00
|
|
|
if ("@WITH_VC_REDIST@" eq "TRUE") {
|
|
|
|
ToFile( "WITH_VC_REDIST", "TRUE", "e" );
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "PERL", $PERL, "e" );
|
2005-01-25 05:43:16 -06:00
|
|
|
ToFile( "RPM", "@RPM@", "e" );
|
2005-08-30 03:12:51 -05:00
|
|
|
ToFile( "DPKG", "@DPKG@", "e" );
|
|
|
|
ToFile( "PKGMK", "@PKGMK@", "e" );
|
2002-10-22 07:24:17 -05:00
|
|
|
ToFile( "GNUMAKE", "@GNUMAKE@", "e" );
|
2009-04-23 10:52:08 -05:00
|
|
|
ToFile( "GNUTAR", "@GNUTAR@", "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "UPD", $UPD, "e" );
|
|
|
|
ToFile( "WORK_STAMP", $WORK_STAMP, "e" );
|
|
|
|
ToFile( "SOLARVER", $SOLARVER, "e" );
|
|
|
|
ToFile( "SOLARVERSION", $SOLARVERSION, "e" );
|
2010-11-18 10:11:41 -06:00
|
|
|
ToFile( "WORKDIR", $WORKDIR, "e" );
|
|
|
|
ToFile( "OUTDIR", $OUTDIR, "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "SOLARENV", $SOLARENV, "e" );
|
2010-09-17 06:21:21 -05:00
|
|
|
ToFile( "SOLARDEFIMG", $SOLARDEFIMG, "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "SOLARENVINC", $SOLARENVINC, "e" );
|
|
|
|
ToFile( "DMAKEROOT", $DMAKEROOT, "e" );
|
2005-01-25 09:55:07 -06:00
|
|
|
if ( $JDK ne "gcj" ) {
|
|
|
|
ToFile( "CLASSPATH", $CLASSPATH, "e" );
|
|
|
|
ToFile( "XCLASSPATH", $XCLASSPATH, "e" );
|
2010-09-17 06:51:40 -05:00
|
|
|
ToFile( "JAVACISKAFFE", '@JAVACISKAFFE@', "e" );
|
2005-01-25 09:55:07 -06:00
|
|
|
}
|
2005-04-06 04:53:34 -05:00
|
|
|
else {
|
2006-07-05 15:12:45 -05:00
|
|
|
ToFile( "JAVACISGCJ", '@JAVACISGCJ@', "e" );
|
2007-10-04 02:12:49 -05:00
|
|
|
}
|
|
|
|
if ( $GUI eq "UNX" ) {
|
2005-06-16 08:38:18 -05:00
|
|
|
ToFile( "AWTLIB", '@AWTLIB@', "e" );
|
2005-04-06 04:53:34 -05:00
|
|
|
}
|
2006-01-13 09:37:16 -06:00
|
|
|
if ( '@JDK@' ne '' )
|
2010-10-14 02:53:40 -05:00
|
|
|
{
|
2006-01-13 09:37:16 -06:00
|
|
|
ToFile( "JDK", "@JDK@", "e" );
|
2008-08-19 06:03:39 -05:00
|
|
|
ToFile( "JAVAFLAGS", "@JAVAFLAGS@", "e" );
|
2010-09-17 06:51:40 -05:00
|
|
|
ToFile( "JAVA_SOURCE_VER", "@JAVA_SOURCE_VER@","e" );
|
|
|
|
ToFile( "JAVA_TARGET_VER", "@JAVA_TARGET_VER@","e" );
|
2007-12-12 08:37:11 -06:00
|
|
|
ToFile( "JAVAINTERPRETER", PathFormat("@JAVAINTERPRETER@"), "e" );
|
2010-02-25 02:10:21 -06:00
|
|
|
ToFile( "JAVAIFLAGS", "@JAVAIFLAGS@", "e" );
|
2007-12-12 08:37:11 -06:00
|
|
|
ToFile( "JAVACOMPILER", PathFormat("@JAVACOMPILER@"), "e" );
|
|
|
|
ToFile( "JAVADOC", PathFormat("@JAVADOC@"), "e" );
|
2011-03-13 10:07:50 -05:00
|
|
|
ToFile( "JVM_ONE_PATH_CHECK", "@JVM_ONE_PATH_CHECK@", "e" );
|
2006-01-13 09:37:16 -06:00
|
|
|
}
|
2003-12-17 08:01:33 -06:00
|
|
|
ToFile( "SCPDEFS", '@SCPDEFS@', "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "SOLAREXTRAINC", $SOLAREXTRAINC, "e" );
|
|
|
|
ToFile( "SOLAREXTRALIB", $SOLAREXTRALIB, "e" );
|
2011-06-08 03:45:08 -05:00
|
|
|
if ( '@CROSS_COMPILING@' eq 'YES' )
|
Rehash of cross-compilation ideas
Like in my previous plan, when cross-compiling we run the same
configure script separately for a native build configuration on the
build platform, in a temporary subdirectory.
Now use a fixed name "CONF-FOR-BUILD" for that subdirectory, so that
it is easy to edit out that path component from those build
environment variables that contain it.
Pass more of the native build environment variables up to the main
configure and propagate those to the build environment suffixed with
_FOR_BUILD: INPATH, OUTPATH OUTDIR, PATH, SOLARINC, SOLARLIB,
WORKDIR. Whether these all will actually be needed remains to be seen,
the set can be reduced later.
The environment setting file (*Env.Set.sh) for the native build is
copied here to the top directory under the name Env.Build.sh, and the
environment variables set in it that contain pathnames are modified to
point directly to this top directory, not the temporary CONF-FOR-BUILD
subdirectory.
When doing a cross-compiling build, we first do a build of the
necessary build-time tools for the build platform. This is done in the
same source tree. As the directories where build results are stored
include the platform specification (OUTPATH or in some cases INPATH),
there should be no clashes.
Don't run the download script from ./bootstrap(.1). We are running it
from Makefile already anyway often enough. This could also do with
some clean-up; the ./g -f clone phase is a bit slow, I am not sure if
it really is necessary every time? Also, we should not overwrite
ooo.lst if its contents isn't changing.
Use INPATH_FOR_BUILD in SOLARBINDIR so that the self-built tools like
idlc that we run are for the build platform, not the host
platform.
Attempt to get rid of the makefile.rc and makefile.mk files. Surely it
should be enough with just Makefile(.in) (and then GNUmakefile.mk for
its own so far special gbuild purposes). Instead of invoking dmake to
do "clean" or "distclean" from Makefile(.in), we already just do the
same directly in Makefile(.in). This way we don't need to first build
dmake in order to be able to do a make clean, which will then finally
clean out dmake again;)
Ideally I would like to get rid of bootstrap(.1), too. It should be
possible to merge its tasks into configure(.in) or Makefile(.in) as
appropriate.
And actually, maybe also what set_soenv(.in) does could well be merged
into configure(.in)?
2011-06-04 06:59:34 -05:00
|
|
|
{
|
|
|
|
# Obviously we shouldn't set PATH to contain host binaries
|
|
|
|
ToFile( "PATH", "@PATH_FOR_BUILD@", "e" );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ToFile( "PATH", $PATH, "e" );
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "SOLARLIB", $SOLARLIB, "e" );
|
2011-03-31 06:48:56 -05:00
|
|
|
ToFile( "JAVALIB", $JAVALIB, "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "SOLARINC", $SOLARINC, "e" );
|
|
|
|
ToFile( "COMP_ENV", $COMP_ENV, "e" );
|
|
|
|
ToFile( "JAVAHOME", $JAVAHOME, "e" );
|
|
|
|
ToFile( "CC", $CC, "e" );
|
2011-06-09 16:46:15 -05:00
|
|
|
ToFile( "SYSBASE", "$ENV{SYSBASE}", "e" ) if defined $ENV{SYSBASE};
|
2011-05-06 16:25:55 -05:00
|
|
|
ToFile( "CROSS_COMPILING", "@CROSS_COMPILING@","e" );
|
More cross-compiling work and cleanup
Re-introduce the old --with-mingw option but now called
--with-mingw-cross-compiler. Its purpose is now specifically to give
the cross-compiler used when building the ODK, if Java is enabled, and
if building the unowinreg.dll. It has now nothing to do with
cross-compiling LibreOffice itself.
Correspondingly, the WITH_MINGW variable now has meaning only when
building LibreOffice for Windows: If using MinGW, whether natively on
Windows itself (which we as such don't intend to support, I hope), or
cross-compiling, it is set to "yes".
Automate and simplify the search for the MinGW cross-compiler when
intending to build unowinreg.dll on Unix.
Look for the usual tool-chain tools ar, nm, objdump, pkg-config,
ranlib, strip, and for Windows alto dlltool and windres using
AC_CHECK_TOOL so that the proper cross tools are found when
needed. Propagate to environment. As such these are not used except in
the MinGW mk files so far.
Other minor cleanups.
2011-05-18 10:52:04 -05:00
|
|
|
ToFile( "AR", "@AR@", "e" );
|
|
|
|
ToFile( "DLLTOOL", "@DLLTOOL@", "e" );
|
|
|
|
ToFile( "NM", "@NM@", "e" );
|
|
|
|
ToFile( "OBJDUMP", "@OBJDUMP@", "e" );
|
|
|
|
ToFile( "PKG_CONFIG", "@PKG_CONFIG@", "e" );
|
|
|
|
ToFile( "RANLIB", "@RANLIB@", "e" );
|
|
|
|
ToFile( "STRIP", "@STRIP@", "e" );
|
|
|
|
ToFile( "WINDRES", "@WINDRES@", "e" );
|
2011-05-16 10:46:27 -05:00
|
|
|
ToFile( "BUILD_PLATFORM", "@build@", "e" );
|
|
|
|
ToFile( "HOST_PLATFORM", "@host@", "e" );
|
2011-06-08 03:45:08 -05:00
|
|
|
if ( '@CROSS_COMPILING@' eq 'YES' )
|
2011-05-13 15:47:21 -05:00
|
|
|
{
|
|
|
|
ToFile( "COM_FOR_BUILD", "@COM_FOR_BUILD@", "e" );
|
|
|
|
ToFile( "GUI_FOR_BUILD", "@GUI_FOR_BUILD@", "e" );
|
|
|
|
ToFile( "GUIBASE_FOR_BUILD", "@GUIBASE_FOR_BUILD@", "e" );
|
|
|
|
ToFile( "OS_FOR_BUILD", "@OS_FOR_BUILD@", "e" );
|
|
|
|
ToFile( "CPU_FOR_BUILD", "@CPU_FOR_BUILD@", "e" );
|
|
|
|
ToFile( "CPUNAME_FOR_BUILD", "@CPUNAME_FOR_BUILD@", "e" );
|
|
|
|
ToFile( "CC_FOR_BUILD", "@CC_FOR_BUILD@", "e" );
|
|
|
|
ToFile( "CXX_FOR_BUILD", "@CXX_FOR_BUILD@", "e" );
|
|
|
|
ToFile( "GXX_INCLUDE_PATH_FOR_BUILD", "@GXX_INCLUDE_PATH_FOR_BUILD@", "e" );
|
Rehash of cross-compilation ideas
Like in my previous plan, when cross-compiling we run the same
configure script separately for a native build configuration on the
build platform, in a temporary subdirectory.
Now use a fixed name "CONF-FOR-BUILD" for that subdirectory, so that
it is easy to edit out that path component from those build
environment variables that contain it.
Pass more of the native build environment variables up to the main
configure and propagate those to the build environment suffixed with
_FOR_BUILD: INPATH, OUTPATH OUTDIR, PATH, SOLARINC, SOLARLIB,
WORKDIR. Whether these all will actually be needed remains to be seen,
the set can be reduced later.
The environment setting file (*Env.Set.sh) for the native build is
copied here to the top directory under the name Env.Build.sh, and the
environment variables set in it that contain pathnames are modified to
point directly to this top directory, not the temporary CONF-FOR-BUILD
subdirectory.
When doing a cross-compiling build, we first do a build of the
necessary build-time tools for the build platform. This is done in the
same source tree. As the directories where build results are stored
include the platform specification (OUTPATH or in some cases INPATH),
there should be no clashes.
Don't run the download script from ./bootstrap(.1). We are running it
from Makefile already anyway often enough. This could also do with
some clean-up; the ./g -f clone phase is a bit slow, I am not sure if
it really is necessary every time? Also, we should not overwrite
ooo.lst if its contents isn't changing.
Use INPATH_FOR_BUILD in SOLARBINDIR so that the self-built tools like
idlc that we run are for the build platform, not the host
platform.
Attempt to get rid of the makefile.rc and makefile.mk files. Surely it
should be enough with just Makefile(.in) (and then GNUmakefile.mk for
its own so far special gbuild purposes). Instead of invoking dmake to
do "clean" or "distclean" from Makefile(.in), we already just do the
same directly in Makefile(.in). This way we don't need to first build
dmake in order to be able to do a make clean, which will then finally
clean out dmake again;)
Ideally I would like to get rid of bootstrap(.1), too. It should be
possible to merge its tasks into configure(.in) or Makefile(.in) as
appropriate.
And actually, maybe also what set_soenv(.in) does could well be merged
into configure(.in)?
2011-06-04 06:59:34 -05:00
|
|
|
ToFile( "INPATH_FOR_BUILD", "@INPATH_FOR_BUILD@", "e" );
|
|
|
|
ToFile( "OUTPATH_FOR_BUILD", "@OUTPATH_FOR_BUILD@", "e" );
|
2011-05-13 15:47:21 -05:00
|
|
|
ToFile( "MACOSX_DEPLOYMENT_TARGET_FOR_BUILD", "@MACOSX_DEPLOYMENT_TARGET_FOR_BUILD@", "e" );
|
2011-06-13 16:53:34 -05:00
|
|
|
ToFile( "SYSTEM_LIBXSLT_FOR_BUILD", "@SYSTEM_LIBXSLT_FOR_BUILD@", "e" );
|
Rehash of cross-compilation ideas
Like in my previous plan, when cross-compiling we run the same
configure script separately for a native build configuration on the
build platform, in a temporary subdirectory.
Now use a fixed name "CONF-FOR-BUILD" for that subdirectory, so that
it is easy to edit out that path component from those build
environment variables that contain it.
Pass more of the native build environment variables up to the main
configure and propagate those to the build environment suffixed with
_FOR_BUILD: INPATH, OUTPATH OUTDIR, PATH, SOLARINC, SOLARLIB,
WORKDIR. Whether these all will actually be needed remains to be seen,
the set can be reduced later.
The environment setting file (*Env.Set.sh) for the native build is
copied here to the top directory under the name Env.Build.sh, and the
environment variables set in it that contain pathnames are modified to
point directly to this top directory, not the temporary CONF-FOR-BUILD
subdirectory.
When doing a cross-compiling build, we first do a build of the
necessary build-time tools for the build platform. This is done in the
same source tree. As the directories where build results are stored
include the platform specification (OUTPATH or in some cases INPATH),
there should be no clashes.
Don't run the download script from ./bootstrap(.1). We are running it
from Makefile already anyway often enough. This could also do with
some clean-up; the ./g -f clone phase is a bit slow, I am not sure if
it really is necessary every time? Also, we should not overwrite
ooo.lst if its contents isn't changing.
Use INPATH_FOR_BUILD in SOLARBINDIR so that the self-built tools like
idlc that we run are for the build platform, not the host
platform.
Attempt to get rid of the makefile.rc and makefile.mk files. Surely it
should be enough with just Makefile(.in) (and then GNUmakefile.mk for
its own so far special gbuild purposes). Instead of invoking dmake to
do "clean" or "distclean" from Makefile(.in), we already just do the
same directly in Makefile(.in). This way we don't need to first build
dmake in order to be able to do a make clean, which will then finally
clean out dmake again;)
Ideally I would like to get rid of bootstrap(.1), too. It should be
possible to merge its tasks into configure(.in) or Makefile(.in) as
appropriate.
And actually, maybe also what set_soenv(.in) does could well be merged
into configure(.in)?
2011-06-04 06:59:34 -05:00
|
|
|
ToFile( "OUTDIR_FOR_BUILD", "@OUTDIR_FOR_BUILD@", "e");
|
|
|
|
ToFile( "SOLARINC_FOR_BUILD", "@SOLARINC_FOR_BUILD@", "e");
|
|
|
|
ToFile( "SOLARLIB_FOR_BUILD", "@SOLARLIB_FOR_BUILD@", "e");
|
|
|
|
ToFile( "WORKDIR_FOR_BUILD", "@WORKDIR_FOR_BUILD@", "e");
|
2011-05-13 15:47:21 -05:00
|
|
|
}
|
2011-05-16 10:46:27 -05:00
|
|
|
else
|
|
|
|
{
|
|
|
|
ToFile( "COM_FOR_BUILD", $COM, "e" );
|
|
|
|
ToFile( "GUI_FOR_BUILD", $GUI, "e" );
|
|
|
|
ToFile( "GUIBASE_FOR_BUILD", $GUIBASE, "e" );
|
|
|
|
ToFile( "OS_FOR_BUILD", $OS, "e" );
|
|
|
|
ToFile( "CPU_FOR_BUILD", $CPU, "e" );
|
|
|
|
ToFile( "CPUNAME_FOR_BUILD", $CPUNAME, "e" );
|
|
|
|
ToFile( "CC_FOR_BUILD", $CC, "e" );
|
|
|
|
ToFile( "CXX_FOR_BUILD", $CXX, "e" );
|
|
|
|
ToFile( "GXX_INCLUDE_PATH_FOR_BUILD", PathFormat("@GXX_INCLUDE_PATH@"), "e" );
|
Rehash of cross-compilation ideas
Like in my previous plan, when cross-compiling we run the same
configure script separately for a native build configuration on the
build platform, in a temporary subdirectory.
Now use a fixed name "CONF-FOR-BUILD" for that subdirectory, so that
it is easy to edit out that path component from those build
environment variables that contain it.
Pass more of the native build environment variables up to the main
configure and propagate those to the build environment suffixed with
_FOR_BUILD: INPATH, OUTPATH OUTDIR, PATH, SOLARINC, SOLARLIB,
WORKDIR. Whether these all will actually be needed remains to be seen,
the set can be reduced later.
The environment setting file (*Env.Set.sh) for the native build is
copied here to the top directory under the name Env.Build.sh, and the
environment variables set in it that contain pathnames are modified to
point directly to this top directory, not the temporary CONF-FOR-BUILD
subdirectory.
When doing a cross-compiling build, we first do a build of the
necessary build-time tools for the build platform. This is done in the
same source tree. As the directories where build results are stored
include the platform specification (OUTPATH or in some cases INPATH),
there should be no clashes.
Don't run the download script from ./bootstrap(.1). We are running it
from Makefile already anyway often enough. This could also do with
some clean-up; the ./g -f clone phase is a bit slow, I am not sure if
it really is necessary every time? Also, we should not overwrite
ooo.lst if its contents isn't changing.
Use INPATH_FOR_BUILD in SOLARBINDIR so that the self-built tools like
idlc that we run are for the build platform, not the host
platform.
Attempt to get rid of the makefile.rc and makefile.mk files. Surely it
should be enough with just Makefile(.in) (and then GNUmakefile.mk for
its own so far special gbuild purposes). Instead of invoking dmake to
do "clean" or "distclean" from Makefile(.in), we already just do the
same directly in Makefile(.in). This way we don't need to first build
dmake in order to be able to do a make clean, which will then finally
clean out dmake again;)
Ideally I would like to get rid of bootstrap(.1), too. It should be
possible to merge its tasks into configure(.in) or Makefile(.in) as
appropriate.
And actually, maybe also what set_soenv(.in) does could well be merged
into configure(.in)?
2011-06-04 06:59:34 -05:00
|
|
|
ToFile( "INPATH_FOR_BUILD", $INPATH, "e" );
|
|
|
|
ToFile( "OUTPATH_FOR_BUILD", $OUTPATH, "e" );
|
2011-06-13 16:53:34 -05:00
|
|
|
ToFile( "SYSTEM_LIBXSLT_FOR_BUILD", "@SYSTEM_LIBXSLT@", "e" );
|
Rehash of cross-compilation ideas
Like in my previous plan, when cross-compiling we run the same
configure script separately for a native build configuration on the
build platform, in a temporary subdirectory.
Now use a fixed name "CONF-FOR-BUILD" for that subdirectory, so that
it is easy to edit out that path component from those build
environment variables that contain it.
Pass more of the native build environment variables up to the main
configure and propagate those to the build environment suffixed with
_FOR_BUILD: INPATH, OUTPATH OUTDIR, PATH, SOLARINC, SOLARLIB,
WORKDIR. Whether these all will actually be needed remains to be seen,
the set can be reduced later.
The environment setting file (*Env.Set.sh) for the native build is
copied here to the top directory under the name Env.Build.sh, and the
environment variables set in it that contain pathnames are modified to
point directly to this top directory, not the temporary CONF-FOR-BUILD
subdirectory.
When doing a cross-compiling build, we first do a build of the
necessary build-time tools for the build platform. This is done in the
same source tree. As the directories where build results are stored
include the platform specification (OUTPATH or in some cases INPATH),
there should be no clashes.
Don't run the download script from ./bootstrap(.1). We are running it
from Makefile already anyway often enough. This could also do with
some clean-up; the ./g -f clone phase is a bit slow, I am not sure if
it really is necessary every time? Also, we should not overwrite
ooo.lst if its contents isn't changing.
Use INPATH_FOR_BUILD in SOLARBINDIR so that the self-built tools like
idlc that we run are for the build platform, not the host
platform.
Attempt to get rid of the makefile.rc and makefile.mk files. Surely it
should be enough with just Makefile(.in) (and then GNUmakefile.mk for
its own so far special gbuild purposes). Instead of invoking dmake to
do "clean" or "distclean" from Makefile(.in), we already just do the
same directly in Makefile(.in). This way we don't need to first build
dmake in order to be able to do a make clean, which will then finally
clean out dmake again;)
Ideally I would like to get rid of bootstrap(.1), too. It should be
possible to merge its tasks into configure(.in) or Makefile(.in) as
appropriate.
And actually, maybe also what set_soenv(.in) does could well be merged
into configure(.in)?
2011-06-04 06:59:34 -05:00
|
|
|
ToFile( "OUTDIR_FOR_BUILD", $OUTDIR, "e" );
|
|
|
|
ToFile( "PATH_FOR_BUILD", $PATH, "e" );
|
|
|
|
ToFile( "SOLARINC_FOR_BUILD", $SOLARINC, "e" );
|
|
|
|
ToFile( "SOLARLIB_FOR_BUILD", $SOLARLIB, "e" );
|
|
|
|
ToFile( "WORKDIR_FOR_BUILD", $WORKDIR, "e" );
|
2011-05-16 10:46:27 -05:00
|
|
|
}
|
2011-05-13 18:56:37 -05:00
|
|
|
ToFile( "SIZEOF_SHORT", "@SIZEOF_SHORT@", "e" );
|
|
|
|
ToFile( "SIZEOF_INT", "@SIZEOF_INT@", "e" );
|
|
|
|
ToFile( "SIZEOF_LONG", "@SIZEOF_LONG@", "e" );
|
|
|
|
ToFile( "SIZEOF_LONGLONG", "@SIZEOF_LONGLONG@", "e" );
|
|
|
|
ToFile( "SIZEOF_DOUBLE", "@SIZEOF_DOUBLE@", "e" );
|
|
|
|
ToFile( "SIZEOF_POINTER", "@SIZEOF_POINTER@", "e" );
|
|
|
|
ToFile( "ALIGNOF_SHORT", "@ALIGNOF_SHORT@", "e" );
|
|
|
|
ToFile( "ALIGNOF_INT", "@ALIGNOF_INT@", "e" );
|
|
|
|
ToFile( "ALIGNOF_LONG", "@ALIGNOF_LONG@", "e" );
|
|
|
|
ToFile( "ALIGNOF_DOUBLE", "@ALIGNOF_DOUBLE@", "e" );
|
2005-01-25 05:43:16 -06:00
|
|
|
ToFile( "HAVE_GCC_VISIBILITY_FEATURE",
|
|
|
|
"@HAVE_GCC_VISIBILITY_FEATURE@", "e" );
|
2010-11-25 06:44:28 -06:00
|
|
|
ToFile( "HAVE_GCC_VISIBILITY_BROKEN",
|
|
|
|
"@HAVE_GCC_VISIBILITY_BROKEN@", "e" );
|
2007-07-31 07:09:45 -05:00
|
|
|
ToFile( "HAVE_LD_HASH_STYLE","@HAVE_LD_HASH_STYLE@","e" );
|
2011-03-29 06:25:46 -05:00
|
|
|
ToFile( "WITH_LINKER_HASH_STYLE","@WITH_LINKER_HASH_STYLE@","e" );
|
2009-04-27 06:24:10 -05:00
|
|
|
ToFile( "HAVE_LD_BSYMBOLIC_FUNCTIONS",
|
|
|
|
"@HAVE_LD_BSYMBOLIC_FUNCTIONS@","e" );
|
2010-12-08 03:24:49 -06:00
|
|
|
ToFile( "HAVE_CXX0X", "@HAVE_CXX0X@", "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "CXX", $CXX, "e" );
|
2009-09-16 09:49:32 -05:00
|
|
|
ToFile( "USE_CCACHE", "@USE_CCACHE@", "e" );
|
2006-08-03 09:10:40 -05:00
|
|
|
ToFile( "MINGWCXX", "@MINGWCXX@", "e" );
|
|
|
|
ToFile( "MINGWSTRIP", "@MINGWSTRIP@", "e" );
|
2011-02-08 21:21:48 -06:00
|
|
|
ToFile( "WITH_STLPORT", "@WITH_STLPORT@", "e" );
|
2006-01-31 11:28:58 -06:00
|
|
|
ToFile( "ALLOC", "@ALLOC@", "e" );
|
2004-06-16 04:48:31 -05:00
|
|
|
ToFile( "ENABLE_SYMBOLS", "@ENABLE_SYMBOLS@", "e" );
|
2006-10-24 09:34:49 -05:00
|
|
|
ToFile( "DISABLE_STRIP", "@DISABLE_STRIP@", "e" );
|
2007-01-16 09:09:14 -06:00
|
|
|
ToFile( "LFS_CFLAGS", "@LFS_CFLAGS@", "e" );
|
2004-06-16 04:48:31 -05:00
|
|
|
ToFile( "ENABLE_CRASHDUMP", "@ENABLE_CRASHDUMP@", "e" );
|
|
|
|
ToFile( "ENABLE_CUPS", "@ENABLE_CUPS@", "e" );
|
2008-04-03 11:15:28 -05:00
|
|
|
ToFile( "ENABLE_RANDR", "@ENABLE_RANDR@", "e" );
|
2004-06-16 04:48:31 -05:00
|
|
|
ToFile( "ENABLE_FONTCONFIG", "@ENABLE_FONTCONFIG@", "e" );
|
2004-09-08 06:26:43 -05:00
|
|
|
ToFile( "ENABLE_DIRECTX", "@ENABLE_DIRECTX@", "e" );
|
2008-03-06 05:21:05 -06:00
|
|
|
ToFile( "ENABLE_LAYOUT", "@ENABLE_LAYOUT@", "e" );
|
2006-10-30 02:18:48 -06:00
|
|
|
ToFile( "ENABLE_PCH", "@ENABLE_PCH@", "e" );
|
2009-08-17 09:12:14 -05:00
|
|
|
ToFile( "ENABLE_GRAPHITE", "@ENABLE_GRAPHITE@", "e");
|
|
|
|
ToFile( "SYSTEM_GRAPHITE", "@SYSTEM_GRAPHITE@", "e");
|
|
|
|
ToFile( "GRAPHITE_LIBS", "@GRAPHITE_LIBS@", "e");
|
|
|
|
ToFile( "GRAPHITE_CFLAGS", "@GRAPHITE_CFLAGS@", "e");
|
2010-11-04 20:23:12 -05:00
|
|
|
ToFile( "CL_X64", "@CL_X64@", "e");
|
2005-02-11 08:50:36 -06:00
|
|
|
ToFile( "WITH_MYSPELL_DICTS","@WITH_MYSPELL_DICTS@","e");
|
2008-06-13 08:11:11 -05:00
|
|
|
ToFile( "SYSTEM_DICTS", "@SYSTEM_DICTS@", "e");
|
|
|
|
ToFile( "DICT_SYSTEM_DIR", "@DICT_SYSTEM_DIR@", "e");
|
|
|
|
ToFile( "HYPH_SYSTEM_DIR", "@HYPH_SYSTEM_DIR@", "e");
|
|
|
|
ToFile( "THES_SYSTEM_DIR", "@THES_SYSTEM_DIR@", "e");
|
2006-03-22 02:25:39 -06:00
|
|
|
ToFile( "ENABLE_LOCKDOWN", "@ENABLE_LOCKDOWN@", "e" );
|
2006-04-20 07:34:17 -05:00
|
|
|
ToFile( "WITH_LDAP", "@WITH_LDAP@", "e" );
|
2004-11-15 07:11:32 -06:00
|
|
|
ToFile( "WITH_OPENLDAP", "@WITH_OPENLDAP@", "e" );
|
2005-03-30 04:38:22 -06:00
|
|
|
ToFile( "WITH_MOZILLA", "@WITH_MOZILLA@", "e" );
|
|
|
|
ToFile( "SYSTEM_MOZILLA", "@SYSTEM_MOZILLA@", "e" );
|
2006-07-19 03:52:27 -05:00
|
|
|
ToFile( "MOZ_FLAVOUR", "@MOZ_FLAVOUR@", "e" );
|
|
|
|
ToFile( "NSPR_LIB", "@NSPR_LIB@", "e" );
|
|
|
|
ToFile( "NSS_LIB", "@NSS_LIB@", "e" );
|
2005-03-30 04:38:22 -06:00
|
|
|
ToFile( "MOZ_INC", "@MOZ_INC@", "e" );
|
|
|
|
ToFile( "MOZ_LIB", "@MOZ_LIB@", "e" );
|
|
|
|
ToFile( "MOZ_LIB_XPCOM", "@MOZ_LIB_XPCOM@", "e" );
|
2005-12-21 04:09:50 -06:00
|
|
|
ToFile( "MOZ_NSPR_CFLAGS", "@MOZ_NSPR_CFLAGS@", "e" );
|
2005-03-30 04:38:22 -06:00
|
|
|
ToFile( "MOZ_NSS_CFLAGS", "@MOZ_NSS_CFLAGS@", "e" );
|
2010-11-05 18:18:32 -05:00
|
|
|
ToFile( "MOZ_NSS_LIBS", "@MOZ_NSS_LIBS@", "e" );
|
2005-03-30 04:38:22 -06:00
|
|
|
ToFile( "MOZ_LDAP_CFLAGS", "@MOZ_LDAP_CFLAGS@", "e" );
|
2011-04-24 03:53:35 -05:00
|
|
|
ToFile( "OOOP_GALLERY_PACK", "@OOOP_GALLERY_PACK@","e" );
|
|
|
|
ToFile( "OOOP_TEMPLATES_PACK", "@OOOP_TEMPLATES_PACK@","e" );
|
|
|
|
ToFile( "OOOP_FONTS_PACK", "@OOOP_FONTS_PACK@","e" );
|
|
|
|
ToFile( "OOOP_SAMPLES_PACK", "@OOOP_SAMPLES_PACK@","e" );
|
|
|
|
ToFile( "CT2N_EXTENSION_PACK", "@CT2N_EXTENSION_PACK@","e" );
|
|
|
|
ToFile( "BARCODE_EXTENSION_PACK", "@BARCODE_EXTENSION_PACK@","e" );
|
|
|
|
ToFile( "DIAGRAM_EXTENSION_PACK", "@DIAGRAM_EXTENSION_PACK@","e" );
|
|
|
|
ToFile( "VALIDATOR_EXTENSION_PACK", "@VALIDATOR_EXTENSION_PACK@","e" );
|
|
|
|
ToFile( "WATCH_WINDOW_EXTENSION_PACK", "@WATCH_WINDOW_EXTENSION_PACK@","e" );
|
|
|
|
ToFile( "NUMBERTEXT_EXTENSION_PACK", "@NUMBERTEXT_EXTENSION_PACK@","e" );
|
|
|
|
ToFile( "HUNART_EXTENSION_PACK", "@HUNART_EXTENSION_PACK@","e" );
|
|
|
|
ToFile( "TYPO_EXTENSION_PACK", "@TYPO_EXTENSION_PACK@","e" );
|
|
|
|
ToFile( "GOOGLE_DOCS_EXTENSION_PACK", "@GOOGLE_DOCS_EXTENSION_PACK@","e" );
|
2011-05-11 04:18:37 -05:00
|
|
|
ToFile( "OOOBLOGGER_EXTENSION_PACK", "@OOOBLOGGER_EXTENSION_PACK@","e" );
|
2011-05-08 04:14:57 -05:00
|
|
|
ToFile( "SUNTEMPLATES_LANG", "@SUNTEMPLATES_LANG@","e" );
|
|
|
|
ToFile( "SUNTEMPLATES_DE_PACK", "@SUNTEMPLATES_DE_PACK@","e" );
|
|
|
|
ToFile( "SUNTEMPLATES_EN_US_PACK", "@SUNTEMPLATES_EN_US_PACK@","e" );
|
|
|
|
ToFile( "SUNTEMPLATES_ES_PACK", "@SUNTEMPLATES_ES_PACK@","e" );
|
|
|
|
ToFile( "SUNTEMPLATES_FR_PACK", "@SUNTEMPLATES_FR_PACK@","e" );
|
|
|
|
ToFile( "SUNTEMPLATES_HU_PACK", "@SUNTEMPLATES_HU_PACK@","e" );
|
|
|
|
ToFile( "SUNTEMPLATES_IT_PACK", "@SUNTEMPLATES_IT_PACK@","e" );
|
2011-05-08 03:25:25 -05:00
|
|
|
ToFile( "LIGHTPROOF_EN_US_PACK", "@LIGHTPROOF_EN_US_PACK@","e" );
|
|
|
|
ToFile( "LIGHTPROOF_HU_PACK", "@LIGHTPROOF_HU_PACK@","e" );
|
|
|
|
ToFile( "LIGHTPROOF_LANG", "@LIGHTPROOF_LANG@", "e" );
|
2003-12-17 08:01:33 -06:00
|
|
|
ToFile( "WITH_FONTS", "@WITH_FONTS@", "e" );
|
2011-04-07 03:19:48 -05:00
|
|
|
ToFile( "WITH_AGFA_MONOTYPE_FONTS", "@WITH_AGFA_MONOTYPE_FONTS@", "e" );
|
2006-02-10 04:18:06 -06:00
|
|
|
ToFile( "WITHOUT_AFMS", "@WITHOUT_AFMS@", "e" );
|
|
|
|
ToFile( "WITHOUT_PPDS", "@WITHOUT_PPDS@", "e" );
|
2005-02-11 08:50:36 -06:00
|
|
|
ToFile( "WITH_BINFILTER", "@WITH_BINFILTER@", "e" );
|
2011-02-22 12:11:18 -06:00
|
|
|
ToFile( "BUILD_TYPE", "$BUILD_TYPE", "e" );
|
2008-06-06 06:05:45 -05:00
|
|
|
ToFile( "VERBOSE", "@VERBOSE@", "e" );
|
2010-10-25 17:14:05 -05:00
|
|
|
ToFile( "ENABLE_ZENITY", "@ENABLE_ZENITY@", "e" );
|
2005-06-09 08:14:52 -05:00
|
|
|
ToFile( "ENABLE_EVOAB2", "@ENABLE_EVOAB2@", "e" );
|
2011-04-26 08:54:10 -05:00
|
|
|
ToFile( "ENABLE_UGLY", "@ENABLE_UGLY@", "e" );
|
2011-04-29 16:33:26 -05:00
|
|
|
ToFile( "ENABLE_RELEASE_BUILD", "@ENABLE_RELEASE_BUILD@", "e" );
|
2005-06-09 08:14:52 -05:00
|
|
|
ToFile( "GOBJECT_CFLAGS", "@GOBJECT_CFLAGS@", "e" );
|
|
|
|
ToFile( "GOBJECT_LIBS", "@GOBJECT_LIBS@", "e" );
|
2003-12-17 08:01:33 -06:00
|
|
|
if ( '@ENABLE_RPATH@' eq "no" ) {
|
|
|
|
ToFile( "LINKFLAGSRUNPATH",'', "e" );
|
|
|
|
}
|
2005-01-25 05:43:16 -06:00
|
|
|
ToFile( "EPM", "@EPM@", "e" );
|
2007-11-02 09:23:26 -05:00
|
|
|
ToFile( "EPM_FLAGS", $EPM_FLAGS, "e" );
|
2005-03-08 09:35:34 -06:00
|
|
|
ToFile( "BUILD_EPM", "@BUILD_EPM@", "e" );
|
2010-12-13 13:23:02 -06:00
|
|
|
ToFile( "GPERF", "@GPERF@", "e" );
|
2005-03-15 02:46:44 -06:00
|
|
|
ToFile( "PKGFORMAT", "@PKGFORMAT@", "e" );
|
2005-02-21 08:16:50 -06:00
|
|
|
ToFile( "SYSTEM_STDLIBS", "@SYSTEM_STDLIBS@", "e" );
|
2003-12-17 08:01:33 -06:00
|
|
|
ToFile( "SYSTEM_ZLIB", "@SYSTEM_ZLIB@", "e" );
|
2007-11-26 05:47:08 -06:00
|
|
|
ToFile( "SYSTEM_OPENSSL", "@SYSTEM_OPENSSL@", "e" );
|
|
|
|
ToFile( "OPENSSL_CFLAGS", "@OPENSSL_CFLAGS@", "e" );
|
|
|
|
ToFile( "OPENSSL_LIBS", "@OPENSSL_LIBS@", "e" );
|
2011-03-13 10:07:50 -05:00
|
|
|
ToFile( "DISABLE_PYTHON", "@DISABLE_PYTHON@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "SYSTEM_PYTHON", "@SYSTEM_PYTHON@", "e" );
|
2010-11-05 18:30:03 -05:00
|
|
|
ToFile( "PYTHON", "@PYTHON@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "PYTHON_CFLAGS", "@PYTHON_CFLAGS@", "e" );
|
|
|
|
ToFile( "PYTHON_LIBS", "@PYTHON_LIBS@", "e" );
|
2006-12-12 09:05:54 -06:00
|
|
|
ToFile( "SYSTEM_ICU", "@SYSTEM_ICU@", "e" );
|
2011-01-29 06:51:38 -06:00
|
|
|
ToFile( "ICU_MAJOR", "@ICU_MAJOR@", "e" );
|
|
|
|
ToFile( "ICU_MINOR", "@ICU_MINOR@", "e" );
|
|
|
|
ToFile( "ICU_MICRO", "@ICU_MICRO@", "e" );
|
2006-12-12 09:05:54 -06:00
|
|
|
ToFile( "SYSTEM_GENBRK", "@SYSTEM_GENBRK@", "e" );
|
|
|
|
ToFile( "SYSTEM_GENCCODE", "@SYSTEM_GENCCODE@", "e" );
|
2007-01-10 04:27:32 -06:00
|
|
|
ToFile( "SYSTEM_GENCMN", "@SYSTEM_GENCMN@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "SYSTEM_JPEG", "@SYSTEM_JPEG@", "e" );
|
|
|
|
ToFile( "FREETYPE_CFLAGS", "@FREETYPE_CFLAGS@", "e" );
|
|
|
|
ToFile( "FREETYPE_LIBS", "@FREETYPE_LIBS@", "e" );
|
2008-10-10 08:02:43 -05:00
|
|
|
ToFile( "SYSTEM_POPPLER", "@SYSTEM_POPPLER@", "e" );
|
|
|
|
ToFile( "POPPLER_CFLAGS", "@POPPLER_CFLAGS@", "e" );
|
|
|
|
ToFile( "POPPLER_LIBS", "@POPPLER_LIBS@", "e" );
|
2010-06-09 00:07:59 -05:00
|
|
|
ToFile( "GSTREAMER_CFLAGS", "@GSTREAMER_CFLAGS@", "e" );
|
|
|
|
ToFile( "GSTREAMER_LIBS", "@GSTREAMER_LIBS@", "e" );
|
2006-02-28 03:41:43 -06:00
|
|
|
ToFile( "SYSTEM_CAIRO", "@SYSTEM_CAIRO@", "e" );
|
2008-11-30 01:56:43 -06:00
|
|
|
ToFile( "BUILD_PIXMAN", "@BUILD_PIXMAN@", "e" );
|
2006-02-28 03:41:43 -06:00
|
|
|
ToFile( "CAIRO_CFLAGS", "@CAIRO_CFLAGS@", "e" );
|
|
|
|
ToFile( "CAIRO_LIBS", "@CAIRO_LIBS@", "e" );
|
2008-07-30 07:07:05 -05:00
|
|
|
ToFile( "XRANDR_CFLAGS", "@XRANDR_CFLAGS@", "e" );
|
|
|
|
ToFile( "XRANDR_LIBS", "@XRANDR_LIBS@", "e" );
|
|
|
|
ToFile( "XRANDR_DLOPEN", "@XRANDR_DLOPEN@", "e" );
|
2010-10-12 10:26:05 -05:00
|
|
|
ToFile( "LIBPNG_CFLAGS", "@LIBPNG_CFLAGS@", "e" );
|
|
|
|
ToFile( "LIBPNG_LIBS", "@LIBPNG_LIBS@", "e" );
|
2005-03-01 09:58:10 -06:00
|
|
|
ToFile( "SYSTEM_LIBWPD", "@SYSTEM_LIBWPD@", "e" );
|
|
|
|
ToFile( "LIBWPD_CFLAGS", "@LIBWPD_CFLAGS@", "e" );
|
|
|
|
ToFile( "LIBWPD_LIBS", "@LIBWPD_LIBS@", "e" );
|
2010-09-14 04:01:32 -05:00
|
|
|
ToFile( "SYSTEM_LIBWPS", "@SYSTEM_LIBWPS@", "e" );
|
|
|
|
ToFile( "LIBWPS_CFLAGS", "@LIBWPS_CFLAGS@", "e" );
|
|
|
|
ToFile( "LIBWPS_LIBS", "@LIBWPS_LIBS@", "e" );
|
2010-09-14 04:29:54 -05:00
|
|
|
ToFile( "SYSTEM_LIBWPG", "@SYSTEM_LIBWPG@", "e" );
|
|
|
|
ToFile( "LIBWPG_CFLAGS", "@LIBWPG_CFLAGS@", "e" );
|
|
|
|
ToFile( "LIBWPG_LIBS", "@LIBWPG_LIBS@", "e" );
|
2011-06-06 05:49:32 -05:00
|
|
|
ToFile( "SYSTEM_LIBVISIO", "@SYSTEM_LIBVISIO@", "e" );
|
|
|
|
ToFile( "LIBVISIO_CFLAGS", "@LIBVISIO_CFLAGS@", "e" );
|
|
|
|
ToFile( "LIBVISIO_LIBS", "@LIBVISIO_LIBS@", "e" );
|
2010-03-03 14:01:44 -06:00
|
|
|
ToFile( "SYSTEM_CPPUNIT", "@SYSTEM_CPPUNIT@", "e" );
|
|
|
|
ToFile( "CPPUNIT_CFLAGS", "@CPPUNIT_CFLAGS@", "e" );
|
|
|
|
ToFile( "CPPUNIT_LIBS", "@CPPUNIT_LIBS@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "SYSTEM_LIBXML", "@SYSTEM_LIBXML@", "e" );
|
2006-10-24 08:23:25 -05:00
|
|
|
ToFile( "USE_FT_EMBOLDEN", "@USE_FT_EMBOLDEN@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "LIBXML_CFLAGS", "@LIBXML_CFLAGS@", "e" );
|
|
|
|
ToFile( "LIBXML_LIBS", "@LIBXML_LIBS@", "e" );
|
|
|
|
ToFile( "SYSTEM_EXPAT", "@SYSTEM_EXPAT@", "e" );
|
2010-11-30 06:45:42 -06:00
|
|
|
ToFile( "WITH_EXTRA_GALLERY", "@WITH_EXTRA_GALLERY@", "e" );
|
|
|
|
ToFile( "WITH_EXTRA_TEMPLATE", "@WITH_EXTRA_TEMPLATE@", "e" );
|
|
|
|
ToFile( "WITH_EXTRA_SAMPLE", "@WITH_EXTRA_SAMPLE@", "e" );
|
|
|
|
ToFile( "WITH_EXTRA_FONT", "@WITH_EXTRA_FONT@", "e" );
|
2011-03-24 15:11:53 -05:00
|
|
|
ToFile( "SYSTEM_TRANSLATE_TOOLKIT", "@SYSTEM_TRANSLATE_TOOLKIT@", "e" );
|
2005-04-11 03:31:27 -05:00
|
|
|
ToFile( "SYSTEM_DB", "@SYSTEM_DB@", "e" );
|
2011-05-18 03:13:43 -05:00
|
|
|
ToFile( "SYSTEM_DB_CFLAGS", "@SYSTEM_DB_CFLAGS@", "e" );
|
2010-12-01 16:26:31 -06:00
|
|
|
ToFile( "DB_LIB", "@DB_LIB@", "e" );
|
|
|
|
ToFile( "DB_CPPLIB", "@DB_CPPLIB@", "e" );
|
2009-12-11 02:51:25 -06:00
|
|
|
ToFile( "ENABLE_MYSQLC", "@ENABLE_MYSQLC@", "e" );
|
2011-04-27 07:29:58 -05:00
|
|
|
ToFile( "ENABLE_LOMENUBAR", "@ENABLE_LOMENUBAR@", "e" );
|
2011-06-16 12:12:35 -05:00
|
|
|
ToFile( "ENABLE_ONLINE_UPDATE","@ENABLE_ONLINE_UPDATE@", "e" );
|
2009-12-11 02:51:25 -06:00
|
|
|
ToFile( "SYSTEM_MYSQL", "@SYSTEM_MYSQL@", "e" );
|
|
|
|
ToFile( "SYSTEM_MYSQL_CPPCONN","@SYSTEM_MYSQL_CPPCONN@","e" );
|
|
|
|
ToFile( "MYSQL_INC", "@MYSQL_INC@", "e" );
|
|
|
|
ToFile( "MYSQL_LIB", "@MYSQL_LIB@", "e" );
|
|
|
|
ToFile( "MYSQL_DEFINES", "@MYSQL_DEFINES@", "e" );
|
|
|
|
ToFile( "LIBMYSQL_PATH", "@LIBMYSQL_PATH@", "e" );
|
2006-04-19 09:10:10 -05:00
|
|
|
ToFile( "SYSTEM_HSQLDB", "@SYSTEM_HSQLDB@", "e" );
|
|
|
|
ToFile( "HSQLDB_JAR", "@HSQLDB_JAR@", "e" );
|
2008-07-07 10:05:23 -05:00
|
|
|
ToFile( "SYSTEM_LUCENE", "@SYSTEM_LUCENE@", "e" );
|
|
|
|
ToFile( "LUCENE_CORE_JAR", "@LUCENE_CORE_JAR@", "e" );
|
2008-08-01 06:12:55 -05:00
|
|
|
ToFile( "LUCENE_ANALYZERS_JAR", "@LUCENE_ANALYZERS_JAR@", "e" );
|
2006-04-19 09:10:10 -05:00
|
|
|
ToFile( "SYSTEM_BSH", "@SYSTEM_BSH@", "e" );
|
|
|
|
ToFile( "BSH_JAR", "@BSH_JAR@", "e" );
|
2008-08-19 06:03:39 -05:00
|
|
|
ToFile( "SYSTEM_SAXON", "@SYSTEM_SAXON@", "e" );
|
|
|
|
ToFile( "SAXON_JAR", "@SAXON_JAR@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "SYSTEM_ODBC_HEADERS","@SYSTEM_ODBC_HEADERS@","e" );
|
2007-05-10 07:15:24 -05:00
|
|
|
ToFile( "SYSTEM_LIBXSLT", "@SYSTEM_LIBXSLT@", "e" );
|
|
|
|
ToFile( "LIBXSLT_CFLAGS", "@LIBXSLT_CFLAGS@", "e" );
|
|
|
|
ToFile( "LIBXSLT_LIBS", "@LIBXSLT_LIBS@", "e" );
|
2011-05-23 18:48:19 -05:00
|
|
|
ToFile( "XSLTPROC", "@XSLTPROC@", "e" );
|
2005-02-21 08:16:50 -06:00
|
|
|
ToFile( "SYSTEM_SANE_HEADER","@SYSTEM_SANE_HEADER@","e" );
|
|
|
|
ToFile( "SYSTEM_XRENDER_HEADERS","@SYSTEM_XRENDER_HEADERS@","e" );
|
2010-09-14 04:44:27 -05:00
|
|
|
ToFile( "SYSTEM_MESA_HEADERS","@SYSTEM_MESA_HEADERS@","e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "SYSTEM_CURL", "@SYSTEM_CURL@", "e" );
|
|
|
|
ToFile( "CURL_CFLAGS", "@CURL_CFLAGS@", "e" );
|
|
|
|
ToFile( "CURL_LIBS", "@CURL_LIBS@", "e" );
|
2005-01-18 09:13:37 -06:00
|
|
|
ToFile( "SYSTEM_BOOST", "@SYSTEM_BOOST@", "e" );
|
2010-12-22 09:04:34 -06:00
|
|
|
ToFile( "MDDS_CPPFLAGS", "@MDDS_CPPFLAGS@", "e" );
|
2010-06-23 06:38:34 -05:00
|
|
|
ToFile( "SYSTEM_MDDS", "@SYSTEM_MDDS@", "e" );
|
2007-08-02 09:55:40 -05:00
|
|
|
ToFile( "SYSTEM_VIGRA", "@SYSTEM_VIGRA@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "SYSTEM_NEON", "@SYSTEM_NEON@", "e" );
|
2011-06-01 17:01:34 -05:00
|
|
|
ToFile( "ENABLE_LIBRSVG", "@ENABLE_LIBRSVG@", "e" );
|
2011-03-09 11:12:52 -06:00
|
|
|
ToFile( "SYSTEM_LIBRSVG", "@SYSTEM_LIBRSVG@", "e" );
|
|
|
|
ToFile( "SYSTEM_GDKPIXBUF", "@SYSTEM_GDKPIXBUF@", "e" );
|
|
|
|
ToFile( "SYSTEM_GLIB", "@SYSTEM_GLIB@", "e" );
|
|
|
|
ToFile( "SYSTEM_GETTEXT", "@SYSTEM_GETTEXT@", "e" );
|
|
|
|
ToFile( "SYSTEM_LIBCROCO", "@SYSTEM_LIBCROCO@", "e" );
|
|
|
|
ToFile( "SYSTEM_PANGO", "@SYSTEM_PANGO@", "e" );
|
2011-03-29 07:37:15 -05:00
|
|
|
ToFile( "SYSTEM_LIBGSF", "@SYSTEM_LIBGSF@", "e" );
|
2011-03-09 11:12:52 -06:00
|
|
|
ToFile( "SYSTEM_LIBPNG", "@SYSTEM_LIBPNG@", "e" );
|
|
|
|
ToFile( "SYSTEM_LIBJPEG", "@SYSTEM_LIBJPEG@", "e" );
|
2006-07-19 03:52:27 -05:00
|
|
|
ToFile( "NEON_VERSION", "@NEON_VERSION@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "NEON_LIBS", "@NEON_LIBS@", "e" );
|
|
|
|
ToFile( "NEON_CFLAGS", "@NEON_CFLAGS@", "e" );
|
2006-04-20 07:34:17 -05:00
|
|
|
ToFile( "DISABLE_NEON", "@DISABLE_NEON@", "e" );
|
2003-12-17 08:01:33 -06:00
|
|
|
ToFile( "BUILD_DMAKE", "@BUILD_DMAKE@", "e" );
|
2010-06-22 11:29:17 -05:00
|
|
|
ToFile( "BUILD_STAX", "@BUILD_STAX@", "e" );
|
2006-08-03 09:10:40 -05:00
|
|
|
ToFile( "BUILD_UNOWINREG", "@BUILD_UNOWINREG@", "e" );
|
2004-09-09 05:22:23 -05:00
|
|
|
ToFile( "USE_XINERAMA", "@USE_XINERAMA@", "e" );
|
|
|
|
ToFile( "XINERAMA_LINK", "@XINERAMA_LINK@", "e" );
|
2008-07-01 10:08:43 -05:00
|
|
|
ToFile( "SYSTEM_REDLAND", "@SYSTEM_REDLAND@", "e" );
|
2010-10-06 02:50:50 -05:00
|
|
|
ToFile( "REDLAND_CFLAGS", "@REDLAND_CFLAGS@", "e" );
|
2008-07-01 10:08:43 -05:00
|
|
|
ToFile( "REDLAND_LIBS", "@REDLAND_LIBS@", "e" );
|
2006-01-06 06:14:28 -06:00
|
|
|
ToFile( "SYSTEM_HUNSPELL", "@SYSTEM_HUNSPELL@", "e" );
|
2006-01-31 11:28:58 -06:00
|
|
|
ToFile( "HUNSPELL_CFLAGS", "@HUNSPELL_CFLAGS@", "e" );
|
2007-07-31 07:09:45 -05:00
|
|
|
ToFile( "HUNSPELL_LIBS", "@HUNSPELL_LIBS@", "e" );
|
2008-04-24 11:04:50 -05:00
|
|
|
ToFile( "SYSTEM_LPSOLVE", "@SYSTEM_LPSOLVE@", "e" );
|
2010-05-25 04:56:39 -05:00
|
|
|
ToFile( "HAVE_GETOPT", "@HAVE_GETOPT@", "e" );
|
|
|
|
ToFile( "HAVE_READDIR_R", "@HAVE_READDIR_R@", "e" );
|
|
|
|
ToFile( "SYSTEM_LIBC", "@SYSTEM_LIBC@", "e" );
|
2005-06-17 03:24:42 -05:00
|
|
|
ToFile( "SYSTEM_HYPH", "@SYSTEM_HYPH@", "e" );
|
2007-12-12 06:25:13 -06:00
|
|
|
ToFile( "HYPHEN_LIB", "@HYPHEN_LIB@", "e" );
|
2005-06-17 03:24:42 -05:00
|
|
|
ToFile( "SYSTEM_MYTHES", "@SYSTEM_MYTHES@", "e" );
|
2010-04-27 10:16:50 -05:00
|
|
|
ToFile( "MYTHES_CFLAGS", "@MYTHES_CFLAGS@", "e" );
|
|
|
|
ToFile( "MYTHES_LIBS", "@MYTHES_LIBS@", "e" );
|
2010-10-05 05:05:39 -05:00
|
|
|
ToFile( "SYSTEM_LIBTEXTCAT", "@SYSTEM_LIBTEXTCAT@","e" );
|
|
|
|
ToFile( "SYSTEM_LIBTEXTCAT_DATA","@SYSTEM_LIBTEXTCAT_DATA@","e" );
|
2007-01-22 23:35:28 -06:00
|
|
|
ToFile( "XAU_LIBS", "@XAU_LIBS@", "e" );
|
2008-02-04 05:56:11 -06:00
|
|
|
ToFile( "GXX_INCLUDE_PATH", PathFormat("@GXX_INCLUDE_PATH@"), "e" );
|
2003-07-16 11:25:06 -05:00
|
|
|
ToFile( "COMMON_BUILD_TOOLS",$COMMON_BUILD_TOOLS, "e" );
|
2011-05-19 14:52:01 -05:00
|
|
|
|
2011-04-15 05:36:58 -05:00
|
|
|
if ($platform !~ m/cygwin/) {
|
2010-08-26 02:41:21 -05:00
|
|
|
if ( !defined $ENV{"TMPDIR"} || $ENV{"TMPDIR"} eq "" ) {
|
2009-08-06 10:00:07 -05:00
|
|
|
ToFile( "TMPDIR", "/tmp", "e" );
|
|
|
|
} else {
|
|
|
|
ToFile( "TMPDIR", "$ENV{'TMPDIR'}", "e" );
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2004-07-13 09:43:01 -05:00
|
|
|
ToFile( "SOLARSRC", $SOLARSRC, "e" );
|
2011-02-01 08:43:35 -06:00
|
|
|
ToFile( "gb_REPOS", $gb_REPOS, "e" );
|
|
|
|
|
2005-03-07 10:28:47 -06:00
|
|
|
if ( $platform =~ m/cygwin/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
2008-02-04 05:56:11 -06:00
|
|
|
ToFile( "ILIB", $ILIB, "e" );
|
2007-03-27 04:20:09 -05:00
|
|
|
if ( $MINGW eq "yes" )
|
2008-02-04 05:56:11 -06:00
|
|
|
{ ToFile( "ATL_INCLUDE", $ATL_INCLUDE, "e" );
|
2009-08-26 01:36:38 -05:00
|
|
|
ToFile( "EXCEPTIONS", "@EXCEPTIONS@", "e" );
|
2008-02-04 05:56:11 -06:00
|
|
|
ToFile( "DIRECTXSDK_HOME", PathFormat("@DIRECTXSDK_HOME@"), "e" );
|
2008-03-05 09:37:05 -06:00
|
|
|
ToFile( "USE_MINGW", $USE_MINGW, "e" );
|
2009-08-26 01:36:38 -05:00
|
|
|
ToFile( "MINGW_CLIB_DIR", PathFormat("@MINGW_CLIB_DIR@"), "e" );
|
|
|
|
ToFile( "MINGW_SHARED_GCCLIB", "@MINGW_SHARED_GCCLIB@", "e" );
|
|
|
|
ToFile( "MINGW_GCCLIB_EH", "@MINGW_GCCLIB_EH@", "e" );
|
|
|
|
ToFile( "MINGW_SHARED_GXXLIB", "@MINGW_SHARED_GXXLIB@", "e" );
|
2011-01-06 06:56:21 -06:00
|
|
|
ToFile( "MINGW_SHARED_LIBSTDCPP", "@MINGW_SHARED_LIBSTDCPP@", "e" );
|
2009-08-26 01:36:38 -05:00
|
|
|
ToFile( "MINGW_GCCDLL", "@MINGW_GCCDLL@", "e" );
|
|
|
|
ToFile( "MINGW_GXXDLL", "@MINGW_GXXDLL@", "e" );
|
2008-03-05 09:37:05 -06:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "GREP", $WIN_GREP, "e" );
|
|
|
|
ToFile( "FIND", $WIN_FIND, "e" );
|
|
|
|
ToFile( "LS", $WIN_LS, "e" );
|
|
|
|
ToFile( "GNUCOPY", $WIN_GNUCOPY, "e" );
|
|
|
|
ToFile( "TOUCH", $WIN_TOUCH, "e" );
|
|
|
|
}
|
2010-10-14 02:53:40 -05:00
|
|
|
|
2011-04-15 05:36:58 -05:00
|
|
|
ToFile( "DELIVER", "deliver.pl", "e" );
|
|
|
|
ToFile( "MKOUT", "mkout.pl", "e" );
|
|
|
|
ToFile( "ZIPDEP", "zipdep.pl", "e" );
|
2006-05-04 03:25:34 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# Writing the aliases to file.
|
|
|
|
ToFile( "Aliases.", $empty, "c" );
|
2006-07-19 03:36:45 -05:00
|
|
|
ToFile( "Don't set aliases when bootstrapping", $empty, "c" );
|
|
|
|
ToFile( "if test -z \"\$_ISBOOTSTRAP_\"; then", $empty, "z");
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "alias mkout", $mkout, "a" );
|
|
|
|
ToFile( "alias deliver", $deliver, "a" );
|
|
|
|
ToFile( "alias build", $build, "a" );
|
2007-05-09 07:27:09 -05:00
|
|
|
ToFile( "alias build_client",$build_client, "a" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "alias zipdep", $zipdep, "a" );
|
2005-03-07 10:28:47 -06:00
|
|
|
if ( $platform !~ m/cygwin/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ ToFile( "alias nmake", $nmake, "a" );
|
|
|
|
}
|
|
|
|
|
2006-07-19 03:36:45 -05:00
|
|
|
ToFile( "fi", $empty, "z");
|
|
|
|
|
2009-10-26 10:04:03 -05:00
|
|
|
# Check if the right dmake version is used. (W32 only)
|
|
|
|
if ( $platform =~ m/cygwin/ ) {
|
2006-01-06 04:17:44 -06:00
|
|
|
ToFile( "Check if the right dmake version is used.", $empty, "c" );
|
|
|
|
# Invalidate build environment.
|
|
|
|
ToFile( "WORK_STAMP", "_invalid_", "e" );
|
|
|
|
# Restore valid environment if test was successful.
|
|
|
|
ToFile( "WORK_STAMP", $WORK_STAMP, "e" );
|
|
|
|
ToFile( "", $empty, "n");
|
|
|
|
}
|
|
|
|
|
2005-05-31 11:03:33 -05:00
|
|
|
# on Solaris, MacOSX and FreeBSD, set GNUCOPY and GNUPATCH
|
|
|
|
if ($platform =~ m/solaris|darwin|freebsd/)
|
2003-07-16 11:25:06 -05:00
|
|
|
{
|
|
|
|
ToFile( "GNUPATCH", "@GNUPATCH@", "e");
|
|
|
|
}
|
2011-01-31 11:35:25 -06:00
|
|
|
ToFile( "GNUCOPY", "@GNUCP@", "e");
|
2005-05-13 01:30:21 -05:00
|
|
|
ToFile( "SAL_ENABLE_FILE_LOCKING", "1", "e");
|
2010-10-14 06:54:29 -05:00
|
|
|
|
|
|
|
ToFile( "ENV_SCRIPT", "$outfile", "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# Writing unset variables you might not need to file.
|
2010-10-14 02:53:40 -05:00
|
|
|
#
|
2010-11-02 03:38:48 -05:00
|
|
|
print OUT "export $exportvars$newline";
|
|
|
|
print OUT "unset $unsetvars$newline";
|
2006-05-04 03:25:34 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#---------------------------
|
|
|
|
# VIII. Closing output file.
|
|
|
|
#---------------------------
|
|
|
|
#
|
|
|
|
close( OUT ) || print "Can't close $outfile: $!";
|
2006-05-04 03:25:34 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#------------------------------
|
|
|
|
# IX. Sourcing the output file.
|
|
|
|
#------------------------------
|
|
|
|
#
|
|
|
|
#---------------------------------
|
|
|
|
# X. Set up the build environment.
|
|
|
|
#---------------------------------
|
|
|
|
#
|
|
|
|
#--------------------------------------------------------
|
|
|
|
# XI. Moving the output file to the build home directory.
|
|
|
|
#--------------------------------------------------------
|
|
|
|
#
|
|
|
|
$tmp = $SRC_ROOT.$ds.$outfile;
|
|
|
|
if (rename( $outfile, $tmp ) ne 1)
|
|
|
|
{ `mv -f $outfile $tmp`;
|
|
|
|
}
|
2006-05-04 03:25:34 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#--------------------------------------------------------
|
|
|
|
# XII. Message at the end.
|
|
|
|
#--------------------------------------------------------
|
|
|
|
#
|
|
|
|
#
|
2010-08-26 02:41:21 -05:00
|
|
|
print "$newline";
|
2002-08-27 05:31:48 -05:00
|
|
|
print "*********************************************************".
|
2010-11-10 07:10:40 -06:00
|
|
|
"*******************$newline*$newline";
|
2010-11-16 08:34:09 -06:00
|
|
|
print "* LibreOffice configuration finished. $newline*$newline";
|
2002-08-27 05:31:48 -05:00
|
|
|
|
2010-10-14 02:53:40 -05:00
|
|
|
if ( $Warning ne "" )
|
2010-11-10 07:10:40 -06:00
|
|
|
{ print "$Warning*$newline";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
print "*********************************************************".
|
|
|
|
"******************* $newline";
|
|
|
|
|
2011-05-23 02:24:04 -05:00
|
|
|
print "To build, issue:\n$GNUMAKE\n\n";
|
|
|
|
print "To install when the build is finished, issue:\n$GNUMAKE install\n\n";
|
|
|
|
print "If you want to develop LibreOffice, you might prefer:\n$GNUMAKE dev-install\n\n";
|
|
|
|
print "If you want to run the smoketest, issue:\n$GNUMAKE check\n\n";
|
2010-08-20 09:43:34 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
$bootfile = "bootstrap";
|
|
|
|
open( OUT, ">$bootfile" ) ||
|
|
|
|
die "Cannot open $bootfile: $!\n";
|
2006-07-05 16:32:39 -05:00
|
|
|
print OUT "#!/bin/sh\n";
|
2010-11-02 03:38:48 -05:00
|
|
|
print OUT "_ISBOOTSTRAP_=TRUE ; export _ISBOOTSTRAP_ ; . $SRC_ROOT/$outfile\n";
|
2010-10-14 02:53:40 -05:00
|
|
|
print OUT "unset _ISBOOTSTRAP_; export _ISBOOTSTRAP_\n";
|
2007-03-27 04:20:09 -05:00
|
|
|
if ( $MINGW eq "yes" )
|
|
|
|
{ print OUT 'PATH="/usr/bin:$PATH" : export PATH'."\n"; }
|
2002-08-27 05:31:48 -05:00
|
|
|
close( OUT ) || print "Can't close $bootfile: $!";
|
|
|
|
system(`cat bootstrap.1 >> bootstrap`);
|
|
|
|
system(`chmod +x bootstrap`);
|
|
|
|
#
|
|
|
|
#--------------------------------------------------------
|
|
|
|
# Moving the bootstrap file to the build home directory.
|
|
|
|
#--------------------------------------------------------
|
|
|
|
#
|
|
|
|
$tmp = $SRC_ROOT.$ds.$bootfile;
|
|
|
|
if (rename( $bootfile, $tmp ) ne 1)
|
|
|
|
{ `mv -f $bootfile $tmp`;
|
|
|
|
}
|
2002-10-22 07:24:17 -05:00
|
|
|
|
2003-06-12 04:16:12 -05:00
|
|
|
if ( $Warning ne "" ) {
|
2006-12-01 07:53:16 -06:00
|
|
|
print "***** WARNINGS ISSUED *****\n";
|
2003-06-12 04:16:12 -05:00
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#-----------------
|
|
|
|
# XII. Functions.
|
|
|
|
#-----------------
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------
|
2010-10-14 02:53:40 -05:00
|
|
|
# Function name: CheckPathName
|
2002-08-27 05:31:48 -05:00
|
|
|
# Description: chops off the '/' character if it's the last
|
|
|
|
# character in a pathname. also adds the '/'
|
|
|
|
# character if it's not the first character
|
|
|
|
# in a path.
|
|
|
|
# Arguments: 1. Path (string)
|
|
|
|
# Return value: Path (string)
|
|
|
|
#-------------------------------------------------------------
|
2010-10-14 02:53:40 -05:00
|
|
|
sub CheckPathName
|
2002-08-27 05:31:48 -05:00
|
|
|
{ my $retrn = $_[ 0 ];
|
2009-10-26 10:04:03 -05:00
|
|
|
if ($platform =~ m/cygwin/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ # Check if the first character is not a '/'.
|
2010-10-14 02:53:40 -05:00
|
|
|
if ( !( $_[ 0 ] =~ /^\// ) )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $retrn = $ds.$_[ 0 ];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
# kill the last '/','\','\n' if they exists.
|
|
|
|
$retrn =~ s![\s/\\]+$!!;
|
|
|
|
# Done!
|
|
|
|
return( $retrn );
|
|
|
|
}
|
|
|
|
#-------------------------------------------------------------
|
2010-10-14 02:53:40 -05:00
|
|
|
# Function name: CheckPathExist
|
2002-08-27 05:31:48 -05:00
|
|
|
# Description: Checks whether the directory that is given
|
2005-03-08 09:35:34 -06:00
|
|
|
# as an argument exists. If not abort.
|
2002-08-27 05:31:48 -05:00
|
|
|
# Arguments: 1. Path (string)
|
|
|
|
# Return value: void
|
|
|
|
#-------------------------------------------------------------
|
2010-10-14 02:53:40 -05:00
|
|
|
sub CheckPathExist
|
2002-08-27 05:31:48 -05:00
|
|
|
{ my $dir = $_[ 0 ];
|
2005-03-08 09:35:34 -06:00
|
|
|
if ( !( -d $dir ) and $^O ne 'MSWin32' )
|
|
|
|
{ print ( "The directory $_[ 0 ] does not exist. Please create first.\n" );
|
|
|
|
exit 1;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
else
|
2005-03-08 09:35:34 -06:00
|
|
|
{ # Don't check under ActiveState Perl (Windows). The path is possibly
|
|
|
|
# posix and it cannot handle it.
|
|
|
|
return "true";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#------------------------------------------------------------
|
2010-10-14 02:53:40 -05:00
|
|
|
# Function name: CreateFileHeader
|
2002-08-27 05:31:48 -05:00
|
|
|
# Description: Creates a header for the outfile.
|
2002-10-22 07:24:17 -05:00
|
|
|
# Arguments: 1. File to write to
|
|
|
|
# 2. UPD (string)
|
|
|
|
# 3. Platform (string)
|
|
|
|
# 4. name of shell for this file
|
2003-03-19 09:03:25 -06:00
|
|
|
# 5. comment to use for this file
|
2002-08-27 05:31:48 -05:00
|
|
|
# Return value: void
|
|
|
|
#------------------------------------------------------------
|
2010-10-14 02:53:40 -05:00
|
|
|
sub CreateFileHeader
|
2002-08-27 05:31:48 -05:00
|
|
|
{ my $timestamp = `date`;
|
|
|
|
chomp( $timestamp );
|
2002-10-22 07:24:17 -05:00
|
|
|
my $filehandle = $_[0];
|
2003-03-19 09:03:25 -06:00
|
|
|
my $comment = $_[4];
|
2010-10-14 02:53:40 -05:00
|
|
|
print { $filehandle } "$comment #################################################################";
|
2002-10-22 07:24:17 -05:00
|
|
|
print { $filehandle } $newline;
|
2010-10-14 02:53:40 -05:00
|
|
|
print { $filehandle } "$comment LibreOffice $_[ 1 ] build environment file for: $_[ 2 ]. $newline";
|
|
|
|
print { $filehandle } "$comment Generated on: $timestamp $newline";
|
|
|
|
print { $filehandle } "$comment Source this file to set up the build environment. $newline";
|
|
|
|
print { $filehandle } "$comment 1. exec $_[3] $newline";
|
|
|
|
print { $filehandle } "$comment 2. source $outfile $newline";
|
|
|
|
print { $filehandle } "$comment #################################################################";
|
2002-10-22 07:24:17 -05:00
|
|
|
print { $filehandle } $newline;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
#---------------------------------------------------------
|
2006-05-04 03:25:34 -05:00
|
|
|
# Function name: ToFile
|
2002-08-27 05:31:48 -05:00
|
|
|
# Description: Writes the environment variable in the
|
2006-05-04 03:25:34 -05:00
|
|
|
# output file.
|
2002-08-27 05:31:48 -05:00
|
|
|
# Arguments: 1. Name of environment variable (string)
|
|
|
|
# 2. Value of environment variable (string)
|
2006-05-04 03:25:34 -05:00
|
|
|
# 3. e - env. var
|
|
|
|
# a - alias
|
|
|
|
# c - comment
|
|
|
|
# n - newline
|
2010-11-02 03:38:48 -05:00
|
|
|
# z - raw, write as is to OUT
|
2002-08-27 05:31:48 -05:00
|
|
|
# Return value: void
|
|
|
|
#---------------------------------------------------------
|
2006-05-04 03:25:34 -05:00
|
|
|
sub ToFile {
|
|
|
|
if ( $_[ 2 ] eq "e" ) {
|
|
|
|
# Write an environment variable to file.
|
|
|
|
if (defined $_[ 1 ] && $_[ 1 ] ne "" ) {
|
|
|
|
my $envvar = $_[ 1 ];
|
2007-12-12 08:37:11 -06:00
|
|
|
|
|
|
|
# Tcsh/bash needs backslashes quoted
|
|
|
|
$envvar =~ s/\\/\\\\/g;
|
|
|
|
|
2010-08-26 02:41:21 -05:00
|
|
|
printf("%-12s %-17s %-10s %s\n", "The variable", $_[ 0 ], "is set to:", $envvar) if ( '@VERBOSE@' eq 'TRUE' );
|
2010-11-02 03:38:48 -05:00
|
|
|
print OUT "$_[ 0 ]=\"$envvar\"$newline"; # to sh file
|
2006-05-04 03:25:34 -05:00
|
|
|
$exportvars .= " $_[ 0 ]"; # add to export list for sh file
|
2007-12-12 08:37:11 -06:00
|
|
|
|
2006-05-04 03:25:34 -05:00
|
|
|
} else {
|
2010-08-26 02:41:21 -05:00
|
|
|
printf("%-12s %-17s %-10s %s\n", "The variable", $_[ 0 ], "is set to:", "unset") if ( '@VERBOSE@' eq 'TRUE' );
|
2010-11-02 03:38:48 -05:00
|
|
|
$unsetvars .= " $_[ 0 ]"; # for sh file
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
}
|
2010-10-14 02:53:40 -05:00
|
|
|
elsif ( $_[ 2 ] eq "a" )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ # Write an alias to file.
|
2010-08-26 02:41:21 -05:00
|
|
|
print "The $_[ 0 ] is set to: $_[ 1 ]\n" if ( '@VERBOSE@' eq 'TRUE' ); # to stdout
|
2010-11-02 03:38:48 -05:00
|
|
|
print OUT "$_[ 0 ]=$_[ 1 ]$newline"; # to sh file
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2010-10-14 02:53:40 -05:00
|
|
|
elsif ( $_[ 2 ] eq "c" )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ # Write a comment to file.
|
2010-08-26 02:41:21 -05:00
|
|
|
if ( '@VERBOSE@' eq 'TRUE' )
|
|
|
|
{
|
|
|
|
print "$newline";
|
|
|
|
print "$comment$newline";
|
|
|
|
print "$comment $_[ 0 ]$newline";
|
|
|
|
print "$comment$newline";
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
print OUT "$newline";
|
2006-05-04 03:25:34 -05:00
|
|
|
print OUT "$comment$newline";
|
|
|
|
print OUT "$comment $_[ 0 ]$newline";
|
|
|
|
print OUT "$comment$newline";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2006-05-04 03:25:34 -05:00
|
|
|
elsif ( $_[ 2 ] eq "n" )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ #Write a newline to a file
|
|
|
|
print OUT "$newline";
|
2006-07-19 03:36:45 -05:00
|
|
|
}
|
|
|
|
elsif ( $_[ 2 ] eq "z" )
|
|
|
|
{
|
|
|
|
#Write first argument as is, and nothing else
|
2010-11-02 03:38:48 -05:00
|
|
|
print OUT "$_[ 0 ]$newline";
|
2006-05-04 03:25:34 -05:00
|
|
|
}
|
2007-12-12 08:37:11 -06:00
|
|
|
else
|
|
|
|
{ print "Unknown type!$newline";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#----------------------------------------------------------
|
|
|
|
# Function name: PathFormat
|
|
|
|
# Description: Reformat path to either POSIX or mixed mode style.
|
|
|
|
# Arguments: 1. Variable (string)
|
|
|
|
# Return value: Reformatted String
|
|
|
|
#----------------------------------------------------------
|
|
|
|
sub PathFormat
|
|
|
|
{ my ( $variable, $d1, $d2 );
|
|
|
|
$variable = $_[ 0 ];
|
2006-05-04 03:25:34 -05:00
|
|
|
|
2007-12-12 08:37:11 -06:00
|
|
|
if ( $platform =~ m/cygwin/ )
|
|
|
|
{ $variable =~ s/(\$\{?\w+\}?)/$1/eeg ; # expand the variables
|
|
|
|
$variable =~ s/(\$\{?\w+\}?)/$1/eeg ; # expand the variables twice!
|
2006-05-04 03:25:34 -05:00
|
|
|
|
2007-12-12 08:37:11 -06:00
|
|
|
# Complain if PosixPath is used on a PATH-like string
|
|
|
|
if ( $variable =~ m/;/ ) {
|
|
|
|
die( "Do not use on PATH lists (i.e., 'c:\\foo;d:\\bar')");
|
|
|
|
}
|
|
|
|
|
|
|
|
# Replace path with space with short dos path
|
|
|
|
if ( $variable =~ / / ) {
|
|
|
|
chomp( $variable = qx{cygpath -d "$variable"} ) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Replace absolute paths or DOS paths with ...
|
|
|
|
if ( ( $variable =~ m/^\// ) or ( $variable =~ m/:/ ) ) {
|
2008-03-05 09:37:05 -06:00
|
|
|
# mixed mode paths
|
2011-04-18 04:21:34 -05:00
|
|
|
chomp( $variable = qx{realpath "$variable"} ) unless ($variable =~ m/:/);
|
2008-03-05 09:37:05 -06:00
|
|
|
chomp( $variable = qx{cygpath -m "$variable"} );
|
2007-12-12 08:37:11 -06:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2007-12-12 08:37:11 -06:00
|
|
|
return $variable;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
#----------------------------------------------------------
|
2007-12-12 08:37:11 -06:00
|
|
|
# Function name: CygFormat
|
|
|
|
# Description: Format variables to cygwin posix style path
|
|
|
|
# unless .
|
2002-08-27 05:31:48 -05:00
|
|
|
# Arguments: 1. Variable (string)
|
|
|
|
# Return value: Reformatted String
|
|
|
|
#----------------------------------------------------------
|
2007-12-12 08:37:11 -06:00
|
|
|
sub CygFormat
|
2004-06-16 04:48:31 -05:00
|
|
|
{ my ( $variable, $d1, $d2 );
|
2002-08-27 05:31:48 -05:00
|
|
|
$variable = $_[ 0 ];
|
2005-03-07 10:28:47 -06:00
|
|
|
# ToDo: Do the replacement only if Windows and var contains "\" and ":"
|
2011-04-15 05:36:58 -05:00
|
|
|
if ( $platform =~ m/cygwin/ )
|
2007-12-12 08:37:11 -06:00
|
|
|
{
|
|
|
|
# Complain if PosixPath is used on a PATH-like string
|
|
|
|
if ( $variable =~ m/;/ ) {
|
|
|
|
die( "Do not use on PATH lists (i.e., 'c:\\foo;d:\\bar')");
|
|
|
|
}
|
|
|
|
|
|
|
|
# Replace DOS paths with posix paths
|
|
|
|
if ( ( $variable =~ m/\\/ ) or ( $variable =~ m/:/ ) ) {
|
|
|
|
chomp( $variable = qx{cygpath -u "$variable"} );
|
|
|
|
}
|
2007-11-02 07:05:24 -05:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
return $variable;
|
|
|
|
}
|
|
|
|
#----------------------------------------------------------
|
2007-12-12 08:37:11 -06:00
|
|
|
# Function name: WinFormat
|
2002-08-27 05:31:48 -05:00
|
|
|
# Description: Format variables to Windows Format.
|
|
|
|
# Arguments: 1. Variable (string)
|
|
|
|
# Return value: Reformatted String
|
|
|
|
#----------------------------------------------------------
|
2007-12-12 08:37:11 -06:00
|
|
|
sub WinFormat
|
|
|
|
{ my ( $variable, $d1 );
|
2002-08-27 05:31:48 -05:00
|
|
|
$variable = $_[ 0 ];
|
2002-10-22 07:24:17 -05:00
|
|
|
$variable =~ s/^\s+//g ; #remove leading spaces
|
|
|
|
$variable =~ s/\s+$//g ; #remove trailing spaces
|
|
|
|
$variable =~ s/(\$\{?\w+\}?)/$1/eeg ; # expand the variables
|
|
|
|
$variable =~ s/(\$\{?\w+\}?)/$1/eeg ; # expand the variables twice!
|
2002-08-27 05:31:48 -05:00
|
|
|
$variable =~ s/:+/:/g ; # remove multiple ;
|
|
|
|
|
2007-12-12 08:37:11 -06:00
|
|
|
# Some variables are already in DOS path format, return early.
|
|
|
|
if ( $variable =~ /\\/ ) {
|
|
|
|
return $variable;
|
|
|
|
}
|
|
|
|
if ( $variable eq ";" ) {
|
|
|
|
# Ignore single ';'
|
|
|
|
return $variable;
|
|
|
|
}
|
|
|
|
if ( $variable =~ /;/ and $variable =~ /\// ) {
|
|
|
|
# Mixed mode path-style entry, separated with ;, like CLASSPATH
|
|
|
|
return $variable;
|
2007-11-02 07:05:24 -05:00
|
|
|
}
|
|
|
|
|
2007-12-12 08:37:11 -06:00
|
|
|
# Search for posix path entry and replace with cygpath -w entry
|
|
|
|
# ( -d if filename contains space )
|
|
|
|
|
|
|
|
# Normal paths
|
|
|
|
|
|
|
|
# One special case is if "perl " is prepended.
|
|
|
|
$variable =~ /^(perl\s+)?(.*)$/;
|
|
|
|
my $perlpre = $1;
|
|
|
|
if ( !defined($perlpre) ) {
|
|
|
|
$perlpre = "";
|
|
|
|
}
|
|
|
|
$variable = $2;
|
|
|
|
|
|
|
|
if ( $variable =~ /^\/[\w\.~ ]+/ ) {
|
|
|
|
if ( $variable =~ / / ) {
|
|
|
|
# Use DOS 8.3 style to avoid quoting
|
|
|
|
chomp( $variable = qx{cygpath -d "$variable"} );
|
|
|
|
} else {
|
|
|
|
# Use "normal" filenames
|
|
|
|
chomp( $variable = qx{cygpath -w "$variable"} );
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2007-12-12 08:37:11 -06:00
|
|
|
} else {
|
|
|
|
# relative or absolute DOS paths here
|
|
|
|
$variable =~ s#/#\\#g;
|
|
|
|
}
|
|
|
|
|
|
|
|
$variable = $perlpre.$variable;
|
|
|
|
if ( ($perlpre ne "") && ($^O eq "cygwin")) {
|
|
|
|
# Cygwin's perl needs quoted backslashes
|
|
|
|
$variable =~ s#\\#\\\\#g;
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
return $variable;
|
|
|
|
}
|
2004-02-02 11:17:15 -06:00
|
|
|
|
2007-12-12 08:37:11 -06:00
|
|
|
#----------------------------------------------------------
|
|
|
|
# Function name: WinPath
|
|
|
|
# Description: Reformat a $sep seperated path using DOS paths.
|
|
|
|
# Arguments: 1. Variable (string)
|
|
|
|
# 2. Separaror (string)
|
|
|
|
# Return value: Reformatted String
|
|
|
|
#----------------------------------------------------------
|
|
|
|
sub WinPath
|
|
|
|
{
|
|
|
|
my ( $variable, $d1, $sep, @split_var );
|
|
|
|
|
|
|
|
if ( $platform =~ m/cygwin/ ) {
|
|
|
|
$variable = $_[ 0 ];
|
|
|
|
$sep = $_[ 1 ];
|
|
|
|
$variable =~ s/^\s+//g ; #remove leading spaces
|
|
|
|
$variable =~ s/\s+$//g ; #remove trailing spaces
|
|
|
|
$variable =~ s/(\$\{?\w+\}?)/$1/eeg ; # expand the variables
|
|
|
|
$variable =~ s/(\$\{?\w+\}?)/$1/eeg ; # expand the variables twice!
|
|
|
|
|
|
|
|
@split_var = split(/$sep/,$variable);
|
|
|
|
foreach $d1 ( @split_var ) {
|
|
|
|
if ( $d1 =~ /(?:^\/[\w\.~ ]+)+/ ) {
|
|
|
|
if ( $d1 =~ / / ) {
|
|
|
|
# Use DOS 8.3 style to avoid quoting
|
|
|
|
chomp( $d1 = qx{cygpath -d "$d1"} );
|
|
|
|
} else {
|
|
|
|
# Use "normal" filenames
|
|
|
|
chomp( $d1 = qx{cygpath -w "$d1"} );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$variable = join(';',@split_var);
|
|
|
|
|
|
|
|
$variable =~ s/\//\\/g; # Remaining \ come from e.g.: ../foo/baa
|
|
|
|
}
|
|
|
|
|
|
|
|
return $variable;
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#--------------------------------------------------------
|
|
|
|
# Function name: GetCorrectPath
|
2010-10-14 02:53:40 -05:00
|
|
|
# Description: Creates the build environment.
|
2004-02-02 11:17:15 -06:00
|
|
|
# Arguments: 1. existing / original path
|
|
|
|
# 2... pairs of <path, executable>
|
2002-08-27 05:31:48 -05:00
|
|
|
# Return value: String - Correct Path
|
|
|
|
#--------------------------------------------------------
|
2004-02-02 11:17:15 -06:00
|
|
|
sub GetCorrectPath
|
|
|
|
{
|
|
|
|
sub PathLookup
|
|
|
|
{
|
|
|
|
my $cmd = shift;
|
|
|
|
while (@_) {
|
|
|
|
my $elem = shift;
|
|
|
|
|
|
|
|
-x "$elem/$cmd" && return $elem;
|
|
|
|
}
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
|
|
|
|
sub SaneGrep
|
|
|
|
{
|
|
|
|
# Perl grep is unbelievably strange.
|
|
|
|
my $needle = shift;
|
2004-02-25 06:50:35 -06:00
|
|
|
while (@_) {
|
|
|
|
my $haystack = shift;
|
2004-02-02 11:17:15 -06:00
|
|
|
if ($needle eq $haystack) {
|
|
|
|
return 1;
|
2010-10-14 02:53:40 -05:00
|
|
|
}
|
2004-02-02 11:17:15 -06:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
sub CleanupPath
|
|
|
|
{
|
|
|
|
my @elements = @_;
|
|
|
|
my @cleanName = ();
|
|
|
|
|
2004-02-25 06:50:35 -06:00
|
|
|
while (@elements) {
|
|
|
|
my $elem = shift @elements;
|
2004-02-02 11:17:15 -06:00
|
|
|
if (!SaneGrep ($elem, @cleanName)) {
|
|
|
|
push @cleanName, $elem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return @cleanName;
|
|
|
|
}
|
|
|
|
|
|
|
|
my $oldPath = shift;
|
|
|
|
my @originalPairs = @_;
|
|
|
|
my @pairs = @originalPairs;
|
|
|
|
my @Path = split /$ps/, $oldPath;
|
|
|
|
|
|
|
|
while (@pairs) {
|
|
|
|
my $path = shift @pairs;
|
|
|
|
my $cmd = shift @pairs;
|
|
|
|
my $to_append = 1;
|
|
|
|
my $elem;
|
|
|
|
|
|
|
|
if (! -x "$path/$cmd") {
|
|
|
|
AddWarning ("Missing executable $path/$cmd\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
for $elem (@Path) {
|
|
|
|
if ($elem eq $path) {
|
|
|
|
# print "Hit duplicate path in path; break\n";
|
|
|
|
$to_append = 0;
|
|
|
|
last;
|
|
|
|
}
|
|
|
|
if (-f "$elem/$cmd") {
|
|
|
|
# print "Element already in path ...\n";
|
|
|
|
unshift @Path, $path;
|
|
|
|
$to_append = 0;
|
|
|
|
last;
|
|
|
|
} else {
|
|
|
|
# print "No file $elem/$cmd\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($to_append) {
|
|
|
|
push @Path, $path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@pairs = @originalPairs;
|
|
|
|
while (@pairs) {
|
|
|
|
my $path = shift @pairs;
|
|
|
|
my $cmd = shift @pairs;
|
|
|
|
my $realpath;
|
|
|
|
|
|
|
|
$realpath = PathLookup ($cmd, @Path);
|
|
|
|
if (!($realpath eq $path)) {
|
|
|
|
AddWarning ("Path conflict for executables " .
|
|
|
|
"$path/$cmd against $realpath");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return join $ps, CleanupPath (@Path);
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2004-02-02 11:17:15 -06:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#------------------------------------------------------------
|
2010-10-14 02:53:40 -05:00
|
|
|
# Function name: AddWarning
|
2002-08-27 05:31:48 -05:00
|
|
|
# Description: Adds any kind of warning for the user.
|
|
|
|
# The warning will be shown at the end
|
|
|
|
# of this script.
|
|
|
|
# Arguments: 1. Add the configure warnings or the set_soenv
|
|
|
|
# warning (string).
|
|
|
|
# 2. Warning (string).
|
|
|
|
# Return value: void
|
|
|
|
#------------------------------------------------------------
|
2010-10-14 02:53:40 -05:00
|
|
|
sub AddWarning
|
|
|
|
{ if ( $_[ 0 ] eq "configure" )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ open( IN, $warnfile );
|
2010-10-14 02:53:40 -05:00
|
|
|
while ( <IN> )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $Warning = $Warning."* - ".$_;
|
|
|
|
}
|
|
|
|
close( IN );
|
|
|
|
# Remove the temporary warning file.
|
|
|
|
# unlink ( $warnfile );
|
|
|
|
}
|
2010-10-14 02:53:40 -05:00
|
|
|
elsif ( $_[ 0 ] eq "set_soenv" )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ my ( $arg1 );
|
|
|
|
$arg1 = $_[ 1 ];
|
2010-10-14 02:53:40 -05:00
|
|
|
chomp( $arg1 ); # cut off new line
|
|
|
|
$Warning = $Warning."* - set_soenv: warning: $arg1 $newline"; # add the warning
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
}
|
2011-01-12 10:48:18 -06:00
|
|
|
|
|
|
|
# vim:set shiftwidth=4 softtabstop=4 expandtab: #
|