summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-01-01 11:47:56 +0100
committerDavid Tardon <dtardon@redhat.com>2013-01-01 13:15:01 +0100
commit085e0adf53baff298059980a54758d81b08bb059 (patch)
tree190d93c246bb54b86ec445a8b970329ba72b95cc /pyuno
parentae5c574ac24ed8979dcf03da87cd14c078db2a07 (diff)
just pass the define through -D
I am constantly amazed at the creativity of the original makefile writers. An extra header file, processed by sed, rather then adding one item to CDEFS? Really? Change-Id: I41ae8b10fc447ea5ab91e767c8afb87e39b9b5f5
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/CustomTarget_pyversion.mk37
-rw-r--r--pyuno/Executable_python_wrapper.mk8
-rw-r--r--pyuno/Module_pyuno.mk2
-rw-r--r--pyuno/zipcore/python.cxx2
-rw-r--r--pyuno/zipcore/pyversion.inc19
5 files changed, 4 insertions, 64 deletions
diff --git a/pyuno/CustomTarget_pyversion.mk b/pyuno/CustomTarget_pyversion.mk
deleted file mode 100644
index acfec165f47b..000000000000
--- a/pyuno/CustomTarget_pyversion.mk
+++ /dev/null
@@ -1,37 +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 David Ostrovsky <d.ostrovsky@gmx.de> (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.
-
-$(eval $(call gb_CustomTarget_CustomTarget,pyuno/pyversion))
-
-$(call gb_CustomTarget_get_target,pyuno/pyversion) : \
- $(call gb_CustomTarget_get_workdir,pyuno/pyversion)/pyversion.hxx
-
-$(call gb_CustomTarget_get_workdir,pyuno/pyversion)/pyversion.hxx : $(SRCDIR)/pyuno/zipcore/pyversion.inc | \
- $(call gb_CustomTarget_get_workdir,pyuno/pyversion)/.dir
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
- sed -e "s/@/$(PYTHON_VERSION)/g" < $? > $@
-
-# vim: set noet sw=4 ts=4:
diff --git a/pyuno/Executable_python_wrapper.mk b/pyuno/Executable_python_wrapper.mk
index 0d978ca0a731..157a0a3f0915 100644
--- a/pyuno/Executable_python_wrapper.mk
+++ b/pyuno/Executable_python_wrapper.mk
@@ -26,12 +26,12 @@
$(eval $(call gb_Executable_Executable,pyuno/python))
-$(eval $(call gb_Executable_use_static_libraries,pyuno/python,\
- ooopathutils \
+$(eval $(call gb_Executable_add_defs,pyuno/python,\
+ -DMY_PYVERSION=L\"$(PYTHON_VERSION)\" \
))
-$(eval $(call gb_Executable_use_custom_headers,pyuno/python,\
- pyuno/pyversion \
+$(eval $(call gb_Executable_use_static_libraries,pyuno/python,\
+ ooopathutils \
))
$(eval $(call gb_Executable_add_noexception_objects,pyuno/python,\
diff --git a/pyuno/Module_pyuno.mk b/pyuno/Module_pyuno.mk
index 0cdb458c575a..9ce9fe0b25ff 100644
--- a/pyuno/Module_pyuno.mk
+++ b/pyuno/Module_pyuno.mk
@@ -48,10 +48,8 @@ endif
# with SYSTEM_PYTHON=YES and SYSTEM_PYTHON=NO
# zipcore: pyuno/python.exe on Windows
-# zipcore: pyversion.hxx on Windows
ifeq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,pyuno,\
- CustomTarget_pyversion \
Executable_python_wrapper \
))
endif
diff --git a/pyuno/zipcore/python.cxx b/pyuno/zipcore/python.cxx
index 8122f9c92faa..34ff2e2da7e3 100644
--- a/pyuno/zipcore/python.cxx
+++ b/pyuno/zipcore/python.cxx
@@ -32,8 +32,6 @@
#include "tools/pathutils.hxx"
-#include "pyversion.hxx"
-
#define MY_LENGTH(s) (sizeof (s) / sizeof *(s) - 1)
#define MY_STRING(s) (s), MY_LENGTH(s)
diff --git a/pyuno/zipcore/pyversion.inc b/pyuno/zipcore/pyversion.inc
deleted file mode 100644
index f7a6e776bfaa..000000000000
--- a/pyuno/zipcore/pyversion.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#define MY_PYVERSION L"@"