Commit 4937c5d9 authored by Patrick Brunschwig's avatar Patrick Brunschwig

removed tests and config stuff for C-Compiler and other binary-related

code
parent 9c0b7aea
......@@ -17,53 +17,6 @@ ifeq ($(TESTS),yes)
DIRS += check
endif
PLATFORM_STR = unknown
# Edit the lines below as needed, depending upon your platform(s)
ifeq ($(OS_TARGET),Linux)
PLATFORM_STR = linux
endif
ifeq ($(OS_TARGET),WIN95)
PLATFORM_STR = win32
endif
ifeq ($(OS_TARGET),WINNT)
PLATFORM_STR = win32
endif
ifeq ($(OS_CONFIG),SunOS)
PLATFORM_STR = sunos5
endif
ifeq ($(OS_TARGET),Darwin)
PLATFORM_STR = darwin
endif
ifeq ($(OS_TARGET),dragonfly)
PLATFORM_STR = DragonFly
endif
ifeq ($(OS_TARGET),FreeBSD)
PLATFORM_STR = freebsd
endif
ifeq ($(OS_TARGET),NetBSD)
PLATFORM_STR = netbsd
endif
ifeq ($(OS_TARGET),OpenBSD)
PLATFORM_STR = openbsd
endif
ifeq ($(OS_TARGET),OS2)
PLATFORM_STR = os2
endif
ifeq ($(OS_TARGET),OSF1)
PLATFORM_STR = osf1
endif
XPIFILE = $(XPI_MODULE)-$(XPI_MODULE_VERS).xpi
.PHONY: dirs $(DIRS)
......@@ -76,7 +29,7 @@ $(DIRS):
$(MAKE) -C $@
xpi:
$(srcdir)/util/genxpi $(XPIFILE) $(XPI_MODULE_VERS) $(OS_TARGET) $(CPU_ARCH) $(DIST) $(srcdir) $(XPI_MODULE) $(DLL_SUFFIX) $(DLL_PREFIX) $(ENABLE_LANG)
$(srcdir)/util/genxpi $(XPIFILE) $(XPI_MODULE_VERS) $(DIST) $(srcdir) $(XPI_MODULE) $(ENABLE_LANG)
check:
util/checkFiles.py
......
# @configure_input@
CC = @CC@
PERL = @PERL@
PYTHON = @PYTHON@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
OS_TARGET = @BUILD_OS_ARCH@
CPU_ARCH = @BUILD_TARGET_CPU@
DLL_PREFIX = @DLL_PREFIX@
DLL_SUFFIX = @DLL_SUFFIX@
TB_PATH = "@TB_PATH@"
TB_ARGS = @TB_ARGS@
......
#!/usr/bin/env perl
# Determin Target OS name and CPU type as used by Mozilla
# based on input from autoconf / configure
# usage:
# -c|-o|-dp|-ds target_os target_cpu compiler
#
# -c : CPU and compiler type
# -o : OS type
# -dp : DLL prefix (e.g. "lib" on many Unix systems)
# -ds : DLL suffix (e.g. ".so" on many Unix systems)
use File::Basename;
if ($#ARGV != 3) {
exit (1);
}
my $srcOs = $ARGV[1];
my $srcCpu = $ARGV[2];
my $srcComp = basename($ARGV[3]);
my $targetOs = "";
my $targetCpu = "";
my $targetComp = "";
my $dllPrefix = "";
my $dllSuffix = "";
# determine OS-Name
if ($srcOs =~ /^darwin/i) {
$targetOs = "Darwin";
}
elsif ($srcOs =~ /linux/i) {
$targetOs = "Linux";
}
elsif ($srcOs =~ /FreeBSD/i) {
$targetOs = "FreeBSD";
}
elsif ($srcOs =~ /DragonFly/i) {
$targetOs = "DragonFly";
}
elsif ($srcOs =~ /OpenBSD/i) {
$targetOs = "OpenBSD";
}
elsif ($srcOs =~ /NetBSD/i) {
$targetOs = "NetBSD";
}
elsif ($srcOs =~ /OS2/i) {
$targetOs = "OS2";
}
elsif ($srcOs =~ /aix/i) {
$targetOs = "AIX";
}
elsif ($srcOs =~ /beos/i) {
$targetOs = "BeOS";
}
elsif ($srcOs =~ /irix/i) {
$targetOs = "IRIX64";
}
elsif ($srcOs =~ /hpux/i) {
$targetOs = "HP-UX";
}
elsif ($srcOs =~ /(sun|solaris)/i) {
$targetOs = "SunOS";
}
elsif ($srcOs =~ /(mingw|win)/i) {
$targetOs = "WINNT";
}
else {
$targetOs = $srcOs;
}
# determine CPU
if ($srcCpu =~ /x86[_-]64/i) {
$targetCpu = "x86_64";
}
elsif ($srcCpu =~ /i[3456]86/i) {
$targetCpu = "x86";
}
elsif ($srcCpu =~ /p(?:ower)?pc64/i) {
$targetCpu = "ppc64";
}
elsif ($srcCpu =~ /ppc/i) {
$targetCpu = "ppc";
}
elsif ($srcCpu =~ /powerpc/i) {
$targetCpu = "ppc";
}
elsif ($srcCpu =~ /alpha/i) {
$targetCpu = "Alpha";
}
elsif ($srcCpu =~ /sparc/i) {
$targetCpu = "sparc";
}
elsif ($srcCpu =~ /ia64/i) {
$targetCpu = "ia64";
}
elsif ($srcCpu =~ /arm/i) {
$targetCpu = "arm-eabi";
}
elsif ($srcCpu =~ /mips/i) {
$targetCpu = "mips";
}
else {
$targetCpu = $srcCpu;
}
# determine Compiler
if ($targetOs eq "WINNT") {
$targetComp = "msvc";
}
elsif ($srcComp =~ /gcc/ || $srcComp =~ /clang/) {
$targetComp = "gcc3";
}
elsif ($srcComp =~ /cc/) {
if ($targetOs eq "SunOS") {
$targetComp = "sunc";
}
elsif ($targetOs eq "AIX") {
$targetComp = "ibmc";
}
else {
$targetComp = "gcc3";
}
}
else {
$targetComp = $srcComp;
}
# determine DLL prefix
if ($targetOs eq "WINNT") {
$dllSuffix = ".dll";
}
elsif ($targetOs eq "Darwin") {
$dllPrefix = "lib";
$dllSuffix = ".dylib";
}
else {
$dllPrefix = "lib";
$dllSuffix = ".so";
}
if ($ARGV[0] =~ /^-o$/i) {
printf ($targetOs);
}
elsif ($ARGV[0] =~ /^-c$/i) {
printf ("%s-%s", $targetCpu, $targetComp);
}
elsif ($ARGV[0] =~ /^-dp$/i) {
printf ($dllPrefix);
}
elsif ($ARGV[0] =~ /^-ds$/i) {
printf ($dllSuffix);
}
else {
exit(1);
}
This diff is collapsed.
......@@ -22,11 +22,6 @@ if test "x$PERL" = "x" ; then
AC_MSG_ERROR([[Perl not found.]])
fi
AC_PROG_CC
if test "x$ac_cv_prog_cc_c89" = "xno" ; then
AC_MSG_ERROR([[No C-89 compiler found]])
fi
AC_CANONICAL_TARGET
# Enable running of unit test during build
......@@ -44,17 +39,6 @@ AC_ARG_ENABLE(lang,
)
changequote(,)dnl
BUILD_OS_ARCH=`$PERL config/getOsTarget.pl -o "$target_os" "$target_cpu" "$CC"`
BUILD_TARGET_CPU=`$PERL config/getOsTarget.pl -c "$target_os" "$target_cpu" "$CC"`
DLL_PREFIX=`$PERL config/getOsTarget.pl -dp "$target_os" "$target_cpu" "$CC"`
DLL_SUFFIX=`$PERL config/getOsTarget.pl -ds "$target_os" "$target_cpu" "$CC"`
changequote([,])dnl
AC_SUBST(BUILD_OS_ARCH)
AC_SUBST(BUILD_TARGET_CPU)
AC_SUBST(DLL_PREFIX)
AC_SUBST(DLL_SUFFIX)
AC_SUBST(enable_tests)
AC_SUBST(enable_lang)
......
......@@ -38,36 +38,27 @@
# This script generates the Enigmail XPI
#
echo "genxpi: Generating $1 in $5"
echo "genxpi: Generating $1 in $3"
if [ $# -lt 8 ]; then
if [ $# -lt 5 ]; then
echo "Wrong number of parameters"
exit 1
fi
xpiFile=$1
xpiVersion="$2"
osArch=$3
xpcomAbi=$4
srcDir=$6
xpiModule=$7
dllSuffix=$8
libPrefix=${9}
enableLang=${10}
distDir="$3"
srcDir=$4
xpiModule=$5
enableLang=$6
cd ${srcDir}
cwd=`pwd`
cd "$5"
cd "$distDir"
targetDir=`pwd`
cd "$cwd"
if [ "$xpcomAbi" = "" ] ; then
xpcomAbi="unknown"
fi
platform=${osArch}_${xpcomAbi}
escplatform="$(printf "%s" "${platform}" | sed 's_/_\\/_g')"
# Pepare install.rdf
sed 's/<!-- targetPlatform placeholder -->/<em:targetPlatform>'${escplatform}'<\/em:targetPlatform>/' < ${srcDir}/package/install.rdf > ${targetDir}/install.rdf
cp ${srcDir}/package/install.rdf ${targetDir}/install.rdf
# Prepare chrome.manifest
cat ${srcDir}/package/chrome.manifest \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment