summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorDavid Ostrovsky <David.Ostrovsky@gmx.de>2012-05-21 19:01:29 +0200
committerDavid Tardon <dtardon@redhat.com>2012-05-24 07:22:03 +0200
commiteadcfa4e276aad610c674dd3eabc0956cb669d9b (patch)
tree841cd83e73d7290e6384acdf5b1a79c4a1a898b9 /sal
parentf6fff52b7b34c17513603802bb97fe5ad39385a7 (diff)
fdo#50162 merge rtlbootstrap.mk into configure.in
Change-Id: I241be2704a069ec1f6be5861084039569673cc12
Diffstat (limited to 'sal')
-rw-r--r--sal/CustomTarget_generated.mk21
-rw-r--r--sal/Library_sal.mk2
-rw-r--r--sal/Package_generated.mk1
-rw-r--r--sal/rtl/source/bootstrap.cxx6
-rw-r--r--sal/rtl/source/macro.hxx116
5 files changed, 5 insertions, 141 deletions
diff --git a/sal/CustomTarget_generated.mk b/sal/CustomTarget_generated.mk
index 5b119277f30d..f5c07c3da59e 100644
--- a/sal/CustomTarget_generated.mk
+++ b/sal/CustomTarget_generated.mk
@@ -30,28 +30,9 @@ $(eval $(call gb_CustomTarget_CustomTarget,sal/generated))
sal_DIR := $(call gb_CustomTarget_get_workdir,sal/generated)
$(call gb_CustomTarget_get_target,sal/generated) : \
- $(sal_DIR)/rtlbootstrap.mk $(sal_DIR)/sal/udkversion.h \
+ $(sal_DIR)/sal/udkversion.h \
$(if $(filter-out $(COM),MSC),$(sal_DIR)/sal/typesizes.h)
-ifeq ($(COM),MSC)
-$(sal_DIR)/rtlbootstrap.mk :| $(sal_DIR)/.dir
- echo RTL_OS:=Windows > $@
-ifeq ($(CPUNAME),INTEL)
- echo RTL_ARCH:=x86 >> $@
-else
- echo RTL_ARCH:=X86_64 >> $@
-endif
-else
-$(sal_DIR)/rtlbootstrap.mk : $(sal_DIR)/sal/typesizes.h | $(sal_DIR)/.dir
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CXX,1)
- $(call gb_Helper_abbreviate_dirs, \
- (echo '#include "macro.hxx"'; echo RTL_OS:=THIS_OS; echo RTL_ARCH:=THIS_ARCH) > $(sal_DIR)/bootstrap.cxx && \
- $(CXX) -E $(gb_OSDEFS) $(gb_CXXFLAGS) -D$(CPUNAME) -I$(sal_DIR) -I$(SRCDIR)/sal/rtl/source \
- -I$(SRCDIR)/sal/inc $(sal_DIR)/bootstrap.cxx > $@.tmp && \
- cat $@.tmp | grep '^RTL_' | sed -e 's/"//g' > $@ && \
- rm $(sal_DIR)/bootstrap.cxx $@.tmp)
-endif
-
$(sal_DIR)/sal/typesizes.h :| $(sal_DIR)/sal/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
echo '/* This file is autogenerated from configure script data */' > $@
diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index adbe80344048..de22417f29f9 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -52,6 +52,8 @@ $(eval $(call gb_Library_add_defs,sal,\
) \
$(LFS_CFLAGS) \
-DSAL_DLLIMPLEMENTATION \
+ -DRTL_OS="\"$(RTL_OS)"\" \
+ -DRTL_ARCH="\"$(RTL_ARCH)"\" \
))
$(eval $(call gb_Library_use_libraries,sal,\
diff --git a/sal/Package_generated.mk b/sal/Package_generated.mk
index 719e97c6c6e0..5bc43dc5412d 100644
--- a/sal/Package_generated.mk
+++ b/sal/Package_generated.mk
@@ -27,7 +27,6 @@
$(eval $(call gb_Package_Package,sal_generated,$(call gb_CustomTarget_get_workdir,sal/generated)))
-$(eval $(call gb_Package_add_file,sal_generated,inc/rtlbootstrap.mk,rtlbootstrap.mk))
$(eval $(call gb_Package_add_file,sal_generated,inc/sal/udkversion.h,sal/udkversion.h))
ifneq ($(COM),MSC)
diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx
index 98c983bd2b7a..e82d537d4657 100644
--- a/sal/rtl/source/bootstrap.cxx
+++ b/sal/rtl/source/bootstrap.cxx
@@ -47,8 +47,6 @@
#include <rtl/uri.hxx>
#include "rtl/allocator.hxx"
-#include "macro.hxx"
-
#include <algorithm>
#include <map>
#include <memory>
@@ -477,12 +475,12 @@ bool Bootstrap_Impl::getValue(
}
if ( key == "_OS" ) {
rtl_uString_assign(
- value, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(THIS_OS)).pData);
+ value, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(RTL_OS)).pData);
return true;
}
if ( key == "_ARCH" ) {
rtl_uString_assign(
- value, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(THIS_ARCH)).pData);
+ value, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(RTL_ARCH)).pData);
return true;
}
if ( key == "_CPPU_ENV" ) {
diff --git a/sal/rtl/source/macro.hxx b/sal/rtl/source/macro.hxx
deleted file mode 100644
index 09c802ee8271..000000000000
--- a/sal/rtl/source/macro.hxx
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _RTL_MACRO_HXX
-#define _RTL_MACRO_HXX
-
-#include <rtl/bootstrap.h>
-#include <rtl/ustring.hxx>
-#include <osl/endian.h>
-
-#if defined WIN32
-#define THIS_OS "Windows"
-#elif defined SOLARIS
-#define THIS_OS "Solaris"
-#elif defined LINUX
-#ifdef __FreeBSD_kernel__
-#define THIS_OS "kFreeBSD"
-#else
-#define THIS_OS "Linux"
-#endif
-#elif defined ANDROID
-#define THIS_OS "Android"
-#elif defined MACOSX
-#define THIS_OS "MacOSX"
-#elif defined IOS
-#define THIS_OS "iOS"
-#elif defined NETBSD
-#define THIS_OS "NetBSD"
-#elif defined FREEBSD
-#define THIS_OS "FreeBSD"
-#elif defined AIX
-#define THIS_OS "AIX"
-#elif defined OPENBSD
-#define THIS_OS "OpenBSD"
-#elif defined DRAGONFLY
-#define THIS_OS "DragonFly"
-#endif
-
-#if ! defined THIS_OS
-#error "unknown OS -- insert your OS identifier above"
-this is inserted for the case that the preprocessor ignores error
-#endif
-
-#if defined X86_64
-# define THIS_ARCH "X86_64"
-#elif defined INTEL
-# define THIS_ARCH "x86"
-#elif defined POWERPC64
-# define THIS_ARCH "PowerPC_64"
-#elif defined POWERPC
-# define THIS_ARCH "PowerPC"
-#elif defined S390X
-# define THIS_ARCH "S390x"
-#elif defined S390
-# define THIS_ARCH "S390"
-#elif defined SPARC
-#if defined IS_LP64
-# define THIS_ARCH "SPARC64"
-#else
-# define THIS_ARCH "SPARC"
-#endif
-#elif defined MIPS
-# ifdef OSL_BIGENDIAN
-# define THIS_ARCH "MIPS_EB"
-# else
-# define THIS_ARCH "MIPS_EL"
-# endif
-#elif defined ARM
-# ifdef __ARM_EABI__
-# define THIS_ARCH "ARM_EABI"
-# else
-# define THIS_ARCH "ARM_OABI"
-# endif
-#elif defined IA64
-# define THIS_ARCH "IA64"
-#elif defined M68K
-# define THIS_ARCH "M68K"
-#elif defined HPPA
-# define THIS_ARCH "HPPA"
-#elif defined AXP
-# define THIS_ARCH "ALPHA"
-#endif
-
-#if ! defined THIS_ARCH
-#error "unknown ARCH -- insert your ARCH identifier above"
-this is inserted for the case that the preprocessor ignores error
-#endif
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */