VirtualBox

source: vbox/trunk/src/VBox/Main/glue/python/Makefile.kmk@ 107437

Last change on this file since 107437 was 106065, checked in by vboxsync, 5 months ago

Manual copyright year updates.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1# $Id: Makefile.kmk 106065 2024-09-16 21:42:41Z vboxsync $
2## @file
3# Makefile for the VBox Python glue.
4#
5
6#
7# Copyright (C) 2004-2024 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28SUB_DEPTH = ../../../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31#
32# Make sure our Config.kmk is included.
33#
34ifndef VBOX_MAIN_GLUE_PYTHON_CONFIG_KMK_INCLUDED
35 include $(PATH_SUB_CURRENT)/Config.kmk
36endif
37
38if defined(VBOX_WITH_PYTHON) && !defined(VBOX_ONLY_EXTPACKS)
39 VBOX_PATH_PYTHON_GLUE_SRC := $(PATH_SUB_CURRENT)
40
41 INSTALLS += VBox-python-glue
42 VBox-python-glue_INST = $(INST_SDK)installer/python/vboxapi/
43 VBox-python-glue_MODE = a+r,u+w
44 VBox-python-glue_SOURCES = \
45 pyproject.toml
46 INSTALLS += VBox-python-vboxapi
47 VBox-python-vboxapi_INST = $(INST_SDK)installer/python/vboxapi/src/vboxapi/
48 VBox-python-vboxapi_MODE = a+r,u+w
49 VBox-python-vboxapi_SOURCES = \
50 vboxapi.py=>__init__.py \
51 $(VBox-python-vboxapi_0_OUTDIR)/VirtualBox_constants.py
52 VBox-python-vboxapi_CLEAN = \
53 $(VBox-python-vboxapi_0_OUTDIR)/VirtualBox_constants.py \
54 $(VBox-python-vboxapi_0_OUTDIR)/VirtualBox_constants_err_h_1.txt
55 $(call KB_FN_DO_PASS0_ON_TARGET,VBox-python-vboxapi)
56 $(call KB_FN_AUTO_CMD_DEPS,$(VBox-python-vboxapi_0_OUTDIR)/VirtualBox_constants.py)
57 $(VBox-python-vboxapi_0_OUTDIR)/VirtualBox_constants.py \
58 + $(VBox-python-vboxapi_0_OUTDIR)/VirtualBox_constants_err_h_1.txt: \
59 $(VBOX_PATH_PYTHON_GLUE_SRC)/constants-python.xsl \
60 $(VBOX_PATH_PYTHON_GLUE_SRC)/vbox-err-consts.sed \
61 $(PATH_ROOT)/include/iprt/err.h \
62 $(PATH_ROOT)/include/VBox/err.h \
63 $(VBOX_XIDL_FILE) \
64 | $$(dir $$@)
65 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
66 $(call MSG_TOOL,xsltproc,Python constants,$<,$@)
67 $(SED) -f $(VBOX_PATH_PYTHON_GLUE_SRC)/vbox-err-consts.sed \
68 --output $(VBox-python-vboxapi_0_OUTDIR)/VirtualBox_constants_err_h_1.txt \
69 $(PATH_ROOT)/include/iprt/err.h \
70 $(PATH_ROOT)/include/VBox/err.h
71 $(QUIET)$(VBOX_XSLTPROC) -o $@ \
72 --stringparam "g_sErrHFile" "$(VBox-python-vboxapi_0_OUTDIR)/VirtualBox_constants_err_h_1.txt" \
73 --stringparam g_uVBoxCopyrightYear "$(VBOX_C_YEAR)" \
74 $(VBOX_PATH_PYTHON_GLUE_SRC)/constants-python.xsl $(VBOX_XIDL_FILE)
75
76 #
77 # Automatically lint Main Python glue.
78 #
79 if defined(VBOX_WITH_PYLINT) && !defined(VBOX_WITHOUT_AUTO_PYLINT)
80 OTHERS += $(PATH_TARGET)/pylintMainPythonGlue.run
81 OTHER_CLEAN += $(PATH_TARGET)/pylintMainPythonGlue.run
82 $(PATH_TARGET)/pylintMainPythonGlue.run: $(PATH_SUB_CURRENT)/vboxapi.py
83 $(QUIET)$(APPEND) -t "$@"
84 endif
85
86 VBOX_MAIN_GLUE_PYTHON_PYTHON_SOURCES := $(wildcard $(PATH_SUB_CURRENT)/*.py)
87
88 $(evalcall def_vbox_main_glue_python_process_python_sources,FORCE)
89
90endif # VBOX_WITH_PYTHON && !VBOX_ONLY_EXTPACKS
91
92include $(FILE_KBUILD_SUB_FOOTER)
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette