Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / sdext / platform.mk
blob2c818c8e179d3df3da8ba04d27d707fcf7fe4290
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
2 # Version: MPL 1.1 / GPLv3+ / LGPLv3+
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License or as specified alternatively below. You may obtain a copy of
7 # the License at http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # Major Contributor(s):
15 # Copyright (C) 2012 Red Hat, Inc., David Tardon <dtardon@redhat.com>
16 # (initial developer)
18 # All Rights Reserved.
20 # For minor contributions see the git repository.
22 # Alternatively, the contents of this file may be used under the terms of
23 # either the GNU General Public License Version 3 or later (the "GPLv3+"), or
24 # the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
25 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
26 # instead of those above.
28 # TODO
29 # https://bugs.freedesktop.org/show_bug.cgi?id=50163
30 # move definition of PLATFORMID into configure.in
33 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
35 define sdext__lcase_impl
36 $(if $(3),$(call sdext__lcase,$(firstword $(3)),$(3),$(subst $(1),$(2),$(4))),$(subst $(1),$(2),$(4)))
37 endef
39 define sdext__lcase
40 $(call sdext__lcase_impl,$(firstword $(subst -, ,$(1))),$(lastword $(subst -, ,$(1))),$(wordlist 2,$(words $(2)),$(2)),$(3))
41 endef
43 define sdext__lowercase
44 $(call sdext__lcase,$(firstword $(sdext__LOWERCASE_TABLE)),$(sdext__LOWERCASE_TABLE),$(1))
45 endef
47 sdext_PLATFORM := $(call sdext__lowercase,$(RTL_OS)_$(RTL_ARCH))
49 # vim:set shiftwidth=4 softtabstop=4 expandtab: