summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-10-01 16:50:35 +0200
committerAndras Timar <atimar@suse.com>2012-10-01 17:16:47 +0200
commite4080dce647edfcec832164fcfb56cb36e220e27 (patch)
treebcfa37978d4fad1cf5fd82c8e0e1a0ab1db6fb93
parent968ed85d7304fe0044d3f82af20ae7190ad3c33d (diff)
fdo#50163 move definition of PLATFORMID into configure.in
Change-Id: Iea8385aa9213ccde7e6650cb934361597d508250
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.in45
-rw-r--r--sdext/CustomTarget_presenter.mk4
-rw-r--r--sdext/Extension_minimizer.mk4
-rw-r--r--sdext/Extension_pdfimport.mk4
-rw-r--r--sdext/Extension_presenter.mk8
-rw-r--r--sdext/Library_presenter.mk2
-rw-r--r--sdext/StaticLibrary_pdfimport_s.mk4
-rw-r--r--sdext/platform.mk49
-rw-r--r--solenv/gbuild/Extension.mk8
-rw-r--r--solenv/gbuild/ExtensionTarget.mk10
11 files changed, 52 insertions, 87 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index 473ab5dd69fa..51990d995e03 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -451,6 +451,7 @@ export PERL=@PERL@
export PKGFORMAT=@PKGFORMAT@
export PKGMK=@PKGMK@
export PKG_CONFIG=@PKG_CONFIG@
+export PLATFORMID=@PLATFORMID@
export PNG_TARBALL=@PNG_TARBALL@
export POPPLER_CFLAGS=@POPPLER_CFLAGS@
export POPPLER_LIBS=@POPPLER_LIBS@
diff --git a/configure.in b/configure.in
index 906c530da25a..4c44b7d65969 100644
--- a/configure.in
+++ b/configure.in
@@ -3286,6 +3286,7 @@ aix*)
OS=AIX
RTL_OS=AIX
RTL_ARCH=PowerPC
+ PLATFORMID=aix_powerpc
OUTPATH=unxaigppc
P_SEP=:
SOLARLIB="-L../lib -L$SRC_ROOT/solenv/$OUTPATH/lib"
@@ -3308,11 +3309,13 @@ cygwin*)
CPUNAME=X86_64
RTL_ARCH=X86_64
LIB64="lib/x64"
+ PLATFORMID=windows_x86_64
OUTPATH=wntmscx$COMEX
else
CPU=I
CPUNAME=INTEL
RTL_ARCH=x86
+ PLATFORMID=windows_x86
OUTPATH=wntmsci$COMEX
fi
;;
@@ -3340,6 +3343,7 @@ darwin*)
CPUNAME=ARM
RTL_ARCH=ARM_EABI
GUIBASE=cocoatouch
+ PLATFORMID=macosx_arm_eabi
OUTPATH=unxiosr
OS=IOS
;;
@@ -3347,6 +3351,7 @@ darwin*)
CPU=P
CPUNAME=POWERPC
RTL_ARCH=PowerPC
+ PLATFORMID=macosx_powerpc
OUTPATH=unxmacxp
;;
i*86)
@@ -3356,6 +3361,7 @@ darwin*)
CPU=I
CPUNAME=INTEL
RTL_ARCH=x86
+ PLATFORMID=macosx_x86
OUTPATH=unxmacxi
;;
x86_64)
@@ -3363,11 +3369,13 @@ darwin*)
CPU=X
CPUNAME=X86_64
RTL_ARCH=X86_64
+ PLATFORMID=macosx_x86_64
OUTPATH=unxmacxx
else
CPU=I
CPUNAME=INTEL
RTL_ARCH=x86
+ PLATFORMID=macosx_x86
OUTPATH=unxmacxi
fi
;;
@@ -3392,11 +3400,13 @@ dragonfly*)
CPU=I
CPUNAME=INTEL
RTL_ARCH=x86
+ PLATFORMID=dragonfly_x86
;;
x86_64)
CPU=X
CPUNAME=X86_64
RTL_ARCH=X86_64
+ PLATFORMID=dragonfly_x86_64
;;
*)
AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
@@ -3421,12 +3431,14 @@ freebsd*)
CPU=I
CPUNAME=INTEL
RTL_ARCH=x86
+ PLATFORMID=freebsd_x86
OUTPATH=unxfbsdi
;;
x86_64)
CPU=X
CPUNAME=X86_64
RTL_ARCH=X86_64
+ PLATFORMID=freebsd_x86_64
;;
*)
AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
@@ -3451,6 +3463,7 @@ kfreebsd*)
CPU=I
CPUNAME=INTEL
RTL_ARCH=x86
+ PLATFORMID=kfreebsd_x86
OUTPATH=unxkfgi6
;;
x86_64)
@@ -3458,6 +3471,7 @@ kfreebsd*)
CPUNAME=X86_64
RTL_ARCH=X86_64
LIB64="lib64"
+ PLATFORMID=kfreebsd_x86_64
OUTPATH=unxkfgx6
;;
*)
@@ -3483,6 +3497,7 @@ linux-gnu*)
CPU=L
CPUNAME=AXP
RTL_ARCH=ALPHA
+ PLATFORMID=linux_alpha
OUTPATH=unxlngaxp
;;
arm*)
@@ -3491,9 +3506,11 @@ linux-gnu*)
EPM_FLAGS="-a arm"
OUTPATH=unxlngr
RTL_ARCH=ARM_EABI
+ PLATFORMID=linux_arm_eabi
case "$host_cpu" in
arm*-linux)
RTL_ARCH=ARM_OABI
+ PLATFORMID=linux_arm_oabi
;;
esac
;;
@@ -3502,18 +3519,21 @@ linux-gnu*)
CPUNAME=HPPA
RTL_ARCH=HPPA
EPM_FLAGS="-a hppa"
+ PLATFORMID=linux_hppa
OUTPATH=unxlnghppa
;;
i*86)
CPU=I
CPUNAME=INTEL
RTL_ARCH=x86
+ PLATFORMID=linux_x86
OUTPATH=unxlngi6
;;
ia64)
CPU=A
CPUNAME=IA64
RTL_ARCH=IA64
+ PLATFORMID=linux_ia64
OUTPATH=unxlnga
;;
mips)
@@ -3521,6 +3541,7 @@ linux-gnu*)
CPUNAME=GODSON
RTL_ARCH=MIPS_EB
EPM_FLAGS="-a mips"
+ PLATFORMID=linux_mips_eb
OUTPATH=unxlngmips
;;
mips64)
@@ -3528,6 +3549,7 @@ linux-gnu*)
CPUNAME=GODSON
RTL_ARCH=MIPS_EB
EPM_FLAGS="-a mips64"
+ PLATFORMID=linux_mips_eb
OUTPATH=unxlngmips
;;
mips64el)
@@ -3535,6 +3557,7 @@ linux-gnu*)
CPUNAME=GODSON
RTL_ARCH=MIPS_EL
EPM_FLAGS="-a mips64el"
+ PLATFORMID=linux_mips_el
OUTPATH=unxlngmips
;;
mipsel)
@@ -3542,18 +3565,21 @@ linux-gnu*)
CPUNAME=GODSON
RTL_ARCH=MIPS_EL
EPM_FLAGS="-a mipsel"
+ PLATFORMID=linux_mips_el
OUTPATH=unxlngmips
;;
m68k)
CPU=6
CPUNAME=M68K
RTL_ARCH=M68K
+ PLATFORMID=linux_m68k
OUTPATH=unxlngm68k
;;
powerpc)
CPU=P
CPUNAME=POWERPC
RTL_ARCH=PowerPC
+ PLATFORMID=linux_powerpc
OUTPATH=unxlngppc
;;
powerpc64)
@@ -3561,18 +3587,21 @@ linux-gnu*)
CPUNAME=POWERPC64
RTL_ARCH=PowerPC_64
LIB64="lib64"
+ PLATFORMID=linux_powerpc_64
OUTPATH=unxlngppc64
;;
sparc)
CPU=S
CPUNAME=SPARC
RTL_ARCH=SPARC
+ PLATFORMID=linux_sparc
OUTPATH=unxlngs
;;
s390)
CPU=3
CPUNAME=S390
RTL_ARCH=S390
+ PLATFORMID=linux_s390
OUTPATH=unxlngs390
;;
s390x)
@@ -3580,6 +3609,7 @@ linux-gnu*)
CPUNAME=S390X
RTL_ARCH=S390x
LIB64="lib64"
+ PLATFORMID=linux_s390x
OUTPATH=unxlngs390x
;;
x86_64)
@@ -3587,6 +3617,7 @@ linux-gnu*)
CPUNAME=X86_64
RTL_ARCH=X86_64
LIB64="lib64"
+ PLATFORMID=linux_x86_64
OUTPATH=unxlngx6
;;
*)
@@ -3612,18 +3643,21 @@ linux-android*)
CPU=R
CPUNAME=ARM
RTL_ARCH=ARM_EABI
+ PLATFORMID=android_arm_eabi
OUTPATH=unxandr
;;
mips|mipsel)
CPU=M
CPUNAME=GODSON # Weird, but maybe that's the LO convention?
RTL_ARCH=MIPS_EL
+ PLATFORMID=android_mips_el
OUTPATH=unxandm
;;
i*86)
CPU=I
CPUNAME=INTEL
RTL_ARCH=x86
+ PLATFORMID=android_x86
OUTPATH=unxandi
;;
*)
@@ -3648,11 +3682,13 @@ mingw*)
CPU=X
CPUNAME=X86_64
RTL_ARCH=X86_84
+ PLATFORMID=windows_x86_64
OUTPATH=wntgccx$COMEX
else
CPU=I
CPUNAME=INTEL
RTL_ARCH=x86
+ PLATFORMID=windows_x86
OUTPATH=wntgcci$COMEX
fi
;;
@@ -3680,21 +3716,25 @@ mingw*)
CPU=I
CPUNAME=INTEL
RTL_ARCH=x86
+ PLATFORMID=netbsd_x86
;;
powerpc)
CPU=P
CPUNAME=POWERPC
RTL_ARCH=PowerPC
+ PLATFORMID=netbsd_powerpc
;;
sparc)
CPU=S
CPUNAME=SPARC
RTL_ARCH=SPARC
+ PLATFORMID=netbsd_sparc
;;
x86_64)
CPU=X
CPUNAME=X86_64
RTL_ARCH=X86_64
+ PLATFORMID=netbsd_x86_64
;;
*)
AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
@@ -3719,11 +3759,13 @@ openbsd*)
CPU=I
CPUNAME=INTEL
RTL_ARCH=x86
+ PLATFORMID=openbsd_x86
;;
x86_64)
CPU=X
CPUNAME=X86_64
RTL_ARCH=X86_64
+ PLATFORMID=openbsd_x86_64
;;
*)
AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
@@ -3751,12 +3793,14 @@ solaris*)
CPU=I
CPUNAME=INTEL
RTL_ARCH=x86
+ PLATFORMID=solaris_x86
OUTPATH=unxsogi
;;
sparc)
CPU=S
CPUNAME=SPARC
RTL_ARCH=SPARC
+ PLATFORMID=solaris_sparc
OUTPATH=unxsogs
;;
*)
@@ -3809,6 +3853,7 @@ AC_SUBST(OUTPATH)
AC_SUBST(P_SEP)
AC_SUBST(SOLARVER)
AC_SUBST(WORKDIR)
+AC_SUBST(PLATFORMID)
dnl ===================================================================
dnl Test which package format to use
diff --git a/sdext/CustomTarget_presenter.mk b/sdext/CustomTarget_presenter.mk
index afecd49f763a..e559bde7167c 100644
--- a/sdext/CustomTarget_presenter.mk
+++ b/sdext/CustomTarget_presenter.mk
@@ -30,12 +30,10 @@ $(eval $(call gb_CustomTarget_CustomTarget,sdext/source/presenter/help/en-US/com
$(call gb_CustomTarget_get_target,sdext/source/presenter/help/en-US/com.sun.PresenterScreen) : \
$(call gb_CustomTarget_get_workdir,sdext/source/presenter/help/en-US/com.sun.PresenterScreen)/presenter.xhp
-include $(SRCDIR)/sdext/platform.mk
-
$(call gb_CustomTarget_get_workdir,sdext/source/presenter/help/en-US/com.sun.PresenterScreen)/presenter.xhp : \
$(SRCDIR)/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp \
| $(call gb_CustomTarget_get_workdir,sdext/source/presenter/help/en-US/com.sun.PresenterScreen)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
- sed "s/PLATFORMID/$(sdext_PLATFORM)/" < $< > $@
+ sed "s/PLATFORMID/$(PLATFORMID)/" < $< > $@
# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/sdext/Extension_minimizer.mk b/sdext/Extension_minimizer.mk
index 2e4d1ff27b86..17142fccf66b 100644
--- a/sdext/Extension_minimizer.mk
+++ b/sdext/Extension_minimizer.mk
@@ -25,12 +25,8 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
-include $(dir $(realpath $(lastword $(MAKEFILE_LIST))))platform.mk
-
$(eval $(call gb_Extension_Extension,presentation-minimizer,sdext/source/minimizer))
-$(eval $(call gb_Extension_set_platform,presentation-minimizer,$(sdext_PLATFORM)))
-
$(eval $(call gb_Extension_add_libraries,presentation-minimizer,\
SunPresentationMinimizer \
))
diff --git a/sdext/Extension_pdfimport.mk b/sdext/Extension_pdfimport.mk
index c5692dec763c..a97ddff3e13e 100644
--- a/sdext/Extension_pdfimport.mk
+++ b/sdext/Extension_pdfimport.mk
@@ -25,12 +25,8 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
-include $(dir $(realpath $(lastword $(MAKEFILE_LIST))))platform.mk
-
$(eval $(call gb_Extension_Extension,pdfimport,sdext/source/pdfimport))
-$(eval $(call gb_Extension_set_platform,pdfimport,$(sdext_PLATFORM)))
-
$(eval $(call gb_Extension_add_file,pdfimport,components.rdb,$(call gb_Rdb_get_target,pdfimport)))
$(eval $(call gb_Extension_add_libraries,pdfimport,\
diff --git a/sdext/Extension_presenter.mk b/sdext/Extension_presenter.mk
index 66f93a8f2a81..bdd584f0cc12 100644
--- a/sdext/Extension_presenter.mk
+++ b/sdext/Extension_presenter.mk
@@ -25,12 +25,8 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
-include $(dir $(realpath $(lastword $(MAKEFILE_LIST))))platform.mk
-
$(eval $(call gb_Extension_Extension,presenter-screen,sdext/source/presenter))
-$(eval $(call gb_Extension_set_platform,presenter-screen,$(sdext_PLATFORM)))
-
$(eval $(call gb_Extension_add_libraries,presenter-screen,\
PresenterScreen \
))
@@ -141,9 +137,9 @@ $(eval $(call gb_Extension_add_files,presenter-screen,registry/data/org/openoffi
$(call gb_XcuDataTarget_get_target,sdext/source/presenter/registry/data/org/openoffice/Office/ProtocolHandler.xcu) \
))
-$(eval $(call gb_Extension_add_helpfile,presenter-screen,$(WORKDIR)/CustomTarget/sdext/source/presenter/help/en-US,com.sun.PresenterScreen-$(sdext_PLATFORM)/presenter.xhp,com.sun.PresenterScreen/presenter.xhp))
+$(eval $(call gb_Extension_add_helpfile,presenter-screen,$(WORKDIR)/CustomTarget/sdext/source/presenter/help/en-US,com.sun.PresenterScreen-$(PLATFORMID)/presenter.xhp,com.sun.PresenterScreen/presenter.xhp))
-$(eval $(call gb_Extension_add_helptreefile,presenter-screen,$(SRCDIR)/sdext/source/presenter/help/en-US,/help.tree,com.sun.PresenterScreen/help.tree,com.sun.PresenterScreen-$(sdext_PLATFORM)))
+$(eval $(call gb_Extension_add_helptreefile,presenter-screen,$(SRCDIR)/sdext/source/presenter/help/en-US,/help.tree,com.sun.PresenterScreen/help.tree,com.sun.PresenterScreen-$(PLATFORMID)))
diff --git a/sdext/Library_presenter.mk b/sdext/Library_presenter.mk
index ca404ca9f33d..7dcb3fd1551a 100644
--- a/sdext/Library_presenter.mk
+++ b/sdext/Library_presenter.mk
@@ -32,7 +32,7 @@ $(eval $(call gb_Library_set_componentfile,PresenterScreen,sdext/source/presente
$(eval $(call gb_Library_use_sdk_api,PresenterScreen))
$(eval $(call gb_Library_add_defs,PresenterScreen,\
- -DPRESENTER_IMPL_IDENTIFIER=\"com.sun.PresenterScreen-$(sdext_PLATFORM)\" \
+ -DPRESENTER_IMPL_IDENTIFIER=\"com.sun.PresenterScreen-$(PLATFORMID)\" \
))
$(eval $(call gb_Library_use_libraries,PresenterScreen,\
diff --git a/sdext/StaticLibrary_pdfimport_s.mk b/sdext/StaticLibrary_pdfimport_s.mk
index bf49da31070b..7e648abf8abf 100644
--- a/sdext/StaticLibrary_pdfimport_s.mk
+++ b/sdext/StaticLibrary_pdfimport_s.mk
@@ -25,8 +25,6 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
-include $(dir $(realpath $(lastword $(MAKEFILE_LIST))))platform.mk
-
$(eval $(call gb_StaticLibrary_StaticLibrary,pdfimport_s))
$(eval $(call gb_StaticLibrary_use_packages,pdfimport_s,\
@@ -56,7 +54,7 @@ $(eval $(call gb_StaticLibrary_set_include,pdfimport_s,\
$(eval $(call gb_StaticLibrary_add_defs,pdfimport_s,\
-DBOOST_SPIRIT_USE_OLD_NAMESPACE \
- -DPDFI_IMPL_IDENTIFIER=\"com.sun.star.PDFImport-$(sdext_PLATFORM)\" \
+ -DPDFI_IMPL_IDENTIFIER=\"com.sun.star.PDFImport-$(PLATFORMID)\" \
))
$(eval $(call gb_StaticLibrary_add_exception_objects,pdfimport_s,\
diff --git a/sdext/platform.mk b/sdext/platform.mk
deleted file mode 100644
index 2c818c8e179d..000000000000
--- a/sdext/platform.mk
+++ /dev/null
@@ -1,49 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# Major Contributor(s):
-# Copyright (C) 2012 Red Hat, Inc., David Tardon <dtardon@redhat.com>
-# (initial developer)
-#
-# All Rights Reserved.
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-# TODO
-# https://bugs.freedesktop.org/show_bug.cgi?id=50163
-# move definition of PLATFORMID into configure.in
-#
-
-sdext__LOWERCASE_TABLE := A-a B-b C-c D-d E-e F-f G-g H-h I-i J-j K-k L-l M-m N-n O-o P-p R-r S-s T-t U-u V-v W-w X-x Y-y Z-z
-
-define sdext__lcase_impl
-$(if $(3),$(call sdext__lcase,$(firstword $(3)),$(3),$(subst $(1),$(2),$(4))),$(subst $(1),$(2),$(4)))
-endef
-
-define sdext__lcase
-$(call sdext__lcase_impl,$(firstword $(subst -, ,$(1))),$(lastword $(subst -, ,$(1))),$(wordlist 2,$(words $(2)),$(2)),$(3))
-endef
-
-define sdext__lowercase
-$(call sdext__lcase,$(firstword $(sdext__LOWERCASE_TABLE)),$(sdext__LOWERCASE_TABLE),$(1))
-endef
-
-sdext_PLATFORM := $(call sdext__lowercase,$(RTL_OS)_$(RTL_ARCH))
-
-# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/solenv/gbuild/Extension.mk b/solenv/gbuild/Extension.mk
index c728e0d83d15..281bac89420a 100644
--- a/solenv/gbuild/Extension.mk
+++ b/solenv/gbuild/Extension.mk
@@ -41,14 +41,6 @@ $$(eval $$(call gb_Module_register_target,$(call gb_Extension_get_target,$(1)),$
endef
-# Set platform.
-#
-# Only use this if the extension is platform-dependent.
-define gb_Extension_set_platform
-$(call gb_ExtensionTarget_set_platform,$(1),$(2))
-
-endef
-
define gb_Extension_add_file
$(call gb_ExtensionTarget_add_file,$(1),$(2),$(3))
diff --git a/solenv/gbuild/ExtensionTarget.mk b/solenv/gbuild/ExtensionTarget.mk
index 75b9e0c16bd8..91f1be3ed57a 100644
--- a/solenv/gbuild/ExtensionTarget.mk
+++ b/solenv/gbuild/ExtensionTarget.mk
@@ -127,7 +127,7 @@ $(call gb_ExtensionTarget_get_target,$(1)) : DESCRIPTION :=
$(call gb_ExtensionTarget_get_target,$(1)) : FILES := META-INF description.xml
$(call gb_ExtensionTarget_get_target,$(1)) : LICENSE :=
$(call gb_ExtensionTarget_get_target,$(1)) : LOCATION := $(SRCDIR)/$(2)
-$(call gb_ExtensionTarget_get_target,$(1)) : PLATFORM :=
+$(call gb_ExtensionTarget_get_target,$(1)) : PLATFORM := $(PLATFORMID)
$(call gb_ExtensionTarget_get_target,$(1)) : PRJNAME := $(firstword $(subst /, ,$(2)))
$(call gb_ExtensionTarget_get_workdir,$(1))/description.xml : $(SRCDIR)/$(2)/description.xml
ifneq ($(strip $(gb_WITH_LANG)),)
@@ -139,14 +139,6 @@ $(foreach lang,$(gb_ExtensionTarget_ALL_LANGS), \
$(call gb_ExtensionTarget__compile_help_onelang,$(1),$(lang)))
endef
-# Set platform.
-#
-# Only use this if the extension is platform-dependent.
-define gb_ExtensionTarget_set_platform
-$(call gb_ExtensionTarget_get_target,$(1)) : PLATFORM := $(2)
-
-endef
-
# Use the default license file
define gb_ExtensionTarget_use_default_license
$(call gb_ExtensionTarget_get_target,$(1)) : FILES += registration