Mercurial > hgrepos > Python2 > PyMuPDF
annotate Makefile.freebsd @ 44:0a8b06e38e19
Need "packaging" at wheel build time too.
Parsing of version_p into a tuple now is done at build time.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sat, 11 Oct 2025 17:16:23 +0200 |
| parents | 8934ac156ef5 |
| children |
| rev | line source |
|---|---|
|
6
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
1 # -*- mode: makefile; coding: utf-8 -*- |
|
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
2 # |
|
10
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
3 # Needs GNU make (aka gmake) and binutils/ar or LLVM/ar |
|
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
4 # (instead of FreeBSD /usr/bin/ar). |
|
8
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
5 # |
|
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
6 # Building against an installed mupdf package fails because the libmupdfcpp.so |
|
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
7 # is missing. |
|
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
8 # |
|
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
9 # Prepare: |
|
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
10 # |
|
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
11 # - Create a Python venv and activate it |
|
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
12 # |
|
10
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
13 # - Install a LLVM package that has the same version as the libclang |
|
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
14 # Python package that will be used/installed |
|
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
15 # (e.g. pkg install llvm18 because of libclang>=18,<19) |
|
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
16 # |
|
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
17 # - In the "bin"-directory of the venv symlink "make" to /usr/local/bin/gmake |
|
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
18 # and "ar" to /usr/local/llvm18/bin/llvm-ar |
|
8
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
19 # |
|
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
20 # * Makefiles have GNU syntax |
|
10
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
21 # * ar is called with @-response-files -- which are a GNU feature (also |
|
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
22 # implemented by LLVM's ar) |
|
8
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
23 # |
|
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
24 # - At first to not build with tesseract (OCR) |
|
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
25 # |
|
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
26 # export PYMUPDF_SETUP_MUPDF_TESSERACT=0 |
|
bf1744083a54
Some documentation notes into Makefile.freebsd
Franz Glasner <fzglas.hg@dom66.de>
parents:
6
diff
changeset
|
27 # |
|
6
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
28 |
|
21
2f43e400f144
Provide an "all" target to build both the sdist and the wheel
Franz Glasner <fzglas.hg@dom66.de>
parents:
20
diff
changeset
|
29 .PHONY: all wheel sdist populate-venv check |
|
16
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
30 |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
31 .SILENT: check |
|
6
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
32 |
|
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
33 THIS_MAKEFILE_JUSTNAME:= $(firstword $(MAKEFILE_LIST)) |
|
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
34 THIS_MAKEFILE_DIR:= $(abspath $(dir $(THIS_MAKEFILE_JUSTNAME))) |
|
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
35 |
|
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
36 PYMUPDF_SETUP_MUPDF_BUILD?= $(THIS_MAKEFILE_DIR)/mupdf-source |
|
35
f0e1e5146733
Comment about building with tesseract
Franz Glasner <fzglas.hg@dom66.de>
parents:
33
diff
changeset
|
37 # It would compile with tesseract because its sources are vendored by MuPDF |
|
6
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
38 PYMUPDF_SETUP_MUPDF_TESSERACT?= 0 |
|
38
8934ac156ef5
Allow to build with the PyPI package "clang" instead of "libclang".
Franz Glasner <fzglas.hg@dom66.de>
parents:
35
diff
changeset
|
39 # |
|
8934ac156ef5
Allow to build with the PyPI package "clang" instead of "libclang".
Franz Glasner <fzglas.hg@dom66.de>
parents:
35
diff
changeset
|
40 # We use clang instead of libclang: On FreeBSD you have to install |
|
8934ac156ef5
Allow to build with the PyPI package "clang" instead of "libclang".
Franz Glasner <fzglas.hg@dom66.de>
parents:
35
diff
changeset
|
41 # llvm to get a libclang.so installed; there is no libclang package |
|
8934ac156ef5
Allow to build with the PyPI package "clang" instead of "libclang".
Franz Glasner <fzglas.hg@dom66.de>
parents:
35
diff
changeset
|
42 # with a bundled libclang.so. Additionally, libclang currently is not |
|
8934ac156ef5
Allow to build with the PyPI package "clang" instead of "libclang".
Franz Glasner <fzglas.hg@dom66.de>
parents:
35
diff
changeset
|
43 # up-to-date with respect to clang versions >= 19. |
|
8934ac156ef5
Allow to build with the PyPI package "clang" instead of "libclang".
Franz Glasner <fzglas.hg@dom66.de>
parents:
35
diff
changeset
|
44 # |
|
8934ac156ef5
Allow to build with the PyPI package "clang" instead of "libclang".
Franz Glasner <fzglas.hg@dom66.de>
parents:
35
diff
changeset
|
45 PYMUPDF_SETUP_LIBCLANG?= clang>=18,<19 |
|
6
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
46 LIBCLANG_LIBRARY_PATH?= $(CLANG_DIR)/lib |
|
38
8934ac156ef5
Allow to build with the PyPI package "clang" instead of "libclang".
Franz Glasner <fzglas.hg@dom66.de>
parents:
35
diff
changeset
|
47 CLANG_DIR?= /usr/local/llvm18 |
|
6
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
48 |
|
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
49 TEST= /bin/test |
|
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
50 LOCALBASE?= /usr/local |
|
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
51 SYMLINK?= /bin/ln -s |
|
15
393e55ef9200
Explicitely use python3 instead of python
Franz Glasner <fzglas.hg@dom66.de>
parents:
13
diff
changeset
|
52 PYTHON?= python3 |
|
6
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
53 PYTHON_PREFIXES!= $(PYTHON) -c 'import sys; print(sys.prefix); print(sys.base_prefix)' |
|
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
54 |
|
10
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
55 # |
|
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
56 # Setting these does not work for some parts built by sub-makes. |
|
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
57 # Symlink in the venv instead. |
|
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
58 # |
|
6
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
59 #CC= $(CLANG_DIR)/bin/clang |
|
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
60 #CXX= $(CLANG_DIR)/bin/clang++ |
|
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
61 |
|
31
baeb8bdeff3a
Fortify sources using _FORTIFY_SOURCE=3 and also apply -fno-delete-null-pointer-checks.
Franz Glasner <fzglas.hg@dom66.de>
parents:
21
diff
changeset
|
62 # Define _FORTIFY_SOURCE=$(FORTIFY) (if != 0, default 0) |
|
baeb8bdeff3a
Fortify sources using _FORTIFY_SOURCE=3 and also apply -fno-delete-null-pointer-checks.
Franz Glasner <fzglas.hg@dom66.de>
parents:
21
diff
changeset
|
63 FORTIFY?= 3 |
|
baeb8bdeff3a
Fortify sources using _FORTIFY_SOURCE=3 and also apply -fno-delete-null-pointer-checks.
Franz Glasner <fzglas.hg@dom66.de>
parents:
21
diff
changeset
|
64 # |
|
baeb8bdeff3a
Fortify sources using _FORTIFY_SOURCE=3 and also apply -fno-delete-null-pointer-checks.
Franz Glasner <fzglas.hg@dom66.de>
parents:
21
diff
changeset
|
65 # If != 0 (default 1): |
|
baeb8bdeff3a
Fortify sources using _FORTIFY_SOURCE=3 and also apply -fno-delete-null-pointer-checks.
Franz Glasner <fzglas.hg@dom66.de>
parents:
21
diff
changeset
|
66 # -fno-delete-null-pointer-checks |
|
baeb8bdeff3a
Fortify sources using _FORTIFY_SOURCE=3 and also apply -fno-delete-null-pointer-checks.
Franz Glasner <fzglas.hg@dom66.de>
parents:
21
diff
changeset
|
67 # |
|
baeb8bdeff3a
Fortify sources using _FORTIFY_SOURCE=3 and also apply -fno-delete-null-pointer-checks.
Franz Glasner <fzglas.hg@dom66.de>
parents:
21
diff
changeset
|
68 # Should always be done when fortifying: |
|
baeb8bdeff3a
Fortify sources using _FORTIFY_SOURCE=3 and also apply -fno-delete-null-pointer-checks.
Franz Glasner <fzglas.hg@dom66.de>
parents:
21
diff
changeset
|
69 # https://github.com/ossf/wg-best-practices-os-developers/issues/659 |
|
baeb8bdeff3a
Fortify sources using _FORTIFY_SOURCE=3 and also apply -fno-delete-null-pointer-checks.
Franz Glasner <fzglas.hg@dom66.de>
parents:
21
diff
changeset
|
70 # |
|
32
72c1b70d4f5c
Also apply -Werror=implicit-function-declaration
Franz Glasner <fzglas.hg@dom66.de>
parents:
31
diff
changeset
|
71 # -Werror=implicit-function-declaration |
|
33
c4daa0c83d64
Apply also -fstack-clash-protection and -fstack-protector-strong for all generated binaries.
Franz Glasner <fzglas.hg@dom66.de>
parents:
32
diff
changeset
|
72 # -fstack-clash-protection |
|
c4daa0c83d64
Apply also -fstack-clash-protection and -fstack-protector-strong for all generated binaries.
Franz Glasner <fzglas.hg@dom66.de>
parents:
32
diff
changeset
|
73 # -fstack-protector-strong |
|
32
72c1b70d4f5c
Also apply -Werror=implicit-function-declaration
Franz Glasner <fzglas.hg@dom66.de>
parents:
31
diff
changeset
|
74 # |
|
31
baeb8bdeff3a
Fortify sources using _FORTIFY_SOURCE=3 and also apply -fno-delete-null-pointer-checks.
Franz Glasner <fzglas.hg@dom66.de>
parents:
21
diff
changeset
|
75 EXTRA_CHECKS?= 1 |
|
baeb8bdeff3a
Fortify sources using _FORTIFY_SOURCE=3 and also apply -fno-delete-null-pointer-checks.
Franz Glasner <fzglas.hg@dom66.de>
parents:
21
diff
changeset
|
76 |
|
21
2f43e400f144
Provide an "all" target to build both the sdist and the wheel
Franz Glasner <fzglas.hg@dom66.de>
parents:
20
diff
changeset
|
77 |
|
2f43e400f144
Provide an "all" target to build both the sdist and the wheel
Franz Glasner <fzglas.hg@dom66.de>
parents:
20
diff
changeset
|
78 all: sdist wheel |
|
2f43e400f144
Provide an "all" target to build both the sdist and the wheel
Franz Glasner <fzglas.hg@dom66.de>
parents:
20
diff
changeset
|
79 |
|
2f43e400f144
Provide an "all" target to build both the sdist and the wheel
Franz Glasner <fzglas.hg@dom66.de>
parents:
20
diff
changeset
|
80 |
|
19
c3ef899c5e56
Rename the "build" target to "wheel"
Franz Glasner <fzglas.hg@dom66.de>
parents:
18
diff
changeset
|
81 wheel: check |
|
6
b5f06508363a
PyMuPDF builds on FreeBSD now with "gmake -f Makefile.freebsd".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
82 $(TEST) -e $(firstword $(PYTHON_PREFIXES))/bin/make || $(SYMLINK) $(LOCALBASE)/bin/gmake $(firstword $(PYTHON_PREFIXES))/bin/make |
|
10
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
83 $(TEST) -e $(firstword $(PYTHON_PREFIXES))/bin/ar || $(SYMLINK) $(CLANG_DIR)/bin/llvm-ar $(firstword $(PYTHON_PREFIXES))/bin/ar |
|
9
b2d41d02518f
Use the LLVM compilers by symlinking them in the venv.
Franz Glasner <fzglas.hg@dom66.de>
parents:
8
diff
changeset
|
84 $(TEST) -e $(firstword $(PYTHON_PREFIXES))/bin/cc || $(SYMLINK) $(CLANG_DIR)/bin/clang $(firstword $(PYTHON_PREFIXES))/bin/cc |
|
b2d41d02518f
Use the LLVM compilers by symlinking them in the venv.
Franz Glasner <fzglas.hg@dom66.de>
parents:
8
diff
changeset
|
85 $(TEST) -e $(firstword $(PYTHON_PREFIXES))/bin/c++ || $(SYMLINK) $(CLANG_DIR)/bin/clang++ $(firstword $(PYTHON_PREFIXES))/bin/c++ |
|
10
76e05e28f6a8
Also use the LLVM linker by symlinking and use LLVM's ar now
Franz Glasner <fzglas.hg@dom66.de>
parents:
9
diff
changeset
|
86 $(TEST) -e $(firstword $(PYTHON_PREFIXES))/bin/ld || $(SYMLINK) $(CLANG_DIR)/bin/ld.lld $(firstword $(PYTHON_PREFIXES))/bin/ld |
|
38
8934ac156ef5
Allow to build with the PyPI package "clang" instead of "libclang".
Franz Glasner <fzglas.hg@dom66.de>
parents:
35
diff
changeset
|
87 FORTIFY=$(FORTIFY) EXTRA_CHECKS=$(EXTRA_CHECKS) PIPCL_VERBOSE=2 LIBCLANG_LIBRARY_PATH=$(LIBCLANG_LIBRARY_PATH) PYMUPDF_SETUP_MUPDF_BUILD=$(PYMUPDF_SETUP_MUPDF_BUILD) PYMUPDF_SETUP_MUPDF_TESSERACT=$(PYMUPDF_SETUP_MUPDF_TESSERACT) PYMUPDF_SETUP_LIBCLANG='$(PYMUPDF_SETUP_LIBCLANG)' $(PYTHON) -m build --wheel --verbose --no-isolation |
|
11
f704f0a78213
A make target to populate the Python virtual environment
Franz Glasner <fzglas.hg@dom66.de>
parents:
10
diff
changeset
|
88 |
|
f704f0a78213
A make target to populate the Python virtual environment
Franz Glasner <fzglas.hg@dom66.de>
parents:
10
diff
changeset
|
89 |
|
18
dd663470c57c
Make building an sdist work on FreeBSD and with Mercurial as SCM.
Franz Glasner <fzglas.hg@dom66.de>
parents:
16
diff
changeset
|
90 sdist: check |
|
38
8934ac156ef5
Allow to build with the PyPI package "clang" instead of "libclang".
Franz Glasner <fzglas.hg@dom66.de>
parents:
35
diff
changeset
|
91 PIPCL_VERBOSE=2 LIBCLANG_LIBRARY_PATH=$(LIBCLANG_LIBRARY_PATH) PYMUPDF_SETUP_MUPDF_BUILD=$(PYMUPDF_SETUP_MUPDF_BUILD) PYMUPDF_SETUP_MUPDF_TESSERACT=$(PYMUPDF_SETUP_MUPDF_TESSERACT) PYMUPDF_SETUP_LIBCLANG='$(PYMUPDF_SETUP_LIBCLANG)' $(PYTHON) -m build --sdist --verbose --no-isolation |
|
18
dd663470c57c
Make building an sdist work on FreeBSD and with Mercurial as SCM.
Franz Glasner <fzglas.hg@dom66.de>
parents:
16
diff
changeset
|
92 |
|
dd663470c57c
Make building an sdist work on FreeBSD and with Mercurial as SCM.
Franz Glasner <fzglas.hg@dom66.de>
parents:
16
diff
changeset
|
93 |
|
11
f704f0a78213
A make target to populate the Python virtual environment
Franz Glasner <fzglas.hg@dom66.de>
parents:
10
diff
changeset
|
94 populate-venv: |
|
f704f0a78213
A make target to populate the Python virtual environment
Franz Glasner <fzglas.hg@dom66.de>
parents:
10
diff
changeset
|
95 ifneq ($(firstword $(PYTHON_PREFIXES)),$(lastword $(PYTHON_PREFIXES))) |
|
f704f0a78213
A make target to populate the Python virtual environment
Franz Glasner <fzglas.hg@dom66.de>
parents:
10
diff
changeset
|
96 $(PYTHON) -m pip install -U -r requirements-build.txt |
|
f704f0a78213
A make target to populate the Python virtual environment
Franz Glasner <fzglas.hg@dom66.de>
parents:
10
diff
changeset
|
97 else |
|
f704f0a78213
A make target to populate the Python virtual environment
Franz Glasner <fzglas.hg@dom66.de>
parents:
10
diff
changeset
|
98 $(error Not in a Python virtual environment) |
|
f704f0a78213
A make target to populate the Python virtual environment
Franz Glasner <fzglas.hg@dom66.de>
parents:
10
diff
changeset
|
99 endif |
|
16
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
100 |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
101 |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
102 check: |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
103 ifneq ($(firstword $(PYTHON_PREFIXES)),$(lastword $(PYTHON_PREFIXES))) |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
104 $(PYTHON) -m pip freeze | grep -E '^\s*setuptools-scm==' >/dev/null |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
105 $(PYTHON) -m pip freeze | grep -E '^\s*build==' >/dev/null |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
106 $(PYTHON) -m pip freeze | grep -E '^\s*swig==' >/dev/null |
|
38
8934ac156ef5
Allow to build with the PyPI package "clang" instead of "libclang".
Franz Glasner <fzglas.hg@dom66.de>
parents:
35
diff
changeset
|
107 $(PYTHON) -m pip freeze | grep -E '^\s*clang==18\.' >/dev/null |
|
8934ac156ef5
Allow to build with the PyPI package "clang" instead of "libclang".
Franz Glasner <fzglas.hg@dom66.de>
parents:
35
diff
changeset
|
108 # This covers the "clang" and "libclang" package |
|
8934ac156ef5
Allow to build with the PyPI package "clang" instead of "libclang".
Franz Glasner <fzglas.hg@dom66.de>
parents:
35
diff
changeset
|
109 $(PYTHON) -c 'import clang.cindex' >/dev/null |
|
16
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
110 $(TEST) -x $(LOCALBASE)/bin/gmake |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
111 $(TEST) -x $(LOCALBASE)/bin/cmake |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
112 $(TEST) -x $(CLANG_DIR)/bin/llvm-ar |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
113 $(TEST) -x $(CLANG_DIR)/bin/clang |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
114 $(TEST) -x $(CLANG_DIR)/bin/clang++ |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
115 $(TEST) -x $(CLANG_DIR)/bin/ld.lld |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
116 else |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
117 $(error Not in a Python virtual environment) |
|
bd5bb0742cc3
A "check" target that checks for all venv and host prerequisites
Franz Glasner <fzglas.hg@dom66.de>
parents:
15
diff
changeset
|
118 endif |
