Kaydet (Commit) 085e0adf authored tarafından David Tardon's avatar David Tardon

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
üst ae5c574a
# -*- 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:
...@@ -26,12 +26,12 @@ ...@@ -26,12 +26,12 @@
$(eval $(call gb_Executable_Executable,pyuno/python)) $(eval $(call gb_Executable_Executable,pyuno/python))
$(eval $(call gb_Executable_use_static_libraries,pyuno/python,\ $(eval $(call gb_Executable_add_defs,pyuno/python,\
ooopathutils \ -DMY_PYVERSION=L\"$(PYTHON_VERSION)\" \
)) ))
$(eval $(call gb_Executable_use_custom_headers,pyuno/python,\ $(eval $(call gb_Executable_use_static_libraries,pyuno/python,\
pyuno/pyversion \ ooopathutils \
)) ))
$(eval $(call gb_Executable_add_noexception_objects,pyuno/python,\ $(eval $(call gb_Executable_add_noexception_objects,pyuno/python,\
......
...@@ -48,10 +48,8 @@ endif ...@@ -48,10 +48,8 @@ endif
# with SYSTEM_PYTHON=YES and SYSTEM_PYTHON=NO # with SYSTEM_PYTHON=YES and SYSTEM_PYTHON=NO
# zipcore: pyuno/python.exe on Windows # zipcore: pyuno/python.exe on Windows
# zipcore: pyversion.hxx on Windows
ifeq ($(OS),WNT) ifeq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,pyuno,\ $(eval $(call gb_Module_add_targets,pyuno,\
CustomTarget_pyversion \
Executable_python_wrapper \ Executable_python_wrapper \
)) ))
endif endif
......
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
#include "tools/pathutils.hxx" #include "tools/pathutils.hxx"
#include "pyversion.hxx"
#define MY_LENGTH(s) (sizeof (s) / sizeof *(s) - 1) #define MY_LENGTH(s) (sizeof (s) / sizeof *(s) - 1)
#define MY_STRING(s) (s), MY_LENGTH(s) #define MY_STRING(s) (s), MY_LENGTH(s)
......
/*
* 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"@"
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